kouchat
kouchat copied to clipboard
Translation support for the user interface
Add support for translating the user interface into different languages.
Steps to do translations without source code:
-
Download the newest snapshot of KouChat from the build server at: https://blurpy.ci.cloudbees.com/job/kouchat/lastStableBuild/net.usikkert.kouchat$kouchat/
-
Put the jar in a folder, like "
kouchat" (the name is not important). -
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". -
In the folder "
messages", create an empty file called "swing_ru_orig.properties" -
In the properties file, add the line "
swing.menu.file=Файл" -
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.propertiesI'm not sure if
native2asciiis 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-encodingparameter ofnative2ascii, documented here: http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/native2ascii.html -
Run KouChat with Russian language:
java -Duser.language=ru -cp .:kouchat-1.3.0-SNAPSHOT.jar net.usikkert.kouchat.KouChatYou probably don't need to use "
-Duser.language=ru" if the operating system is configured to Russian by default. On Windows the-cpparameter will be "-cp .;kouchat-1.3.0-SNAPSHOT.jar" instead. -
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.