Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Moodle App Translation: Difference between revisions

From MoodleDocs
m (Noeldemartin moved page Translating the Moodle App to Moodle App Translation: Consistency)
(Clean up)
Line 1: Line 1:
{{Translation}}
{{Translation}}


==Moodle app translations==
==Moodle App translations==


The Moodle app is being translated into more and more languages! See https://moodle.org/plugins/translations.php?plugin=local_moodlemobileapp for the latest translation stats.
The Moodle App is being translated into more and more languages! Check out [https://moodle.org/plugins/translations.php?plugin=local_moodlemobileapp the latest translation stats].


==How do I translate words and phrases used in the Moodle app?==
==How do I translate words and phrases used in the Moodle App?==


To help with translating, you first need to create an account on the [http://lang.moodle.org Moodle translation site].
To help with translating, you first need to create an account on the [http://lang.moodle.org Moodle translation site].


The Moodle app strings may be found here: https://lang.moodle.org/local/amos/view.php?t=1&c=*app&m=1
Moodle App strings may be found using this filter: https://lang.moodle.org/local/amos/view.php?t=1&c=*app&m=1


Just select the desired language and '''Save the filter''' to display them.
Just select the desired language and click "Show strings" to display them.


===Advanced selection of strings===
===Advanced selection of strings===


All strings used in the App are indexed here: https://github.com/moodlehq/moodlemobile2/blob/master/scripts/langindex.json
All strings used in the app are indexed in [https://github.com/moodlehq/moodleapp/blob/master/scripts/langindex.json the langindex.json file].


Each line has the following format:
They have the following format:
* "module.stringidentifier": "component": In this case the string will be translated using the '''stringidentifier''' on the '''component''' file.
* "module.stringidentifier": "component/componentstring": In this case the string will be translated using the '''componentstring''' on the '''component''' file.


Some examples are:
* <code>"{module}.{string-identifier}": "{component}"</code> — In this case the string will be translated using the <code>{string-identifier}</code> on the <code>{component}</code> file.
* "addon.block_recentlyaccessedcourses.nocourses": "block_recentlyaccessedcourses" - Means it will use "nocourses" from block_recentlyaccessedcourses component in AMOS.
* <code>"{module}.{string-identifier}": "{component}/{component-string}"</code> — In this case the string will be translated using the <code>{component-string}</code> on the <code>{component}</code> file.
* "addon.mod_workshop.yourassessment": "workshop/assessmentbyyourself" - Means it will use "assessmentbyyourself" from workshop component in AMOS.


The component local_moodlemobileapp have the specific strings of the Moodle App, but there are most of the strings are located along the other components. To select all the Moodle App strings: '''Click on Moodle App bellow the components selector'''. This action will auto-select the following:
 
Some examples are:
 
* <code>"addon.block_recentlyaccessedcourses.nocourses": "block_recentlyaccessedcourses"</code> — This means it will use the <code>nocourses</code> translation from the <code>block_recentlyaccessedcourses</code> component in AMOS.
* <code>"addon.mod_workshop.yourassessment": "workshop/assessmentbyyourself"</code> — This means it will use the <code>assessmentbyyourself</code> string from the </code>workshop</code> component in AMOS.
 
 
The <code>local_moodlemobileapp</code> component has the specific strings of the Moodle App, but most of the strings are located in other components. To select all the Moodle App strings, click on "Moodle App" below the components selector. This action will auto-select the following:


* Last version available option (it is selected by default). The propagation to other version is done automatically.
* Last version available option (it is selected by default). The propagation to other version is done automatically.
* Components user in the App.
* Components used in the App.
* Only strings that are being used in the Moodle App: This will filter only the strings used in every component on the App.
* Only strings that are being used in the Moodle App: This will filter only the strings used in every component on the app.


Additionally you will see a little mobile icon over the strings used in the App. Rolling over it it will show the string identifier in the App.
 
Additionally, you will see a little mobile in the strings used in the app. Hovering over this icon, you can read the string identifier in the app.


==I am not a language pack maintainer. How can I contribute a translation?==
==I am not a language pack maintainer. How can I contribute a translation?==
Line 37: Line 42:
The process is the same as for core Moodle. See [[Contributing a translation]].
The process is the same as for core Moodle. See [[Contributing a translation]].


Note: Please contact the maintainer of your language pack as listed in the [http://lang.moodle.org/local/amos/credits.php Translation credits] to tell them that you are translating the Moodle App. (If you don't receive a reply within a reasonable time, contact our Moodle translation coordinator, Koen Roggemans, [mailto:translation@moodle.org translation@moodle.org].)
Note: Please contact the maintainer of your language pack as listed in the [http://lang.moodle.org/local/amos/credits.php Translation credits] to tell them that you are translating the Moodle App. If you don't receive a reply within a reasonable time, contact our Moodle translation coordinator, Koen Roggemans, at [mailto:translation@moodle.org translation@moodle.org].


==When will the translated strings be shown in the Moodle App?==
==When will the translated strings be shown in the Moodle App?==


Translations are not automatically synchronised with the app; you will have to wait to the next app release to see your latest translations.
Translations are not automatically synchronised with the app, you will have to wait to the next release to see your latest contributions.
 
==My language does not appear in the app==
 
Only some languages are available in the app, the selection is done using the following criteria:


==My language does not appear in the App==
* Over 75% of the strings used in the app are available in the language and more than 50 strings are from the <code>local_moodlemobileapp</code> component.
* Over 50% of the strings used in the app are available in the language and more than 75 strings are from the <code>local_moodlemobileapp</code> component.


Only selected languages are available in the App. The selection is done using the following criteria:
* Over 75% of the strings used in the App are available in the language and more than 50 strings are from local_moodlemobileapp component.
* Over 50% of the strings used in the App are available in the language and more than 75 strings are from local_moodlemobileapp component.


This is done to ensure translations are rich enough.
This is done to ensure translations are rich enough.


[[Category:Mobile]]
[[Category:Mobile]]

Revision as of 06:27, 8 September 2021


Moodle App translations

The Moodle App is being translated into more and more languages! Check out the latest translation stats.

How do I translate words and phrases used in the Moodle App?

To help with translating, you first need to create an account on the Moodle translation site.

Moodle App strings may be found using this filter: https://lang.moodle.org/local/amos/view.php?t=1&c=*app&m=1

Just select the desired language and click "Show strings" to display them.

Advanced selection of strings

All strings used in the app are indexed in the langindex.json file.

They have the following format:

  • "{module}.{string-identifier}": "{component}" — In this case the string will be translated using the {string-identifier} on the {component} file.
  • "{module}.{string-identifier}": "{component}/{component-string}" — In this case the string will be translated using the {component-string} on the {component} file.


Some examples are:

  • "addon.block_recentlyaccessedcourses.nocourses": "block_recentlyaccessedcourses" — This means it will use the nocourses translation from the block_recentlyaccessedcourses component in AMOS.
  • "addon.mod_workshop.yourassessment": "workshop/assessmentbyyourself" — This means it will use the assessmentbyyourself string from the workshop component in AMOS.


The local_moodlemobileapp component has the specific strings of the Moodle App, but most of the strings are located in other components. To select all the Moodle App strings, click on "Moodle App" below the components selector. This action will auto-select the following:

  • Last version available option (it is selected by default). The propagation to other version is done automatically.
  • Components used in the App.
  • Only strings that are being used in the Moodle App: This will filter only the strings used in every component on the app.


Additionally, you will see a little mobile in the strings used in the app. Hovering over this icon, you can read the string identifier in the app.

I am not a language pack maintainer. How can I contribute a translation?

The process is the same as for core Moodle. See Contributing a translation.

Note: Please contact the maintainer of your language pack as listed in the Translation credits to tell them that you are translating the Moodle App. If you don't receive a reply within a reasonable time, contact our Moodle translation coordinator, Koen Roggemans, at translation@moodle.org.

When will the translated strings be shown in the Moodle App?

Translations are not automatically synchronised with the app, you will have to wait to the next release to see your latest contributions.

My language does not appear in the app

Only some languages are available in the app, the selection is done using the following criteria:

  • Over 75% of the strings used in the app are available in the language and more than 50 strings are from the local_moodlemobileapp component.
  • Over 50% of the strings used in the app are available in the language and more than 75 strings are from the local_moodlemobileapp component.


This is done to ensure translations are rich enough.