Using AMOS tool for language pack translation

Problem with $a??

Picture of Miki Alliel
Problem with $a??
by Miki Alliel - Wednesday, 5 January 2011, 5:09 PM
Language pack maintainers


I wonder is there a problem with "$a"  in other languages except English??

for example - in the course settings - in the button of the page  the labels in english are : "Your word for 'Teacher'" , "Your word for 'student'" ....

but when swiching to hebrew I get it with $a and not  the value itself :

"המילה שלך עבור {'$a'} "

it keep getting the output with the exact from "$a"

also, when clicking on  course->Filters I see the link with $a and not with the value. I guess there are many other places.

Please see the images

Is it a known bug?


Picture of David Mudrák
Re: Problem with $a??
by David Mudrák - Wednesday, 5 January 2011, 9:16 PM
Language pack maintainers

Hi Miki,

no, this is not Moodle bug. It is a bug in your language pack. Those {$a} are called "placeholders" in Moodle and AMOS translator tool offers you a short desciption of them via the help icon at every string that contains them.

From the screenshots, I can see two problems: at the first screenshot, there are single quotes inside the braces and they should be outside. At the second one, there are some Hebrew characters inside the braces.

To make these placeholders work, they must be in exact form as they are in the English, that is: * they must read left-to-right: $a and not a$ * they must be wrapped by the braces: {$a} or {$a->something} and you must not modify the content of the braces

By using regex search in the AMOS filter, I found at least following strings you should fix in Hebrew lang pack:

See how the placeholder usage is different in the English source and the Hebrew translation.

Picture of Miki Alliel
תשובה ל: Re: Problem with $a??
by Miki Alliel - Friday, 7 January 2011, 12:15 AM
Language pack maintainers

Yes  I understand what is it of course,

The thing is, that in moodle 1.9.x when we translated the string from english through the UI of moodle, we only copy the "$a" and paste it in the translation cell and it worked fine.

now I did it like that too.. ( copy paste it from the english side) and it switched between the chars  .

now when I wrote the "$a" , I'm writing first "$" and then "a" in the Hebrew cell which I suppose to write, but it switches the chars from some reason and this never happened in moodle 1.9 translation interface UI.

anyway I need to write now first "a" and then "$" - then it works..

Please click the 1st link you sent me here, I fixed it as you can see but if yousearch for "confirmdelete,report_unsuproles " you can see that the $a->role  and $a->level  are first shown as "a" and then "$" but it is ok because the link is empty from results.

you see something is really weird.

anout the 2nd link I fix it and it's ok.


this leads to another question:

is there a easy way to "find and replace" strings in the AMOS or will it be written?