Using AMOS tool for language pack translation

Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings

 
Picture of Miki Alliel
Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by Miki Alliel - Tuesday, 31 August 2010, 11:14 PM
Language pack maintainers

Hello everyone.

There is an issue that I didn't understand clearly -

I'm translating Moodle 2.0 in AMOS and also still contributing and translating through CVS Moodle 1.9.x strings. Is there any why which those strings can be synchronize automatically to AMOS (or to http://download.moodle.org/langpack/2.0/).

In other words: I expect to see in AMOS the "yellow" and "green" background color of the strings that have been translated recently (new and fix strings) in moodle 1.9.x. .

Usually the strings in 1.9.x that we translate are also strings that being used in moodle 2.0 (not new ones that only moodle 2.0 knows but old ones) What is the best why to sync with both versions.

hope I explained my dilemma properly?

Picture of Miki Alliel
תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by Miki Alliel - Sunday, 5 September 2010, 5:20 PM
Language pack maintainers

Hey

Can anyone help me with this issue?

 

thanks

Picture of David Mudrák
Re: תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by David Mudrák - Saturday, 18 September 2010, 7:12 AM
Language pack maintainers

I am currently working on a new set of AMOS functions that will allow this. When I am finished, you will be able to merge all strings from 1.9 branch into 2.0 branch via AMOS interface.

Thank you for being patient and sorry for the delay.

Picture of Miki Alliel
תשובה ל: Re: תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by Miki Alliel - Sunday, 19 September 2010, 6:26 PM
Language pack maintainers

Great

thanks for the update

Picture of David Mudrák
Re: תשובה ל: Re: תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by David Mudrák - Thursday, 7 October 2010, 4:19 PM
Language pack maintainers

Miki,

you should be now able to use the new merge tool to copy all your work from 1.9 branch into 2.0 branch. Just go at AMOS > Stage and merge strings using the form there (you have to have commit access to be able to use the form).

Picture of Jasmin Klindzic
Re: תשובה ל: Re: תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by Jasmin Klindzic - Thursday, 7 October 2010, 5:46 PM
Language pack maintainers

Hi David,

is there a chance that it could work both ways (merge strings from 1.9 to 2.0 OR 2.0 strings "downgrade" to 1.9)?

I'm asking because we have focused our efforts (the Croatian translation team, five or six of us) on Moodle 2.0, and 1.9 was left as an orphan of sort, and now we have few thousands of strings for 2.0 that are not translated in 1.9, and those could _probably_ be merged to 1.9.

I'm asking this because the majority of large edu institutions in Croatia are using 1.9.x form production servers and we have no plan to move to 2.0 for at least six months after the final release (or maybe even not until the summer of 2011).

And thank you very much for all the work you are doing (as well as the improvements and features of AMOS) smile

Picture of David Mudrák
Re: תשובה ל: Re: תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by David Mudrák - Thursday, 7 October 2010, 8:13 PM
Language pack maintainers

Hi Jasmin,

sorry, automatic backporting of the translation from AMOS to 1.x branches is not supported and will not be. Moodle 1.x language packs live in CVS and it was designed that AMOS will only read from CVS but never contribute it there back.

What you can do now is to try and use the 2.0 language pack generated by AMOS and use it as-is as the initial version of the lang file and then use standard Moodle 1.9 translation process to check and use it.

Example:

  1. let us suppose you have your current lang/hr_utf8/moodle.php in 1.9
  2. download hr.zip for Moodle 2.0 generated by AMOS from the download page
  3. extract moodle.php from hr.zip
  4. concatenate both PHP files so that the one from 2.0 goes first and the current 1.9is appended to it
  5. if you use this new moodle.org for translation in Moodle 1.9, it will take all missing strings from 2.0
  6. note that you will have to double check the syntax because in 2.0, the format of string slightly changed (there are curly braces around placeholders now, no more double percents, no more escaping of quoting marks etc.)
Picture of Jasmin Klindzic
Re: תשובה ל: Re: תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by Jasmin Klindzic - Thursday, 7 October 2010, 8:49 PM
Language pack maintainers

Thank you for the detailed explanation smile

Just for the record, what does bullet no.5 mean (especially ".if you use this new moodle.org...").

Picture of David Mudrák
Re: תשובה ל: Re: תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by David Mudrák - Thursday, 7 October 2010, 9:39 PM
Language pack maintainers

Ach, sorry for typo. Of course I meant "if you use this new moodle.php" - that is, use the file moodle.php that now consists of moodle.php@2.0 + moodle.php@1.9

Hope it's clear now.

Picture of Miki Alliel
תשובה ל: Re: תשובה ל: Re: תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by Miki Alliel - Wednesday, 15 December 2010, 11:17 PM
Language pack maintainers

Hey David

I'v just tried that but I can't see the  1.9.x strings that I committed few days ago on the merge list.

For example: we translate few days a got  through CVS this string- "profilefields" from admin.php  and committed (1.9.x).  (we just modified  the hebrew string of it)

