Difference between revisions of "Translating Mudlet"

From Mudlet
Jump to navigation Jump to search
(Add mobile translation)
(Add Arabic plural as example)
 
(17 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
<languages/>
 
{{TOC right}}
 
{{TOC right}}
<languages/>
+
<translate><!--T:1--> Thanks for helping translate Mudlet to your language! Mudlet is a free, open-source project and helping it speak your language means a lot to us. :)</translate>
<translate>Thanks for helping translate Mudlet to your language! Mudlet is a free, open-source project and helping it speak your language means a lot to us. :)</translate>
 
  
<translate>== How to start? ==</translate>
+
<translate>== How to start? == <!--T:2--></translate>
 
<translate>
 
<translate>
 +
<!--T:3-->
 
* Go to [https://crowdin.com/project/mudlet Mudlet on Crowdin]
 
* Go to [https://crowdin.com/project/mudlet Mudlet on Crowdin]
 
* Select the language you'd like to translate.
 
* Select the language you'd like to translate.
 
* Log in
 
* Log in
 
* Select '''development - translations - mudlet.ts'''
 
* Select '''development - translations - mudlet.ts'''
[[File:Mudlet-translation-file.png|thumb]]
+
[[File:Mudlet-translation-file.png|thumb|Choose ''mudlet.ts'' file to see a list of all translatable text from Mudlet.]]
 
* Start translating!
 
* Start translating!
 
</translate>
 
</translate>
  
<translate>== What happens then? ==</translate>
+
<translate>== How to test my translation? == <!--T:4--></translate>
  
<translate>Since [https://www.mudlet.org/2018/10/3-14-stickmud-discord-languages-and-copy-as-image/ Mudlet version 3.14] it is now possible to run Mudlet with the new translations. Your translations are regularly collected as preparation to use as soon as a new Mudlet version gets ready for release. This way, we can continuously improve Mudlet with more and more languages available.</translate>
+
<translate><!--T:5--> [https://github.com/mudlet/mudlet/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+%22new+crowdin+updates%22 Go here] and click on 'New Crowdin updates'. You can then download a test version of Mudlet that has your latest translations.</translate>
  
 
== How to get a gold star? ==
 
== How to get a gold star? ==
  
Translating a language above 95% will earn it a gold star.
+
Translating a language above 95% will earn it a gold star. If a language has a gold start, Mudlet will automatically use it for a new player first time they open it!
  
[[File:Translation Star.png|frame|in this example, the bar is at 30%, but real Mudlet has it at 95%]]
+
[[File:Translation Star.png|frame|In Mudlet general preferences, golden star means 95%+ translated]]
  
 
== Can I translate on my phone? ==
 
== Can I translate on my phone? ==
Line 32: Line 33:
 
* Click Context to always display information on where the current string is used exactly. Sometimes you can even see screenshots here for comparison.
 
* Click Context to always display information on where the current string is used exactly. Sometimes you can even see screenshots here for comparison.
  
<translate>== Other translations needed? ==</translate>
+
<translate>== Other translations needed? == <!--T:6--></translate>
 +
 
 +
<translate><!--T:7--> Below the file mentioned above, you can find more content from Mudlet website and wiki. For example, international users want to read new release notes or documentation for specific Mudlet functionality, at best in their own language.</translate>
 +
 
 +
=== Translating Mudlet Wiki ===
 +
 
 +
:Mudlet Wiki supports making translations locally, within the Wiki software.  While this option is enabled to help translation of content that contains Wiki-specific markup, it is not encouraged to make translations using the Wiki. 
 +
 
 +
:All translations made directly on the Wiki are highly likely to be erased when automation imports translation data from the Crowdin project! 
 +
 
 +
:If you make translations using the Mudlet Wiki interface, please copy those translations to the appropriate file in Crowdin.
 +
 
 +
<translate>== How to coordinate? == <!--T:8--></translate>
 +
 
 +
<translate><!--T:9--> A simple chat functionality exists in Crowdin: You can comment on each text separately. This way, you can also give feedback to Mudlet developers. </translate>
 +
 
 +
<translate><!--T:10--> However, if you want to coordinate more thoroughly, please feel free to join us on [https://www.mudlet.org/contact/ Discord] or in [https://forums.mudlet.org/viewforum.php?f=14 Mudlet's international forum]. Doing that, you can easily establish a more permanent contact with other translators and continue from there.</translate>
 +
 
 +
== Fixing source text ==
 +
 
 +
Sometimes you might find a typo or an error in the source text! To fix it, do the following:
 +
 
 +
# Go to https://github.com/Mudlet/Mudlet and search for the typo you'd like to fix - in this example, '''extention'''.
 +
 
 +
[[File:Find typo in Mudlet.png|500px|border]]
 +
 
 +
# Click on the file you'd like to edit.
 +
 
 +
[[File:Select file to edit.png|500px|border]]
 +
 
 +
# Select the <code>development</code> branch.
 +
 
 +
[[File:Select development branch.png|500px|border]]
 +
 
 +
# And then click the <Code>Edit this file</code> button.
 +
 
 +
[[File:Hit edit file button.png|500px|border]]
 +
 
 +
# Edit the typo (1), give your fix a name (2), as well as a machine-friendly name (3) and hit Commit changes (4)
 +
 
 +
[[File:Make the edit.png|500px|border]]
  
<translate>Below the file mentioned above, you can find more content from Mudlet website and wiki. For example, international users want to read new release notes or documentation for specific Mudlet functionality, at best in their own language.</translate>
+
# Lastly, open a pull request to integrate your changes - you can re-use the same title (1) as the overview (2), put in the reasion (3) and finally hit the green (4) button to submit your change!
  
<translate>== How to coordinate? ==</translate>
+
[[File:Commit changes.png|500px|border]]
  
<translate>A simple chat functionality exists in Crowdin: You can comment on each text seperately. This way, you can also give feedback to Mudlet developers. </translate>
+
== Special notes on separate translations ==
  
<translate>However, if you want to coordinate more thoroughly, please feel free to join us on [https://www.mudlet.org/contact/ Discord] or in [https://forums.mudlet.org/viewforum.php?f=14 Mudlet's international forum]. Doing that, you can easily establish a more permanent contact with other translators and continue from there.</translate>
+
=== Plural forms in (American) English ===
  
== Special notes on seperate translations ==
+
{{Note}} This section is for Mudlet developers only :)
  
=== English (American) translation ===
+
The plural forms in Mudlet's original American English texts need to be handled internally, as the CrowdIn system does not allow for this as a special case where one target locale only contains the plural form whereas the remainder of the source texts are in the required language already. The translation file thus consists only of translations that contain a '''numerus''' (quantity-dependent) translation where the source text varies depending on a quantity.
  
This is a special case that is handled internally as the CrowdIn system does not allow for one target locale to only contain the plural form when the remainder of the source texts are in the required language already.  The translation file thus consists only of translations that contain a '''numerus''' (quantity-dependent) translation where the source text varies depending on a quantity, e.g. "You have just destroyed %n room(s)...!". In English this means that there are two plural forms one for the single (one room) case and the other for all other quantities (many or no rooms). For this example text it would require the two translations "You have just destroyed a room...!" and "You have just destroyed %n rooms...!".
+
Example: The text "You have just destroyed %n room(s)...!" in English needs two plural forms: One for the can of "one" single room, and the other for all "other" quantities (many or no rooms). Therefore this text would require two translations "You have just destroyed a room...!" and "You have just destroyed %n rooms...!".
  
''N.B. Others language have other variations (for instance French uses an additional "s" for the zero case, as well as the more than one, one; on the other hand Japanese has only one form for all quantities, in comparison Russian has a more complex systems with three variations, see [https://doc.qt.io/qt-5/i18n-plural-rules.html Translation Rules for Plurals] for the details).''
+
Other languages may have more or other cases than the English "one" and "others". For instance Japanese has only one form for all quantities. On the other hand French doesn't use an additional "s" in the "zero" case. In comparison Russian has a more complex system with three cases, and Arabic even differentiates between six different plural cases: Zero, One, Two, Few, Many and Other. See [https://doc.qt.io/qt-5/i18n-plural-rules.html Qt: Translation Rules for Plurals] for more details.
  
For the ''developer'' who is in the root of the source code, (ensure you are using the latest version you can of the following Qt utilities):
+
To add these translations as a ''developer'' when you have added or modified a source string with an ''%n'' and a third, integer, argument to a ''QObject::tr(translatable string, comment string, count)'' method call:
: <code>lupdate -pluralonly ./src/ -ts ./translations/translated/mudlet_en_US.ts</code> will ensure the translation file is up to date {unfortunately, versions prior to Qt 5.12.2 will be unhappy about C++11 raw string literals}, the <code>-recursive</code> option is not needed as it is the default.
+
# Ensure you are using the latest version you can of the following Qt utilities
: <code>linguist ./translations/translated/mudlet_en_US.ts</code> will allow editing the translation for this locale.
+
# Move to the root of Mudlet's source code
: the resulting file will then be converted into the binary <code>./translations/translated/mudlet_en_US.qm</code> file to be included into the main Mudlet resources along with the other translations when the project is next compiled.
+
# Ensure the translation file is up to date: <code>lupdate -locations absolute -pluralonly ./src/ ./3rdparty/dblsqd/dblsqd ./3rdparty/edbee-lib/edbee-lib -ts ./translations/translated/mudlet_en_US.ts</code>
 +
# Edit the translation for this locale: <code>linguist ./translations/translated/mudlet_en_US.ts</code>
 +
# Fill in (and accept!) the translations - you do not have to leave the %n in the translated texts for the singular case, but the tool may moan slightly about it not being there...
 +
The resulting translations will then be converted into the binary file <code>./translations/translated/mudlet_en_US.qm</code> to be included into the main Mudlet resources along with the other translations when the project is next compiled.

Latest revision as of 19:23, 25 January 2022

Other languages:
Deutsch • ‎English • ‎Nederlands • ‎Türkçe • ‎français • ‎italiano • ‎polski • ‎suomi • ‎Ελληνικά • ‎русский • ‎العربية • ‎한국어

Thanks for helping translate Mudlet to your language! Mudlet is a free, open-source project and helping it speak your language means a lot to us. :)

How to start?

  • Go to Mudlet on Crowdin
  • Select the language you'd like to translate.
  • Log in
  • Select development - translations - mudlet.ts
Choose mudlet.ts file to see a list of all translatable text from Mudlet.
  • Start translating!

How to test my translation?

Go here and click on 'New Crowdin updates'. You can then download a test version of Mudlet that has your latest translations.

How to get a gold star?

Translating a language above 95% will earn it a gold star. If a language has a gold start, Mudlet will automatically use it for a new player first time they open it!

In Mudlet general preferences, golden star means 95%+ translated

Can I translate on my phone?

Yep! Crowdin's translation interface is mobile-friendly. Kill some commute time by helping translate!

Suggested settings in Crowdin

  • In options, hide html code, so it will display shortened as <1> and </1> for example.
  • Click Context to always display information on where the current string is used exactly. Sometimes you can even see screenshots here for comparison.

Other translations needed?

Below the file mentioned above, you can find more content from Mudlet website and wiki. For example, international users want to read new release notes or documentation for specific Mudlet functionality, at best in their own language.

Translating Mudlet Wiki

Mudlet Wiki supports making translations locally, within the Wiki software. While this option is enabled to help translation of content that contains Wiki-specific markup, it is not encouraged to make translations using the Wiki.
All translations made directly on the Wiki are highly likely to be erased when automation imports translation data from the Crowdin project!
If you make translations using the Mudlet Wiki interface, please copy those translations to the appropriate file in Crowdin.

How to coordinate?

A simple chat functionality exists in Crowdin: You can comment on each text separately. This way, you can also give feedback to Mudlet developers.

However, if you want to coordinate more thoroughly, please feel free to join us on Discord or in Mudlet's international forum. Doing that, you can easily establish a more permanent contact with other translators and continue from there.

Fixing source text

Sometimes you might find a typo or an error in the source text! To fix it, do the following:

  1. Go to https://github.com/Mudlet/Mudlet and search for the typo you'd like to fix - in this example, extention.

Find typo in Mudlet.png

  1. Click on the file you'd like to edit.

Select file to edit.png

  1. Select the development branch.

Select development branch.png

  1. And then click the Edit this file button.

Hit edit file button.png

  1. Edit the typo (1), give your fix a name (2), as well as a machine-friendly name (3) and hit Commit changes (4)

Make the edit.png

  1. Lastly, open a pull request to integrate your changes - you can re-use the same title (1) as the overview (2), put in the reasion (3) and finally hit the green (4) button to submit your change!

Commit changes.png

Special notes on separate translations

Plural forms in (American) English

Note Note: This section is for Mudlet developers only :)

The plural forms in Mudlet's original American English texts need to be handled internally, as the CrowdIn system does not allow for this as a special case where one target locale only contains the plural form whereas the remainder of the source texts are in the required language already. The translation file thus consists only of translations that contain a numerus (quantity-dependent) translation where the source text varies depending on a quantity.

Example: The text "You have just destroyed %n room(s)...!" in English needs two plural forms: One for the can of "one" single room, and the other for all "other" quantities (many or no rooms). Therefore this text would require two translations "You have just destroyed a room...!" and "You have just destroyed %n rooms...!".

Other languages may have more or other cases than the English "one" and "others". For instance Japanese has only one form for all quantities. On the other hand French doesn't use an additional "s" in the "zero" case. In comparison Russian has a more complex system with three cases, and Arabic even differentiates between six different plural cases: Zero, One, Two, Few, Many and Other. See Qt: Translation Rules for Plurals for more details.

To add these translations as a developer when you have added or modified a source string with an %n and a third, integer, argument to a QObject::tr(translatable string, comment string, count) method call:

  1. Ensure you are using the latest version you can of the following Qt utilities
  2. Move to the root of Mudlet's source code
  3. Ensure the translation file is up to date: lupdate -locations absolute -pluralonly ./src/ ./3rdparty/dblsqd/dblsqd ./3rdparty/edbee-lib/edbee-lib -ts ./translations/translated/mudlet_en_US.ts
  4. Edit the translation for this locale: linguist ./translations/translated/mudlet_en_US.ts
  5. Fill in (and accept!) the translations - you do not have to leave the %n in the translated texts for the singular case, but the tool may moan slightly about it not being there...

The resulting translations will then be converted into the binary file ./translations/translated/mudlet_en_US.qm to be included into the main Mudlet resources along with the other translations when the project is next compiled.