0

I have extended project in eclipse scout neon, and I would like to know how to enable texts it this project.

I copy Texts.nls file and create texts folder with Texts.properties inside. Auto create texts from code doesn't work and give me an error :

The NLS Project is read-only. heck that you have a valid NLS Project in your workspace.

If I add text manually in texts.properties file, it doesn't read from it. How to fix this?

Marko Zadravec
  • 8,298
  • 10
  • 55
  • 97

1 Answers1

0

Have you configured your Texts.nls file correctly? Here an example:

###############################################
# This file is maintained by the NLS editor.  #
# To ensure a properly working NLS support    #
# keep this file untouched.                   #
###############################################
Nls-Class=org.eclipse.scout.contacts.shared.TextProviderService

The corresponding TextProviderService java class:

package org.eclipse.scout.contacts.shared;

import org.eclipse.scout.rt.platform.Order;
import org.eclipse.scout.rt.shared.services.common.text.AbstractDynamicNlsTextProviderService;

@Order(2000)
public class TextProviderService extends AbstractDynamicNlsTextProviderService {
  @Override
  protected String getDynamicNlsBaseName() {
    return "org.eclipse.scout.contacts.shared.texts.Texts";
  }
}

This is the way how the Scout SDK lookup for your properties files.

Jmini
  • 9,189
  • 2
  • 55
  • 77