Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » NLS missing message
NLS missing message [message #460759] Fri, 29 December 2006 00:34 Go to next message
Jeff Higgins is currently offline Jeff HigginsFriend
Messages: 51
Registered: July 2009
Member
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 #460764 is a reply to message #460759] Fri, 29 December 2006 01:47 Go to previous messageGo to next message
Jeff Higgins is currently offline Jeff HigginsFriend
Messages: 51
Registered: July 2009
Member
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
>
Re: NLS missing message [message #460822 is a reply to message #460764] Fri, 29 December 2006 20:29 Go to previous message
Dimitry E Voytenko is currently offline Dimitry E VoytenkoFriend
Messages: 4
Registered: July 2009
Junior Member
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
>>
>
>
Previous Topic:MessageConsole NoClassDefFoundError
Next Topic:Eclipse RCP app + Plugin +Java Project dependency
Goto Forum:
  


Current Time: Mon Sep 23 23:16:29 GMT 2024

Powered by FUDForum. Page generated in 0.03639 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top