Skip to main content



      Home
Home » Newcomers » Newcomers » Externalize strings
Externalize strings [message #122989] Fri, 09 December 2005 06:29 Go to next message
Eclipse UserFriend
Hi all,

If this should go to another newsgroup, please tell me which one. :)

We're starting to localize our app, which is pretty much broken into
many modules / projects, but I'd still like to use one database for all
localized strings.

This is, where we've had some problems.

a) Each Externalization seems to be linked to one class, you may not
externalize one class, ant tell it to use IDs from 1 to 100 (if there
are 100 strings), and then select another class and tell it to use the
same file, and start enumerating keys from 101 forward.

b) If using an existing file, it would be nice, if Eclipse would find
existing strings, and offer a key for one of the exiting strings, not
create an new one.

These two things don't seem to unreasonable to me, but I don't know how
to do them in Eclipse.

There is also a "Rename keys..." button, that seems to be always grayed out.

Can someone if this is possible to do, and how? Or if it is covered
somewhere in the docs, where, because the search on Eclipse site didn't
return anything useful in this respect.

BR, Miha Vitorovic
Re: Externalize strings [message #122999 is a reply to message #122989] Fri, 09 December 2005 07:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hendrik_maryns.despammed.com

Miha Vitorovic schreef:
> Hi all,
>
> If this should go to another newsgroup, please tell me which one. :)
>
> We're starting to localize our app, which is pretty much broken into
> many modules / projects, but I'd still like to use one database for all
> localized strings.
>
> This is, where we've had some problems.
>
> a) Each Externalization seems to be linked to one class, you may not
> externalize one class, ant tell it to use IDs from 1 to 100 (if there
> are 100 strings), and then select another class and tell it to use the
> same file, and start enumerating keys from 101 forward.
>
> b) If using an existing file, it would be nice, if Eclipse would find
> existing strings, and offer a key for one of the exiting strings, not
> create an new one.
>
> These two things don't seem to unreasonable to me, but I don't know how
> to do them in Eclipse.
>
> There is also a "Rename keys..." button, that seems to be always grayed
> out.
>
> Can someone if this is possible to do, and how? Or if it is covered
> somewhere in the docs, where, because the search on Eclipse site didn't
> return anything useful in this respect.

I´ve only playes with `Externalise Strings´ a bit, but have you tried
it? In the wizard window, you can click on the key of a string and
change it, it is always prepended with the name of the class. Eclipse
makes one properties file and Messages class per package.

You also might be interested in the compiler option to warn for
non-externalised strings. Either to be set in the preferences, or via
the project options.

HTH, H.

--
Hendrik Maryns

==================
www.lieverleven.be
http://aouw.org
Re: Externalize strings [message #123006 is a reply to message #122999] Fri, 09 December 2005 08:20 Go to previous messageGo to next message
Eclipse UserFriend
Hendrik Maryns wrote:
> Miha Vitorovic schreef:
>
>> Hi all,
>>
>> If this should go to another newsgroup, please tell me which one. :)
>>
>> We're starting to localize our app, which is pretty much broken into
>> many modules / projects, but I'd still like to use one database for
>> all localized strings.
>>
>> This is, where we've had some problems.
>>
>> a) Each Externalization seems to be linked to one class, you may not
>> externalize one class, ant tell it to use IDs from 1 to 100 (if there
>> are 100 strings), and then select another class and tell it to use the
>> same file, and start enumerating keys from 101 forward.
>>
>> b) If using an existing file, it would be nice, if Eclipse would find
>> existing strings, and offer a key for one of the exiting strings, not
>> create an new one.

>
> I´ve only playes with `Externalise Strings´ a bit, but have you tried
> it? In the wizard window, you can click on the key of a string and
> change it, it is always prepended with the name of the class. Eclipse
> makes one properties file and Messages class per package.
>
> You also might be interested in the compiler option to warn for
> non-externalised strings. Either to be set in the preferences, or via
> the project options.
>
> HTH, H.
>


Yes, I have tried it. Like I said, I don't feel like going through 100
keys one by one, changing each one of them, I want to tell Eclipse:
"Start naming keys at 100 instead of 1."

"B" would be a nice feature too...

Cheers, Miha Vitorovic
Re: Externalize strings [message #123015 is a reply to message #123006] Fri, 09 December 2005 08:32 Go to previous message
Eclipse UserFriend
Originally posted by: hendrik_maryns.despammed.com

Miha Vitorovic schreef:

>> I´ve only played with `Externalise Strings´ a bit, but have you tried
>> it? In the wizard window, you can click on the key of a string and
>> change it, it is always prepended with the name of the class. Eclipse
>> makes one properties file and Messages class per package.
>>
>> You also might be interested in the compiler option to warn for
>> non-externalised strings. Either to be set in the preferences, or via
>> the project options.
>
> Yes, I have tried it. Like I said, I don't feel like going through 100
> keys one by one, changing each one of them, I want to tell Eclipse:
> "Start naming keys at 100 instead of 1."

I think it is not really a good idea to just give them numbers, you
should choose more meaningful names. That´s probably a reason for not
giving this possibility...

> "B" would be a nice feature too...

Indeed, why don´t you make a feature request?

H.
--
Hendrik Maryns

==================
www.lieverleven.be
http://aouw.org
Previous Topic:Code Assist and base classes
Next Topic:Selecting Font for Debug-Windows (Java)
Goto Forum:
  


Current Time: Thu May 08 02:30:54 EDT 2025

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

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

Back to the top