Difference between revisions of "Translation How-To"
Haaihenkie (talk | contribs) (→Online or offline translation?) |
Haaihenkie (talk | contribs) (→Online or offline translation?) |
||
Line 37: | Line 37: | ||
|- | |- | ||
|More information and tools to support translation: | |More information and tools to support translation: | ||
− | glossary, machine translation, review flags, comments, history | + | glossary, machine translation, review flags, comments, history |
+ | |You do not need Internet during translation | ||
|} | |} | ||
Revision as of 07:26, 17 August 2016
This page will give you all the information you need to translate Freeplane into your own language.
Contents
- 1 Freeplane GUI translation and improvement
- 1.1 Tools: Weblate and (soon to come) Freeplane translation editor
- 1.2 Online translation
- 1.3 Offline translation (soon to come)
- 1.4 New tool tips (soon to come)
- 1.5 Change English source strings
- 1.6 Collaborate to translate to your native language
- 1.7 Frequently Asked Questions / Tips for translators
- 2 Translation of Freeplane add-ons
- 3 Translation of third party tool used in Freeplane
- 4 Translation of Tutorial or Documentation maps
- 5 Keys Mapping translation
- 6 Java Help translation
Freeplane GUI translation and improvement
This How-To section describes the tools and (alternative) processes for Freeplane GUI translation. This translation concerns all the strings displayed in Freeplane program, especially in menus and dialogs.
English is the source language for all translations, so you need to know English to be a translator.
UI designers need to be able to improve the UI by improving the existing source English strings and by adding new tool tips. Since they use the same tools and almost the same processes, these processes are also described here.
Tools: Weblate and (soon to come) Freeplane translation editor
Weblate
Since version 1.3.x Freeplane uses a collaborative web based translation tool developed by Michal Čihař. For all described processes the translations are entered or imported in Weblate (except for new tool tips which are merged directly into git). From Weblate all new and changed are committed to the Freeplane git release branch. Weblate stays in sync with the Freeplane git release branche, so any committed new tool tip or other new translation key and its English source string are immediately available for translation in Weblate. With every new Freeplane release the current state of the Freeplane translation in Weblate is also released.
Since all the translations go via Weblate, as a translator or UI designer you need to register for the Freeplane Weblate project. Also you need to get yourself familiar with Weblate functionality, so take a look at the Weblate translator guide and keep it as a reference. Some of the functionality will be highlighted in this How-To.
If you find a bug on the Weblate tool, you can report them here.
Freeplane translation editor (soon to come)
The Freeplane translation editor is a tool for translators and UI designers that is available in the Freeplane GUI. It appears when you press Crtr+Shift+F10 while your mouse is hovering above the text string you would like to translate. It shows a translation window for the text string and, if applicable, the tool tip belonging to the text string. You can choose to do one of 2 things. You can choose to translate in the translation window itself (i.e. offline translation). When you close Freeplane, all translated items are stored in a local file: <fpuserdir>/1.5.x/UserResources_xx.properties, that can be uploaded to Weblate. Or you can choose to press the Weblate button. This takes you straight to Weblate page where you can translate the selected string online.
The translation editor does not work for all GUI text strings. In that case the message "No translateable string found" appears in the bottom-left corner of the Freeplane Window.
Online or offline translation?
In the following 2 paragraphs it is explained in detail how these 2 tools work together in online or offline translation. Both ways have advantages over the other.
Online translation | Offline translation |
---|---|
Easy to collaborate | Fast |
Automatically work on the most current translation | You immediately can check the result or your translation in the Freeplane UI |
More information and tools to support translation:
glossary, machine translation, review flags, comments, history |
You do not need Internet during translation |
When to use online or offline translation depends on what you have to do, your circumstances and the preferences of you and your co-translators. Here are a few examples
Online translation | Offline translation |
---|---|
When you have to improve existing translations | When you have to translate untranslated items |
When you translate a few items from time to time | When you want to and are able to translate a lot of items in a short time |
When you need to collaborate with other translators for your language | When you are the only translator for a language |
When the quality of translation is more important | When the speed of translation is more important |
Online translation
Submit your FreePlane translations here.
How to test your Weblate translations:
- https://hosted.weblate.org/projects/freeplane/translation/
- choose <language>
- choose Files
- click "Download", save freeplane-translation-<lang>.properties
- copy freeplane-translation-<lang>.properties to <fpuserdir>/1.5.x/resources/translations/Resources_<lang>.properties
- restart Freeplane
Offline translation (soon to come)
New tool tips (soon to come)
The translator editor has also functionality for UI Designers to add new tool tips in order to improve the user interface. Translators can recognise these new tool tips by the fact that the entry field in translator editor is disabled or by the fact the Weblate button does not find any entry. A translator can enable the translation of a tool tip by taking over the role of the UI designer. It requires the translator to submit an English source string before the actual translation can start. It also requires an developer to add the new translation key and source string to Weblate, so enabling is not an instant action. Below a detail description of the different processes with regard to new tool tips.
UI designer process
This process is for new tool tips only. If you want to improve the source string of existing tool tips follow the regular process to change source strings.
- Check if there is any open "New tool tips" bug report. If so, wait till they are all closed and Weblate is up to date. If not, you might repeat your own work or overwrite your co-designers work.
- If the Freeplane language is other than English, change it to English in Preferences
- Close Freeplane
- Remove <fpuserdir>/1.5.x/UserResources_en.properties to prevent submitting the same new tool tips
- Download the English source through menu "Files > Download original translation file (Java Properties(ISO-8859-1))" from https://hosted.weblate.org/projects/freeplane/translation/en/. Save it as <fpuserdir>/1.5.x/viewer-resources/translations/Resources_en.properties. In this way your local source strings are up to date.
- Start Freeplane
- Hoover over the item you would like to add a tool tip to. If there is already a tool tip, skip the item. If not, press Ctrl+Shift+F10
- Enter the text for the tool tip (the bottom field) and press OK.
- Repeat the last 2 steps till you have finished what you had planned
- Close Freeplane
- Create a new [bug report](https://sourceforge.net/p/freeplane/bugs/) titled "New tool tips" and attach <fpuserdir>/1.5.x/UserResources_en.properties
- If necessary, change Freeplane back to the original language.
Translator process
If you want to enable translation for a certain tool tip, you should follow the following steps.
- Hoover over the item with the disabled tool tip and press Ctrl+Shift+F10.
- Press the Weblate button. If the translation key is present in Weblate, you can continue with normal online translation. For the offline translation process continue with that section below. If no translation key is present, continue with the next step
- Follow the steps of the UI designer process
- When the "New tool tips" bug report is closed, continue with online translation. For offline translation process continue with that section below.
Offline translation process for new tool tips
This is the same as the normal offline translation process, except that you need to update the English source strings to enable the new tool tip fields:
- Download the English source through menu "Files > Download original translation file (Java Properties(ISO-8859-1))" from https://hosted.weblate.org/projects/freeplane/translation/en/. Save it as <fpuserdir>/1.5.x/viewer-resources/translations/Resources_en.properties. In this way your local source strings are up to date.
Change English source strings
Collaborate to translate to your native language
Communication by comments and review flags in Weblate
Consistent translation by using a glossary
Communication through the Freeplane
If you feel the need to discuss translations to your native tongue you can do so in your native language on the forum. Always search if there is already a thread for your language. Here is is an incomplete list of forum threads and pages related to the translation to different languages.
French / Français
You can have a look at:
Flemish/Dutch / Nederlands/Vlaams
- You can consult Translation nl for general guidelines
- Your can post your questions, remarks and requests in this thread
- This is an old thread on Dutch documentation
Frequently Asked Questions / Tips for translators
- While running Freeplane, why are some strings ending with "[translate me]"?
- As long as a key is missing in a translation, Freeplane automatically uses "<English text> [translate me]" as translation. Translators should translate these strings in priority and then remove "[translate me]".
- Why are strings ending with "[auto]"?
- Translation files can be submitted to an automatic translation tool, then strings of type "<English text> [translate me]" becomes strings of type "<local language text> [auto]". Translators should search and review these strings and then remove "[auto]".
- Why is there sometimes space before values?
- spaces before values are ignored, don't care.
- Why is there & character before some values (sometimes "in" the words)?
- the ampersand (&) is used to mark keys in the menu (i.e. open the menu, press the key/letter to activate the menu entry) - while translating, you need to make sure that each letter is only used once per menu.
- Some values begins by <html> with no </html> at the end?
- Java accepts unclosed tags - don't care.
- Some keys are not used / displayed in the software
- you should stay aligned with the English version to be on the safe side, but if keys are not used, it's a bug you can report it here.
- When testing Freeplane with my translation file, some menus are missing or some buttons have no label, why?
- If you leave any empty keys in the file, Freeplane assumes they are valid translations and displays nothing. There are differences between "empty key in the translation file" which displays nothing and "missing key in the translation file" which displays "<English text> [translate me]" (see above).
- Your translation is truncated
- If your translation is truncated when displayed, it may contains a ' (apostrophe) character (e.g. Freeplane displays "Copier l" instead of "Copier l'identifiant"), you may simply enter the ' character twice (ie "Copier l"identifiant") as translation, where " is twice the character '. Most of the time, ' apostrophe characters should be handled as in the English version (for some strings which are used in format statements put them twice, for other strings put them once).
Translation of Freeplane add-ons
Add-ons manage their translations on their own, i.e. the translations are integrated into the add-on sources. Nevertheless, it's simple to translate an add-on by editing the add-on installation package in Freeplane and modifying the translations therein. If the translations contain non-ASCII characters you have to encode the text using a script, either from the Developer Tools (since version 0.9.16) or from here.
Translation of third party tool used in Freeplane
JOrtho spell checker
For spell check Freeplane relies on JOrtho project. JOrtho translation file contains very few strings and only 5 are used in Freeplane but if you want to translate this file too, you can get it at its current location.
Translation of Tutorial or Documentation maps
These are the mind maps you get when you press Help → Tutorial (freeplaneTutorial.mm) and Help → Documentation (freeplane.mm).
Basic steps
- Create a working directory myTranslations.
- Copy the most recent English documentation from http://freeplane.sourceforge.net/mapsOnline. For this choose Help > Documentation Maps Online and select the map of your choice; or copy your last translation.
- make a subdirecory structure for images: myTranslations/doc; (if you use these, also myTranslations/mouse and myTranslations/key).
- Copy images you reuse or put new images you use in myTranslations.doc (possibly also myTranslations/mouse and myTranslations/key).
- Edit your translation. Drag your images from the defined subdirectories into your translation (assuming URI's are relative).
- Test the translation, in particular the images.
- Zip directory myTranslations.
- Select Help > report a bug, select new report of type translation and upload the zip file.
Note Check Help > Documentation Maps Online > indexMap > Images/doc for the images used in the present doc mind maps.
Old
- Download the latest version of freeplane.mm and FP_MenuReference.mm (or an already existing versions in your language) from the repository.
- The current link is https://github.com/freeplane/freeplane/tree/master/freeplane/resources/translations/ (but check if it's not an outdated link)
- Visit pages http://freeplane.sourceforge.net/doc/freeplane_all_languages.html and http://freeplane.sourceforge.net/doc/FP_MenuReference_all_languages.html to see how the documentation is automaticly translated by Google Translate.
- Using the latest development version of Freeplane, just create a map in your language (or complete the one already existing).
- As it's almost impossible to track differences between maps and ensure an exact one to one relationship between the languages, we don't expect this from translators.
- To track changes of freeplane.mm filters can be useful: Open the file in normal mindmap mode (not via F1) and apply a "Date filter" with the modification time set to the last time you have edited the translated map.
- Just make sure that the map is consistent with the current version of Freeplane, as complete as possible and helpful to users.
- Go to the tracker (requires Sourceforge log-in) and upload your map (the Project should be set to Translations).
Keys Mapping translation
TBD
Java Help translation
TBD (the current version doesn't allow for localization). Hint for later: http://jhelpdev.sourceforge.net/