I18n woes

Hi...

today I thried to avtivate the I18n stuff, and after some searching in this
newsgroup I managed to enable the quickfix action. What we want to do is to
replace the string with something like
myCall("PROPERTY_KEY", "PROPERTY_VALUE").

Unfortunately the property value is not replaced with the real (original)
string. I guess this is a bug?
We would highly appreciate a quick fix (or explanation how to do it right).
We are currently evaluating IDEA 5 and an I18n quickfix working for us would
be a good argument to management :)

Ciao

...Jochen



8 comments
Comment actions Permalink

Hello Jochen,

n> today I thried to avtivate the I18n stuff, and after some searching in
this
n> newsgroup I managed to enable the quickfix action. What we want to do
is to
n> replace the string with something like
n> myCall("PROPERTY_KEY", "PROPERTY_VALUE").
n> Unfortunately the property value is not replaced with the real (original)
n> string. I guess this is a bug?

The quick fix action was designed to put the property value into the .properties
file. If you don't store localized strings in .properties files, I don't
think the quick fix would really help you. And if you do store localized
strings in .properties files, then why do you also need the property value
in the Java code?

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

Hi...

first of all, PROPERTY_VALUE is specified in the description to be working,
so I assume this is a bug.
We will move all property files to another jar to separate
internationalization from code. All the stuff it then moved to someone for
translation. If some or all properties do not exist (due to spurious typos
or the property jar is missing altogether, or other reasons, system is big),
the system should not crash but instead return the second parameter, which
is i.e. a fallback value.

Ciao

...Jochen


"Dmitry Jemerov (JetBrains)" <yole@jetbrains.com> wrote in message
news:83ca25fd1afd7f8c77b768056ab20@news.intellij.net...

Hello Jochen,

>

n> today I thried to avtivate the I18n stuff, and after some searching in
this
n> newsgroup I managed to enable the quickfix action. What we want to do
is to
n> replace the string with something like
n> myCall("PROPERTY_KEY", "PROPERTY_VALUE").
n> Unfortunately the property value is not replaced with the real
(original)
n> string. I guess this is a bug?

>

The quick fix action was designed to put the property value into the
.properties file. If you don't store localized strings in .properties
files, I don't think the quick fix would really help you. And if you do
store localized strings in .properties files, then why do you also need
the property value in the Java code?

>

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"

>




0
Comment actions Permalink

I think what Jochen is referring to is what you can see in the screenshot: The I18N
template makes use of the $ variable, which is mentioned in the online
help as well as in the template editor, but the resource bundle expression doesn't replace
it. The expression should read zzz.myCall("my.key", "My Value").

That's a bug, no matter how useful it may seem ;)

The Preview seems broken as well, it displays the expression twice, probably because no
Resource Bundle variable is available in scope.

Sascha



Attachment(s):
i18n.PNG
0
Comment actions Permalink

Hello Jochen,

JR> first of all, PROPERTY_VALUE is specified in the description to be
JR> working, so I assume this is a bug.

Indeed, this is a bug, and it will be fixed in IDEA 5.0.2. Thanks for your
feedback!

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

Dmitry Jemerov (JetBrains) wrote:

Hello Jochen,

JR> first of all, PROPERTY_VALUE is specified in the description to be
JR> working, so I assume this is a bug.

Indeed, this is a bug, and it will be fixed in IDEA 5.0.2. Thanks for
your feedback!


Cool! Thank you!

Ciao

...Jochen

0
Comment actions Permalink

today I thried to avtivate the I18n stuff, and after some searching in

this

newsgroup I managed to enable the quickfix action.


I can't seem to find how to do this. Could you please give a hint?

Thanks!


0
Comment actions Permalink

Hello again Victor :)
Steps:
1. Analyze->Inspect code
2. Elipis on inspection profile
3. Type 'string' in filter and filter out.
4. Enable inspection 'Internalization issues->Hard coded strings'
5. Run inspection.

TIA,
Dmitry

0
Comment actions Permalink

Thanks!

"Dmitry Kashin" <no_mail@jetbrains.com> wrote in message
news:15783035.1125655614984.JavaMail.javamailuser@localhost...

Hello again Victor :)
Steps:
1. Analyze->Inspect code
2. Elipis on inspection profile
3. Type 'string' in filter and filter out.
4. Enable inspection 'Internalization issues->Hard coded strings'
5. Run inspection.

>

TIA,
Dmitry



0

Please sign in to leave a comment.