Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
How to translate CogStat?
CogStat strings are stored on POEditor. You can edit the translated strings there, and they will be available in the next release of CogStat.
- Head to the CogStat POEditor project page.
- Sing up for a free POEditor account, if you don't have yet.
- Select the language and join the project.
- After the approval you can start translating the strings.
If you want to be informed when new strings are available to be localized or some localization related news, subscribe to our localization mailing list.
Special characters in the strings
There are some characters in the strings that shouldn’t be changed. Here’s a list of them.
- Do not change the characters between the <> signs, copy them in the same form into the translated string.
- Do not change the % or \ characters and the characters next to them. Do not change the order of the %something part within a string.
- For right to left languages, either copy these parts, or type them in the order as you can see it in the English version. E.g., for %s type first %, then s. On the POEditor interface this will be reversed as s%, but that is how it should be look like there. For more complex structures, like [%0.*f, %0.*f] the order of some subparts also could change, but that is OK, too.
- If your language uses a special % sign (e.g., as in Farsi), use the % sign from the original string. The only exception is when the original string includes %%, then a single % in the new language should be written.
- If your language uses non-Indo-Arabic digits (e.g., in Tamil, Farsi, Arabic (ironic, I know), etc.), then do not change the 0 when it is in the part starting with the % sign.
- In the name of the menu items, there could be a & sign. This will tell that pressing the key with the letter after the & sign should be pressed with the left Alt key, to get to that menu item without using the mouse or the cursor movement keys. These letters are underlined in the menu. Put the & character in front of the character that should be used for that menu item. Take care that a letter should not be used for more than one menu item within a level (e.g., within a submenu).
- For right to left languages, in front of the character means right to the character.
- You might want to change the shortcuts (e.g., Ctrl+O, etc.) according to the appropriate alternative in that language. These shortcuts can be seen in the menu, next to the appropriate menu item. All shortcuts should be used only for a single command.
Be careful! The spaces at the beginning and end of the strings should be kept. POEditor highlights these spaces with the ␣ character.
- In those cases, in the translated string, use the space character, not the ␣ character. POEditor will display the space in the translated string as a ␣ character, but while editing the string, it is displayed as a space character.
- If the string starts with capital, use capital in the translation (at least if you have capital in your writing system). If the string ends with period, use period in the translation.
It is not trivial to find the appropriate translation. Here are some ideas how to find the right solution if you are unsure about the possibilities.
- Check the glossary of the International Statistical Institute
- Check it on Wikipedia. Find some English article that discusses the terms and check the same page on your target language (use the Languages options on the left side of the Wikipedia articles).
- Check it in other localized software. Find a statistical software in your language and see the terms in it.
- Check it in textbooks. Find printed or online materials explaining the terms, and see what they use.
How to test your translation?
One option is that your translation will be available in the next release of CogStat, and you can try your translation when the next release is available.
If you want to try your translation before the next release here's what you can do:
- Get the .mo file
- On the POEditor site go to the language you want to check.
- Click on Export (right side of the page).
- Select Gettext mo, rename it as cogstat.mo (Advanced option), and click on Export.
- Copy your new .mo file to the appropriate location.
- In your installed CogStat version go to the locale directory. (On Windows it is C:/Program Files/CogStat/locale/.)
- If you update an existing language, choose the directory of your language (e.g., 'de' for German, 'bg' for Bulgarian, etc.) and copy your .mo file to the LC_MESSAGES directory (it requires admin access).
- If you created a new language, create a new language code directory (these codes will be used), create an LC_MESSAGES subdirectory, and copy your .mo file there (it requires admin access).
- Start CogStat and see the results.
- If your language was not set formerly (e.g., it is a new language), then choose your language (CogStat > Preferences), and restart CogStat.
- If you know how to run any python script from the CogStat code, you can run the
cogstat/test/test_ouput.pyscript and find the newly generated language test pdf files in the
Note that some of the strings that are new in the next release might not be visible in the older released versions.
Localization related bugs
- If some of the strings are translated incorrectly, simply fix it on POEditor.
- If there is some other issue related to localization (see some examples here), report the problem on the Issues page. Also add the 'localization' label to the issue.
- If you think that the issue should be discussed first, send a mail to the localization mailing list.
See the current contributors here.
- Bulgarian: Petia Kojouharova (Петя Кожухарова)
- Croatian: Sandra Stojić
- German: László Veller, Roman Ricardo Pota
- Hebrew: Tzipi Buchman
- Hungarian: Attila Krajcsi
- Italian: Eszter Temesvári
- Persian: Sara Hosseini-Nezhad (سارا حسینی نژاد)
- Romanian: Orsolya Kiss
- Slovakian: Katarína Sümegiová
- Thai: Jinshana Praemcheun