Translating strings in non-core modules

Translating strings in non-core modules

by Howard Miller -
Number of replies: 5
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
(Moodle 2) - is there any mechanism for doing translations for non-core modules? I seem to recall from Moodle 1.9 and earlier that an interface was built in for this but translations now seem to have been moved out of Moodle into this AMOS thing.

Is the only thing now to build the language packs by hand or am I missing something?
Average of ratings: -
In reply to Howard Miller

Re: Translating strings in non-core modules

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

If the module is well done, you can translate it within Moodle (AMOS integrated) smile

In reply to Séverin Terrier

Re: Translating strings in non-core modules

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Hi,

I'm sorry, I don't understand what you mean. I found information about AMOS but the documentation kind of assumes rather a lot. I took it that it is some separate thing not built into moodle?? I'd never heard of it until yesterday so I'm still confused as to what it is.

This project is for a client and, unfortunately, it would be problematic to share the code or strings at this stage.
In reply to Howard Miller

Re: Translating strings in non-core modules

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
If you do not want to share the English strings, you can't use AMOS and will have to translate the module on your own. You can do so manual creation of the relevant lang files in the module scope. Eg if you want translate /mod/foobar into Czech, you can distribute it with /mod/foobar/lang/cs/foobar.php. Alternatively you can use the in-built language customization tool, translate the module locally into cs_local and then copy the created file to the module scope.

With shared plugins, the maintainer has an option to submit the English strings into AMOS. The plugin then appears as non-standard component in the AMOS interface and can be translated by anybody in the world. There is no way yet how to do it automatically so the maintainer has to contact me directly and I will put the English strings into AMOS on behalf of them. Currently mod_book is translated this way, for example. The translations are then part of ZIP packages generated by AMOS so anybody who installs the Book module, has it automatically localized (given then the module is translated in AMOS).
Average of ratings: Useful (3)
In reply to David Mudrák

Re: Translating strings in non-core modules

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi David, I'm puzzled by the meaning of "shared" in what you wrote:

"If you do not want to share the English strings, you can't use AMOS ..." and "With shared plugins, the maintainer has an option to submit the English strings into AMOS."

How do the English strings of a 3rd-party plugin become "shared"? By contacting you so you put those strings into AMOS, I suppose?

Anyway, I just noticed that the Questionnaire plugin (which I co-maintain with Mike Churchward) is present in AMOS. Maybe because I asked you to put it there, in an email dated 26-11-201.

However, I am puzzled that the AMOS filter on Questionnaire (for French) says that 294 strings are missing out of 298.sad Does this mean that AMOS does not take into account the existing translations (present in mod/questionnaire/lang/ folders and I have to copy-paste all the strings from those folders into AMOS? Why not have it automatically done?

Joseph

In reply to Joseph Rézeau

Re: Translating strings in non-core modules

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Correct. During the import, only English strings are imported. The translations can be imported from the file via the standard AMOS Stage page.

And yes, 3rd party modules that are registered in the Plugins database, can be imported into AMOS only after explicit request sent to me for now. As I said, this is to be automated in the future (so that strings are pushed from the Plugins into the AMOS every time the maintainer uploads a new version of the plugin).
Average of ratings: Useful (2)