Using AMOS tool for language pack translation

String need to end with a space, AMOS doesn't allow it (Moodle mobile)

 
Picture of Romário Rodrigues Ramos
String need to end with a space, AMOS doesn't allow it (Moodle mobile)
by Romário Rodrigues Ramos - Thursday, 3 March 2016, 8:02 PM
 
I trying to put a space in the end of translated string of mm.login.credentialsdescription, but AMOS remove it.


The screenshot shows the string and the URL.



Picture of David Mudrák
Re: String need to end with a space, AMOS doesn't allow it (Moodle mobile)
by David Mudrák - Thursday, 3 March 2016, 9:43 PM
Language pack maintainers

Thanks Romário.

AMOS behaviour is expected and it is an intended feature. I asked our Moodle Mobile app lead developer Juan Leyva to comment on this issue as there might be a bug in the app.

Picture of Shamim Rezaie
Re: String need to end with a space, AMOS doesn't allow it (Moodle mobile)
by Shamim Rezaie - Wednesday, 25 January 2017, 8:37 AM
Language pack maintainers

it's not just about mobile app.

There are other places that having a space at the end is needed.

For example 'labelsep' in core_langconfig. The English text is ': ' with a space at the end but this luxury is only available to English.

Ralf Krause - Moodletreff.de
Re: String need to end with a space, AMOS doesn't allow it (Moodle mobile)
by Ralf Krause - Wednesday, 25 January 2017, 9:22 PM
Language pack maintainers

Hi

It's not very nice to add an   (non breakable space) at the end of the string but it helps. You also can try to add an alt-space character.  smile

Best regards, Ralf

Picture of Luca Bösch
Re: String need to end with a space, AMOS doesn't allow it (Moodle mobile)
by Luca Bösch - Wednesday, 25 January 2017, 10:13 PM
 

I second Shamim Rezaie's view and would find it useful if AMOS permitted a regular space at the end of a string.

mysubmission | mod_assign is just another example, "My submission: ", where, in german, the final space is missing.

So will submit that string with an   at the end.

Picture of koen roggemans
Re: String need to end with a space, AMOS doesn't allow it (Moodle mobile)
by koen roggemans - Wednesday, 25 January 2017, 10:46 PM
Language pack maintainers

How do people feel about filing a bug for the component if it contains a string with a space at the end?

There shouldn't be a space at the end of a language string because it tricks translators into errors: you can't see it unless it gets reported by someone who notices the missing space in the interface.

Picture of Vadim Dvorovenko
Re: String need to end with a space, AMOS doesn't allow it (Moodle mobile)
by Vadim Dvorovenko - Thursday, 26 January 2017, 1:33 AM
 

koen, we have many strings in core, wich end with space. And much more in contributed plugins.


I argee, that default behaviour in such case should be to remove leading and trailing spaces. But in rare cases we need a way to say to AMOS, that trailing spaces should not be trimmed. I see some variants:

* adding checkbox under translator area for skipping trimming (not shure it will work, beacuse yo should leave editing area before you can click checkbox, so string will be trimmed anyway)

* adding some "secret" substitution, for example '{space}' at the end and begining of string will be converted to spaces after trimming.

* adding some "secret" tags. e.g. text containing in '{pre} ... {\pre}' should not be cleaned

* "secret" prefix. If string starts with '{PRE}' it will not be cleaned, but {PRE} will be deleted

* adding special non-cleared (for example with red box) editor area, that is opened on doubleclick/rightclick/wheel click. Maybe create contextmenu with 'edit' and 'edit without cleaning' commands.



Maybe we should disable string trimming, but add some notifications to stage and translator interface like:

* Original string has leading/trailing space, but translated does not.

* Translated string has leading/trailing space, but original does not.

Mantainers and translators will see such anounces and will decide, what to do.

Picture of Shamim Rezaie
Re: String need to end with a space, AMOS doesn't allow it (Moodle mobile)
by Shamim Rezaie - Thursday, 26 January 2017, 11:47 AM
Language pack maintainers

Having a checkbox for skipping trimming is nice. It will work. You just need to select it before writing your text.

Picture of Shamim Rezaie
Re: String need to end with a space, AMOS doesn't allow it (Moodle mobile)
by Shamim Rezaie - Thursday, 26 January 2017, 11:42 AM
Language pack maintainers

"There shouldn't be ...";

I agree, but let's face it. There is. And English translation has found a way to deal with it.

I agree that a proper fix should be applied to code so there would be no need for a space at the end of strings, but I don't think that this is a "trivial" issue that we must live with until then. It wouldn't be trivial if it was the case with English.

What are we supposed to enter for "parentlanguage"? The only option that we have at the moment is to not translate it at all and live with having one additional untranslated string.

Picture of koen roggemans
Re: String need to end with a space, AMOS doesn't allow it (Moodle mobile)
by koen roggemans - Thursday, 26 January 2017, 4:54 PM
Language pack maintainers

Parent language should only be set if there is a parent language, so this has to stay empty if the fall back language is English. 

E.g for de_kids, the parent language is de. Strings not in de_kids will be searched in de before falling  back to English.

Parent language is not counted to reach 100% translated wink

Picture of Vadim Dvorovenko
Re: String need to end with a space, AMOS doesn't allow it (Moodle mobile)
by Vadim Dvorovenko - Monday, 6 November 2017, 8:27 PM
 

Returning to this discussion afted 9 month. I've open issue on tracker MDLSITE-5269 and provided patch.

It allows to bypass string trimming, if you click cell in transator string while holding Ctrl key. You may watch this issue and invite someone to discussion

Picture of Juan Leyva
Re: String need to end with a space, AMOS doesn't allow it (Moodle mobile)
by Juan Leyva - Thursday, 3 March 2016, 11:10 PM
 

Hi,

thanks for reporting that.

Is a bug in the app, I just opened this issue: https://tracker.moodle.org/browse/MOBILE-1450

Juan