NLS missing message [message #460759] |
Thu, 28 December 2006 19:34  |
Eclipse User |
|
|
|
Hi,
newbie question.
I have an RCP application.
I would like to have some translatable strings.
I have a class that extends org.eclipse.osgi.util.NLS,
and have placed a file named messages.properties in
the root of my project.
Still unable to get the bundle to load the strings.
What am I missing?
Thanks,
Jeff Higgins
package my.project.application;
import org.eclipse.osgi.util.NLS;
public class ApplicationMessages extends NLS {
public static String ApplicationMessage_One;
public static String ApplicationMessage_Two;
static {
NLS.initializeMessages(
"my.project.application.messages",
ApplicationMessages.class
);
}
}
in my project root folder a file named: messages.properties
contains the two lines:
ApplicationMessage_One=message1
ApplicationMessage_Two=message2
!ENTRY org.eclipse.osgi 2 1 2006-12-28 18:33:48.656
!MESSAGE NLS missing message: ApplicationMessage_One
in: my.project.application.messages
!ENTRY org.eclipse.osgi 2 1 2006-12-28 18:33:48.656
!MESSAGE NLS missing message: ApplicationMessage_Two
in: my.project.application.messages
|
|
|
|
Re: NLS missing message [message #460822 is a reply to message #460764] |
Fri, 29 December 2006 15:29  |
Eclipse User |
|
|
|
Hi,
In the plugin's config (open plugin.xml or MANIFEST.MF) on the "Build" page
you need to specify all the directories/files to be included in the
distributive.
thanks,
Dima
"Jeff Higgins" <oohiggins@yahoo.com> wrote in message
news:en1s3j$adi$1@utils.eclipse.org...
> Oops;
> Put the messages.properties file in src/my.projects.application package.
> Now it works.
>
>
> "Jeff Higgins" <oohiggins@yahoo.com> wrote in message
> news:en1nrp$kdl$1@utils.eclipse.org...
>> Hi,
>> newbie question.
>>
>> I have an RCP application.
>> I would like to have some translatable strings.
>> I have a class that extends org.eclipse.osgi.util.NLS,
>> and have placed a file named messages.properties in
>> the root of my project.
>> Still unable to get the bundle to load the strings.
>> What am I missing?
>>
>> Thanks,
>> Jeff Higgins
>>
>> package my.project.application;
>>
>> import org.eclipse.osgi.util.NLS;
>>
>> public class ApplicationMessages extends NLS {
>>
>> public static String ApplicationMessage_One;
>> public static String ApplicationMessage_Two;
>>
>> static {
>> NLS.initializeMessages(
>> "my.project.application.messages",
>> ApplicationMessages.class
>> );
>> }
>> }
>>
>> in my project root folder a file named: messages.properties
>> contains the two lines:
>>
>> ApplicationMessage_One=message1
>> ApplicationMessage_Two=message2
>>
>>
>> !ENTRY org.eclipse.osgi 2 1 2006-12-28 18:33:48.656
>> !MESSAGE NLS missing message: ApplicationMessage_One
>> in: my.project.application.messages
>>
>> !ENTRY org.eclipse.osgi 2 1 2006-12-28 18:33:48.656
>> !MESSAGE NLS missing message: ApplicationMessage_Two
>> in: my.project.application.messages
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03819 seconds