About hard coded strings

there still in same places exists hard coded strings,

for example:

org/jivesoftware/spark/ui/SubscriptionDialog.java:

92: rosterBox.setText("Add user to your roster");
..........
221: dialog = new JFrame("Subscription Request"){
..........

what is collect way to fix this? i can do this work if you show me a rule.

in addition, the font size and font name in many places is hard coded too,

i think it will better, if we remove it to property file.

for example, the font** **named **Arial **not properly show chinese character, and the font size 11 is small too to show chinese.

There are a static class Res.

For example :

rosterBox.setText(“Add user to your roster”);

You can change with :

rosterBox.setText( Res.getString(“label.add.to.roster”) );

But spark_i18n.properties file must contain string.

label.add.to.roster = Add user to your roster

And so on.

thank you for response, I will make change in the i18n files, and hope admin will add changes to SVN server.

And note that i18n files must be into utf8 encoding.

Use command

native2ascii -encoding utf8 [filename] [newfilename]

before upload them.

Hello,

i move same hard coded string to i18n files:

##     Added key: 'title.subscription.request'
##     Added key: 'label.add.to.roster'
##     Added key: 'label.audio.device'
##     Added key: 'label.video.device'
##     Added key: 'button.re.detect'

add a locale file for plugin spellchecking.
spark_i18n.properties.patch.zip (846 Bytes)
spark_i18n_zh_CN.properties.patch.zip (27792 Bytes)
spellchecker_i18n_zh_CN.properties.patch.zip (459 Bytes)
SpellcheckerPreferenceDialog.java.patch.zip (530 Bytes)
SubscriptionDialog.java.patch.zip (620 Bytes)

There a small patch that can workaround, please, admin, check it before accepting.
JiveTreeCellRenderer.java.patch.zip (664 Bytes)

Here Russion translation. this isn’t patch. i attached file encoded into ascii utf8.
spark_i18n_ru_RU.properties.tar.bz2 (9289 Bytes)

Hi,

thx for the patches. I have applied the hardcoded string patches to the trunk.

The next days I will check the JiveTree patch.