Today I went to Amos->Translator -> searched for "profilefields" check the checkbox of 2.0 and the  1.9  I got as a result list of 2 different strings - the 1.9 ( after the modification) and the 2.0 ( before the modification) - they are not equal - I was expected to see the Yellow background (so I can click on the checkbox to merge it but is was green) .

But  when clicked on Staged from source 1.9 and target 2.0  clicked  Merge - I didn't see it at all. ( is that the way to do it?)

Hope you understand and can answer me.

thanks a lot/

Miki Alliel

Picture of David Mudrák
Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by David Mudrák - Thursday, 16 December 2010, 2:48 AM
Language pack maintainers
Hi Miki,

yes, that might happen. Because of the current Moodle migration from CVS to git repository, all AMOS scheduled jobs that parse Moodle core and 1.x languages are temporarily disabled. They should be up and running again by the end of this week.

Thanks for understanding and being patient

David
Picture of David Mudrák
Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by David Mudrák - Thursday, 16 December 2010, 3:48 AM
Language pack maintainers
Hi Miki,

sorry, I misread your post previously. I just checked AMOS database and that commit from Dec 12 into 1.9 are correctly registered. However, AMOS does not provide any tool to automatically propagate the change into 2.0 branch. The stage tool 'Merge strings from another branch' works only for strings that are translated on 1.9 and are _missing_ at 2.0. In your case, the string already existed on 2.0 so the merge tool does not modify it.
This is standard and expected effect of having languages branched. Whenever you do a change on one branch, you must manually port it to other branches as needed. This can not be automated much - because sometimes we need one string having different value on different branches (that is actually one of the reasons why we have AMOS).
I agree there could be some UI widget to easily copy string from one branch to another. But at the moment, you must copy it using standard clipboard.

Hope I explained it clearly now

David
Picture of Miki Alliel
תשובה ל: Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by Miki Alliel - Thursday, 16 December 2010, 5:03 PM
Language pack maintainers

Hey

thanks for the reply'

So as I understand - if I modify a string in 1.9 through CVS and then  I go to AMOS to the same string I have to translate it ( modify it) again manually?

I was thinking that Amos will suggest me as it does with the Yellow backgroud, but I guess it's not the case?

Picture of David Mudrák
Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by David Mudrák - Thursday, 16 December 2010, 6:45 PM
Language pack maintainers
The yellow background is used for outdated strings only (that is, the English translation on the given branch is more recent than the translation). But AMOS does not detect any changes between branches. There might be a report for it, of course. Let us see if others translators would find it useful, too. Please report it as AMOS issue in the tracker so that others can vote for it.
Picture of Miki Alliel
תשובה ל: Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by Miki Alliel - Thursday, 16 December 2010, 10:39 PM
Language pack maintainers

OK

Thanks...

Picture of Miki Alliel
תשובה ל: Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by Miki Alliel - Monday, 20 December 2010, 7:03 PM
Language pack maintainers

Hey again

I have 2 quick questions:

1)

when I'm in the translate mode in Amos and I check the 1.9 version to fine strings, Do I get the result directly from the most Update CVS from here?

or is it taken from another database?

2)

If I commit  by modify a string from 1.9 version  though Amos, will I see it here (CVS mode) if yes when does the updae take place?

 

thanks

Picture of David Mudrák
Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by David Mudrák - Tuesday, 21 December 2010, 6:14 PM
Language pack maintainers
Hi Miki,

re 1) yes, AMOS tracks that repository, There is a small drift though so it takes a while for a change in CVS to propagate into AMOS.

re 2) no, you can not commit changes of 1.9 strings via AMOS. They are for read-only (note the background color of them). You have to fix them in CVS.
Picture of Miki Alliel
תשובה ל: Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by Miki Alliel - Tuesday, 21 December 2010, 9:34 PM
Language pack maintainers

HEY

Thanks for your reply.

about 1)It is important for us to know  if you can , approximately , after how long it updates the CVS to Amos?

thanks

Picture of David Mudrák
Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by David Mudrák - Wednesday, 22 December 2010, 4:55 PM
Language pack maintainers
The drift is approximately one hour plus/minus 30 mins. It depends on the delay of CVS->git mirroring and how the scheduled jobs get synced. Should not be more than 90 minutes.

Just for curiosity, this is how a change propagates from CVS to AMOS:

* the string is committed into http://cvs.moodle.org/lang/
* scheduled cron job runs at my server and mirrors the CVS repo into git
* another scheduled job at my server publishes the git mirror at https://github.com/mudrd8mz/moodle-lang
* scheduled job at AMOS server fetches the github repository and registers all new changes in AMOS database.

These three cron jobs run twice an hour in sort of cascade. But if the commit just misses the first cron job, it is not processed but in the next run in 30 mins.
Picture of Miki Alliel
תשובה ל: Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Re: תשובה ל: Synchronizing moodle 2.0 strings with ongoing moodle 1.9.x strings
by Miki Alliel - Wednesday, 22 December 2010, 8:30 PM
Language pack maintainers

Great

Now I get it..

thanks