Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation support for the user interface #2

Open
blurpy opened this issue Mar 16, 2015 · 1 comment
Open

Translation support for the user interface #2

blurpy opened this issue Mar 16, 2015 · 1 comment

Comments

@blurpy
Copy link
Owner

blurpy commented Mar 16, 2015

Add support for translating the user interface into different languages.

@blurpy
Copy link
Owner Author

blurpy commented Aug 9, 2015

Steps to do translations without source code:

  1. Download the newest snapshot of KouChat from the build server at:
    https://blurpy.ci.cloudbees.com/job/kouchat/lastStableBuild/net.usikkert.kouchat$kouchat/

  2. Put the jar in a folder, like "kouchat" (the name is not important).

  3. Inside the new folder, create another new folder called "messages" (must be this exact name). The folder "kouchat" should now contain the jar and the folder "messages".

  4. In the folder "messages", create an empty file called "swing_ru_orig.properties"

  5. In the properties file, add the line "swing.menu.file=Файл"

  6. Convert the properties file to the correct format using native2ascii. Run this command from the "kouchat" folder:

    native2ascii messages/swing_ru_orig.properties messages/swing_ru.properties

    I'm not sure if native2ascii is part of the Java Runtime (JRE). You might need to download the Java JDK to get it. If the characters look wrong in step 7, try experimenting with the -encoding parameter of native2ascii, documented here:
    http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/native2ascii.html

  7. Run KouChat with Russian language:

    java -Duser.language=ru -cp .:kouchat-1.3.0-SNAPSHOT.jar net.usikkert.kouchat.KouChat

    You probably don't need to use "-Duser.language=ru" if the operating system is configured to Russian by default. On Windows the -cp parameter will be "-cp .;kouchat-1.3.0-SNAPSHOT.jar" instead.

  8. The file menu should now be displayed in Russian. For more messages you can translate, see:
    https://github.com/blurpy/kouchat/blob/master/src/main/resources/messages/swing.properties

    Mnemonic are shortcut keys, for navigating to menu elements using the keyboard. Like alt+"mnemonic key". {0} and other numbers are parameters being passed from code into the messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant