Difference between revisions of "User:Kebap/translation infrastructure"
Jump to navigation
Jump to search
m |
(How to exclude text from translation) |
||
| (9 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | History | + | {{TOC right}} |
| + | |||
| + | == History == | ||
* https://github.com/Mudlet/Mudlet/issues/856 - Setup a web-based translation service for Mudlet | * https://github.com/Mudlet/Mudlet/issues/856 - Setup a web-based translation service for Mudlet | ||
* https://github.com/Mudlet/Mudlet/issues/1664 - Translation infrastructure of Mudlet web-presences | * https://github.com/Mudlet/Mudlet/issues/1664 - Translation infrastructure of Mudlet web-presences | ||
| − | Main sources of text | + | == Main sources of text == |
* Mudlet client itself | * Mudlet client itself | ||
| Line 12: | Line 14: | ||
| − | Processes for each | + | == Processes for each == |
# Find out a way to tell outdated texts from relevant current texts which need translation. | # Find out a way to tell outdated texts from relevant current texts which need translation. | ||
| Line 26: | Line 28: | ||
| − | References | + | == References == |
| − | * Another great in-depth look at several alternatives and the process in general in this master study thesis about “Translations in libre software”: https:// larjona.wordpress.com/translations-in-libre-software/ | + | * Another great in-depth look at several alternatives and the process in general in this master study thesis about “Translations in libre software”: https://larjona.wordpress.com/translations-in-libre-software/ |
| − | * multilingual plugins for Wordpress: https:// wordpress.org/plugins/search/multilingual | + | * multilingual plugins for Wordpress: https://wordpress.org/plugins/search/multilingual |
| − | ** Polylang: https:// wordpress.org/plugins/polylang/ | + | ** Polylang: https://wordpress.org/plugins/polylang/ |
* Wordpress internationalisation workflow | * Wordpress internationalisation workflow | ||
** http://www.cardinalpath.com/multilingual-wordpress-international-seo/ | ** http://www.cardinalpath.com/multilingual-wordpress-international-seo/ | ||
| Line 36: | Line 38: | ||
** Mediawiki | ** Mediawiki | ||
** Github | ** Github | ||
| + | * Notes from other translation efforts | ||
| + | ** https://www.mediawiki.org/wiki/Localisation | ||
| + | ** https://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_example | ||
| + | ** https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle | ||
| + | * Instructions from other project's translations: | ||
| + | ** https://manual.cgeo.org/en/translation | ||
| + | |||
| + | |||
| + | == Decisions == | ||
| + | |||
| + | * We want to use US English in the source. Sometimes it is still en/GB - e.g. "licence/license", "color/colour", etc. SlySven will provide a dedicated en/GB translation, but origin will be en/US | ||
| + | * When a language offers multiple choices on how to address the reader, we will choose the less formal, more friendly way | ||
| + | * Some texts can't be translated easily in Crowdin, as they are surrounded by < and > for example. This needs to be adjusted in source. See [https://github.com/Mudlet/Mudlet/pull/1804 PR #1804] for example and possible solution. | ||
| + | ** Some IRC texts start with ! or alike symbols which must not be translated. Compare above solution. | ||
| + | |||
| + | |||
| + | == Updating input strings for translation == | ||
| + | |||
| + | * Using Qt Linguist: http://doc.qt.io/qt-5/qtlinguist-index.html | ||
| + | * command will pull strings from Mudlet client's sources and put into mudlet.ts | ||
| + | * command is: lupdate.exe -recursive .\src\ -ts .\translations\mudlet.ts | ||
| + | * lupdate is available during [[Compiling_Mudlet#Compiling_on_Windows_7.2B|Windows compilation]] in this folder: C:\Qt\5.11.0\mingw53_32\bin\ | ||
| + | |||
| + | |||
| + | == Review progress on each language == | ||
| + | * Crowdin offers statistics in settings, counting translation percentage of ''words'' | ||
| + | * Whereas Mudlet counts percentage of ''strings'' and languages >95% receive a gold star | ||
| + | * How to review the progress of current Crowdin translations: | ||
| + | ** Open PR "new Crowdin translation" created automagically by integration robots ([https://github.com/Mudlet/Mudlet/pull/2429 Example]) | ||
| + | ** Open information from automatic Travis CI build, for example Linux gcc qmake ([https://travis-ci.org/Mudlet/Mudlet/jobs/515693306 Example]) | ||
| + | ** Find lines starting like "Project MESSAGE: Building translations" and see statistics following ([https://travis-ci.org/Mudlet/Mudlet/jobs/515693306#L1380 Example]) | ||
| + | |||
| + | Example progress snapshot from 2019-04: | ||
| + | <syntaxhighlight lang="lua"> | ||
| + | Project MESSAGE: Building translations | ||
| + | lang trnsl utrnsl finish unfin total percentage | ||
| + | de_DE 1863 28 1863 0 1891 98 | ||
| + | el_GR 0 1891 0 0 1891 0 | ||
| + | en_GB 403 1488 403 0 1891 21 | ||
| + | es_ES 735 1156 735 0 1891 38 | ||
| + | fr_FR 150 1741 150 0 1891 7 | ||
| + | it_IT 809 1082 809 0 1891 42 | ||
| + | nl_NL 45 1846 45 0 1891 2 | ||
| + | pl_PL 514 1377 514 0 1891 27 | ||
| + | pt_PT 260 1631 260 0 1891 13 | ||
| + | ru_RU 1686 205 1684 2 1891 89 | ||
| + | zh_CN 961 930 961 0 1891 50 | ||
| + | zh_TW 0 1891 0 0 1891 0 | ||
| + | en_US 11 0 11 0 11 100 | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | == How to exclude text from translation == | ||
| + | |||
| + | * In .cpp files, do not use tr() function. Easy. | ||
| + | * In .ui files, change the opening <code><string></code> tags of the elements to <code><string notr="true"></code> | ||
| + | ** Or click in QtDesigner like this: https://github.com/Mudlet/Mudlet/pull/2481#pullrequestreview-221930644 | ||
Latest revision as of 08:32, 5 April 2019
History
- https://github.com/Mudlet/Mudlet/issues/856 - Setup a web-based translation service for Mudlet
- https://github.com/Mudlet/Mudlet/issues/1664 - Translation infrastructure of Mudlet web-presences
Main sources of text
- Mudlet client itself
- Mudlet website
- Mudlet wiki
- "other" spontaneus texts need to be included manually
Processes for each
- Find out a way to tell outdated texts from relevant current texts which need translation.
- Get texts out of sources (see above). Can this be automated with any tool? Who should be responsible?
- Get texts in to translation tool.
- Translating inside tool (ok this is to be expected, but also needs good interface and workflows)
- Translators report confusing strings back to Mudlet team with information how they need to be adjusted.
- Mudlet team updates text in source. Either because of reports, or because of natural evolution.
- Updated texts from source need updates in translation tool. Export and import again, plus diff.
- Translated texts will be finished. Export them from translation tool. Automation again?
- Import translated text to source.
- Display of translations in source. Here we will need some sort of language toggle switch in each source.
References
- Another great in-depth look at several alternatives and the process in general in this master study thesis about “Translations in libre software”: https://larjona.wordpress.com/translations-in-libre-software/
- multilingual plugins for Wordpress: https://wordpress.org/plugins/search/multilingual
- Polylang: https://wordpress.org/plugins/polylang/
- Wordpress internationalisation workflow
- integration to Crowdin
- Mediawiki
- Github
- Notes from other translation efforts
- Instructions from other project's translations:
Decisions
- We want to use US English in the source. Sometimes it is still en/GB - e.g. "licence/license", "color/colour", etc. SlySven will provide a dedicated en/GB translation, but origin will be en/US
- When a language offers multiple choices on how to address the reader, we will choose the less formal, more friendly way
- Some texts can't be translated easily in Crowdin, as they are surrounded by < and > for example. This needs to be adjusted in source. See PR #1804 for example and possible solution.
- Some IRC texts start with ! or alike symbols which must not be translated. Compare above solution.
Updating input strings for translation
- Using Qt Linguist: http://doc.qt.io/qt-5/qtlinguist-index.html
- command will pull strings from Mudlet client's sources and put into mudlet.ts
- command is: lupdate.exe -recursive .\src\ -ts .\translations\mudlet.ts
- lupdate is available during Windows compilation in this folder: C:\Qt\5.11.0\mingw53_32\bin\
Review progress on each language
- Crowdin offers statistics in settings, counting translation percentage of words
- Whereas Mudlet counts percentage of strings and languages >95% receive a gold star
- How to review the progress of current Crowdin translations:
Example progress snapshot from 2019-04:
Project MESSAGE: Building translations
lang trnsl utrnsl finish unfin total percentage
de_DE 1863 28 1863 0 1891 98
el_GR 0 1891 0 0 1891 0
en_GB 403 1488 403 0 1891 21
es_ES 735 1156 735 0 1891 38
fr_FR 150 1741 150 0 1891 7
it_IT 809 1082 809 0 1891 42
nl_NL 45 1846 45 0 1891 2
pl_PL 514 1377 514 0 1891 27
pt_PT 260 1631 260 0 1891 13
ru_RU 1686 205 1684 2 1891 89
zh_CN 961 930 961 0 1891 50
zh_TW 0 1891 0 0 1891 0
en_US 11 0 11 0 11 100
How to exclude text from translation
- In .cpp files, do not use tr() function. Easy.
- In .ui files, change the opening
<string>tags of the elements to<string notr="true">- Or click in QtDesigner like this: https://github.com/Mudlet/Mudlet/pull/2481#pullrequestreview-221930644