Translation - cogstat/cogstat GitHub Wiki

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.

Preparation (this must be done only once, before you start the translation)

  • 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.

Translation:

  • Use POEditor to translate the new strings or improve previous translations: Type the new or updated string on the right.
  • New strings are often the modifications of previous strings. In those cases, you may search for fragments of the new string to see the translation of the previous version of that string.
  • If you don't know the translation, then CogStat will display the original English text.
  • Your translations will be available for the users with the new release of the software - you'll get a notification about it on our localization mailing list.

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 following them. Do not change the order of the %something part within a string.
    • A short explanation: These signs will be substituted by the software when the user runs an analysis. The final message will include some number, text, etc. instead of the %something part. If you change the %something part in your translation, then the message will not appear appropriately, or, in a worse case, the analysis will not run at all. (Because % sign is used for inserting some numbers or texts in the string, if we want to display the "%" sign, then, in the string, we use the %% characters.)
    • 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.
  • In English, when two proper nouns are used in the name of an analysis (e.g., Shapiro–Wilk), en dash (–) should be used instead of hyphen (-). See more details here. Check what rules your language follows.

Statistical terminology

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.

Discussing your translation

You may have questions about the strings to be translated, or there may be ambiguities in your translation you may want to share. Regarding a specific string, you can use the comment system in POEditor to send messages to other localizers and developers. Alternatively, if you have some general comment or question (not related to a specific string), you can use the localization mailing list.

  • All comments will be available for all languages, although the specific comment will show a flag denoting what language the comment refers to.
  • Use English language in your comment message.
  • If you are unsure about your translation of a specific string, you may leave a message in the comment, so other translators of that language may resolve the issue later.
  • If you are unsure what the original English term refers to, ask in the comment, and some of the developers will clarify the string in a response to that comment. These clarifications are very useful for translators of other languages, too, so feel free to add clarification questions.

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.py script and find the newly generated language test pdf files in the cogstat/test/test_output/ directory.

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.

Translators

See the current contributors here.

  • Arabic: Rahmeh Albursan (رحمه البرصان)
  • Bulgarian: Petia Kojouharova (Петя Кожухарова)
  • Chinese: Xiaomeng Zhu (朱晓萌)
  • Croatian: Sandra Stojić
  • Estonian: Deniss Kovaljov
  • French: Minka Petánszki
  • German: László Veller, Roman Ricardo Pota
  • Greek: Zoé Vulgarasz (Ζωή Βουλγάρα)
  • Hebrew: Tzipi Buchman
  • Hungarian: Attila Krajcsi
  • Italian: Eszter Temesvári, Roland Kasza, Andrea Bortoletti
  • Kazakh: Danagul Duisekenova (Данагуль Дуйсекенова)
  • Korean: Katalin Wild
  • Malay: Nur Hidayati Miza binti Junaidi
  • Norwegian Bokmål: Irmelin Hovland-Hegg
  • Persian: Sara Hosseini-Nezhad (سارا حسینی نژاد)
  • Romanian: Orsolya Kiss, Borbála Tölgyesi
  • Russian: Nikolay Kuzmenko (Николай Кузьменко), Danagul Duisekenova (Данагуль Дуйсекенова)
  • Slovakian: Katarína Sümegiová
  • Spanish: Borbála Zulauf, Mabel Galai
  • Thai: Jinshana Praemcheun (จิณชณา เปรมชื่น)
  • Turkish: Belma Feride Bumin