I cant find any summarized info about how to make translations for Spark. A lot of questions in forum. We need a wiki topic for that. What i have found is that translation should be converted to ascii format. So, is this up to translators to do, or maybe they can just send translated properties file to Derek and he will convert ant include them?
It’'s actually easy to copy lib\spark.jar to a new directory, extract it there, modify i18n\spark_i18n.properties and then select all files and create a new smack.jar file.
What’‘s really bad is that the file has no order. So one must guess where which properties are used and whether “Password” on the splash screen uses the same or another key as “Password” on the “Create New Account” page. If one want’'s to add “&” in front of some characters one should make sure that every dialog uses usable “&” shortcuts.
The German i18n file is really bad: “&Proxy, &Protkoll, &Port, &Passwort” in one dialogue (Settings: Proxy) but the English one (splash screen) is not better with “&Server, &Save Password” and “&Auto Login, &Accounts”. The Spanish one uses “description = Descripci\u00f3n” - \u00f3 == encoded unicode in an UTF-8 encoded file …
LG
Added: SPARK-284 describes these problems with duplicate ‘’&’’ entries, also that “Con&tacts” does not work. And this is the problem for every lower case &_-character. So “User&name” does not work will while “User&Name” will work.
I have no experience managing jar files. It is possible to uncompress spark.jar file with winzip, edit spark_i18n_es.properties file and change for example, the following line:
title.set.status.message = Setear Mensaje de Estado
for
title.set.status.message = Definir Mensaje de Estado
then save spark_i18n_es.properties , and bulid a new spark.jar file?
do everything with Winzip if you like it best. I may quote myself: “It’'s actually easy to copy lib\spark.jar to a new directory, extract it there, modify i18n\spark_i18n.properties and then select all files and create a new smack.jar file.”
A short tutorial:
Make a backup of spark.jar, you’'ll need it if you damage spark.jar
Copy spark.jar to C:\tmp\lang\
Select "Extract Here"
Modify the properties file in folder i18n
?? One may also be able to create a new one for another language, but I don’'t know whether Spark will accept it ??
Select all files except spark.jar
Select “Compress to ZIP + Options” and set the filename to C:\tmp\lang\spark.jar.
Copy C:\tmp\lang\spark.jar to your Spark/lib directory.
The file if indeed not UTF-8 encoded and if one tries this then also “äöü” will look in Spark like “äöü”.
/me slabs Derek Java around with a big trout.
LG
… not a Derek but a Java issue as Java expects ASCII property files and not UTF-8. So we’'re back in 1739 and need to convert UTF-8 or local encoded files to ASCII with \u-sequences.
The problem was in building the new jar file. My fault, sorry!!! In order to build the new jar file, I was selecting entire directory (spark) instead of the content of this directory.
Comparing the content on the good spark.jar and the new one, I realized that the problem was here…
I’'ve translated Spark into Polish, and it actually works for me. Is there any chance, that my translation will be added into future releases of Spark? Where should I send the translated file?