Menu

#31 Junk characters in the applet for custom translated text for few locales like ja, zh, zh_TW etc

v1.0_(example)
pending
Etienne
None
1
2013-12-03
2013-11-26
Anonymous
No

Hi there,
We are experiencing issues in the applet for custom translated text for few locales like ja, zh, zh_TW etc
For the applet to support multiple locales we have used our resource bundles with custom values.

After I run maven with -Djupload.translation=true, my resource bundle values inside src\main\resources\lang are being overwritten with default ones that come with jupload jar.
To avoid this, if I just use mvn -e clean install, the values coming out from resource bundle for few locales like ja, zh, zh_TW are turning out to be junk characters.

How could we use our custom values and still get right values from resource bundle?
Screenshots and debug files attached for reference. Appreciate your help.

Java Plug-in 10.45.2.18
Using JRE version 1.7.0_45-b18 Java HotSpot(TM) Client VM
User home directory = C:\Users\rnarasim


Thanks,
Raju

1 Attachments

Discussion

  • Etienne

    Etienne - 2013-11-29

    Hi,

    Please read carefully the translation doc, available here :
    http://jupload.sourceforge.net/howto-translate.html

    The src\main\resources\lang folder contains generated resource files.

    You should put your own translation here : ./src/main/translation/applet.utf-16

    Then run
    mvn clean install -Djupload.translation=true

    And, please, if you improve the translation, let me know : I'll publish the updated version in the next version...

    Etienne

     
  • Etienne

    Etienne - 2013-11-29
    • status: open --> pending
     
  • Anonymous

    Anonymous - 2013-12-03

    Thanks for the response.

    1. I put my translation files in ./src/main/translation/applet.utf-16 and ran mvn clean install -Djupload.translation=true like you mentioned.
      Next, I ran mvn clean install in the main folder to generate the upload jar file.
      But still I see the junk chars for the locales like ja, de etc ? How to resolve this issue?

    2. One more thing: I have a new bundle for 'ko' language and I noticed 'ko' is missing in the default jupload jar. And also I ran the translation plug-in after putting it in applet.utf-16 folder. The issue exists for 'ko' too? Appreciate your inputs

    -Raju

     
  • Etienne

    Etienne - 2013-12-03

    Hi,

    There is no issue with the translation : I ran it a lot of time, and never encoutered these troubles.

    I think you missed something, when building the translation tool.
    The steps are :
    a) Go to the maven-translation-plugin folder, and run mvn clean install (no -Djupload.translation=true is needed there)
    You need it only once to build the translation tool. Then, you'll never have to go to the maven-translation-plugin folder again (only if you change of computer, or a new version of the tool would be proposed, which is not planned at all)
    b) Go to the main folder, and run mvn clean install -Djupload.translation=true
    This last step is from the main folder. Do it each time you change a file in the ./src/main/translation/applet.utf-16 folder.
    It will generate the lang_xx in the resources folder, and the lang_xx.properties.apt in the site/apt folder (for the documentation site of the project)

    To check if the lang_xx files are properly encoded, you can open then. You should find only ASCII characters. No accent, no Asiatic character... All text should be encoded this way : \u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f

    So, some proposed controls :

    1) Can you check that your updated files in the ./src/main/translation/applet.utf-16 are properly encoded in UTF-16 ?

    2) You mentionned ja and de. Do you have junk characters only for the languages you updated, or for all ?
    Do you have 'proper' languages ?

    3) About the 'ko' translation, you should just add the file into the ./src/main/translation/applet.utf-16.
    It should work, if it's properly encoded (UTF-16).

    NB1 : Please send me the 'ko' translation, I'll be glad to add it to the 'official' package !
    NB2 : If your updates are translation improvement, please send them also. I'll be also glad to improve the next release...

    Etienne

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB