## Using AMOS tool for language pack translation

### How to identify words that must NOT be translated inside all strings

How to identify words that must NOT be translated inside all strings
Hi,
I am worried that I might not have been constant when translating/not-translating some English words (fieldnames) that I guess are used for teacher/admin input into Moodle and MUST be written exactly the same as they are in English in all language packs.

For example, let's take  the DEV version of uploadcohorts_help in core_cohort:

Cohorts may be uploaded via text file. The format of the file should be as follows:

* Each line of the file contains one record
* Each record is a series of data separated by commas (or other delimiters)
* The first record contains a list of fieldnames defining the format of the rest of the file
* Required fieldname is name
* Optional fieldnames are idnumber, description, descriptionformat, visible, context, category, category_id, category_idnumber, category_path

I guess that the words "name, idnumber, description, descriptionformat, visible, context, category, category_id, category_idnumber, category_path" are all fieldnames that should all be kept in English for all language packs. Am I correct?

If so, Would it be possible/desirable to have a clear English strings sintax to notice words (fieldnames) that must NOT be translated (eg, %example%), so that over-zealous  translators would be less prone to accidentally translate them into their own language?

Or, alternatively, can we make a list of all such words, so that all translators can quickly check if they have treated these words correctly?

Or, as in the string above, all all those words clearly identifiable as 'fieldname'?

Or, maybe I am just wrong and all the words in the above string can, and must, be fully translated, and Moodle would work just as well as the English version ?

Re: How to identify words that must NOT be translated inside all strings

They are fieldnames. In general, when translating names, it should ring a bell. These names are hooks that are used in the software. You should not translate them.

In case of doubt, ask or use a test server.

Re: How to identify words that must NOT be translated inside all strings

I don't think it is easy to come with a syntax convention that would help with this. If nothing else, it will still be a convention and there would be nothing to force Moodle contributors (both developers and translators sides) to follow it. And honestly, it would be like item number #421 on the list of things to be aware of when programming for Moodle ...

Generally, translating Moodle requires to understand the features. Attempting to translate a string without knowing the context and/or the feature will always be risky.

However, there is a space for improvements for sure. I would like to have more automatic checkers in AMOS that look at the English original and the translations and inform the maintainers about things like missing or misspelled {\$a} placeholders etc. We could then add a check for the presence of these hard-coded English words, too.

Can you please open a feature request in the tracker so that this is not forgotten? Thanks.

Re: How to identify words that must NOT be translated inside all strings

Thanks Koen and David.

I just updated Moodle DEV Docs at https://docs.moodle.org/dev/Translation_FAQ#All_fieldnames_must_be_kept_in_English .

I will try to add an issue in the tracker about it.

Re: How to identify words that must NOT be translated inside all strings

Thanks German. Looks good!

Re: How to identify words that must NOT be translated inside all strings

@ David,

Do we need another issue in the tracker besides  MDLSITE-4204 ?

Re: How to identify words that must NOT be translated inside all strings

Good point and a great memory! No need for a new issue, just please add a comment to this existing one, with a link to this discussion. Thanks!