Using AMOS tool for language pack translation

Importing multiple files into the stage

 
Picture of Fadi Mansour
Importing multiple files into the stage
by Fadi Mansour - Tuesday, 14 August 2012, 8:02 PM
 

Hi,

I have a moodle installation where I have customized the language, as the official version had serveral issues.

As a result I now have several files in the local language folder, that I wish to contribute.

I tried to use AMOS (this is my first attempt), but I found that I was unable to import more that a single file to the stage.

To import all the files that I had to:

  1. Upload a file.
  2. Stash the changes.
  3. Return to the stage.
  4. Un-stage all.
  5. Import a second file.
  6. Go to my stashes list.
  7. Pop the last stash.
  8. In the stage, stash the resulting combined changes into a new stash.
  9. repeat (goto step 3).
  10. ...

As I have 60 files, I figuered, this can't be right.

Am I doing this wrong? Is there a better way.

Would it be Ok to combine all the files into one before importing? (I might have to give the resulting a dummy, but suitable filename to be accepted).

Any suggestions?

Thanks

Picture of koen roggemans
Re: Importing multiple files into the stage
by koen roggemans - Tuesday, 14 August 2012, 8:46 PM
Language pack maintainers

I'm affraid I don't have any suggestions. Upload files is intended for occacional use, since the recommended way is to use the translation interface.

The drag and drop function of Moodle 2.3 will at least make the upload a little faster.

Picture of Mikael Kurula
Re: Importing multiple files into the stage
by Mikael Kurula - Tuesday, 14 August 2012, 9:35 PM
 

Interesting! We have a bit of the same problem. Are there concrete plans for approximately when Amos will be upgraded to Moodle 2.3?

Picture of koen roggemans
Re: Importing multiple files into the stage
by koen roggemans - Tuesday, 14 August 2012, 11:45 PM
Language pack maintainers

It is on 2.3.1 (zie big blue arrow for file upload smile)

Picture of Mikael Kurula
Re: Importing multiple files into the stage
by Mikael Kurula - Wednesday, 15 August 2012, 3:26 AM
 
Ah, thanks, that's good news! Sorry for asking stupid questions; have not translated anything in a couple of months.
Picture of Mikael Kurula
Re: Importing multiple files into the stage
by Mikael Kurula - Wednesday, 15 August 2012, 3:28 AM
 
Ah, thanks, that's good news! Sorry for asking stupid questions; have not translated anything in a couple of months.
Picture of Fadi Mansour
Re: Importing multiple files into the stage
by Fadi Mansour - Thursday, 16 August 2012, 5:07 PM
 

Ok, thank you for replying, but you do you have any idea what would happen if I consolidated all the files into one, and uploaded it?

From what I see, there's no actual reference to which file each string belongs. So I'm not sure, if this relationship is there, but not apparent on the interface, or that it doesn't matter.

Do you recommend that I go on and try doing that, or would that break something?

Thanks again.

Picture of koen roggemans
Re: Importing multiple files into the stage
by koen roggemans - Sunday, 19 August 2012, 1:58 AM
Language pack maintainers

I don't think it would break something, I think it just wouldn't work. The filename is part of the identifiction of the string.

David could give you an accurate answer to that.

Picture of Fadi Mansour
Re: Importing multiple files into the stage
by Fadi Mansour - Sunday, 19 August 2012, 4:20 AM
 
So from what I understand: the file name used for the uploaded file actually identifies the string to AMOS. AND if I did what I was suggesting I would be adding new but totally independent strings that would never affect the originals. Ok, so I'll have to do it manually file by file. Thanks for the feedback.
Picture of David Mudrák
Re: Importing multiple files into the stage
by David Mudrák - Wednesday, 29 August 2012, 5:39 PM
Language pack maintainers
Correct. The name of the uploaded file determines the component of the string. It must match the filename of the original English file.

I can see the use case of uploading whole local customization though. Please vote for MDLSITE-1539.
Picture of Mikael Kurula
Re: Importing multiple files into the stage
by Mikael Kurula - Monday, 18 September 2017, 5:35 PM
 

Hi, the zip upload feature seems to have been disabled again? I tried to upload a zip, but only get the message "No valid string found in the file. Make sure the file has correct filename and is properly formatted."

I'll attach the zip in question in case somobody wants to check it. The target language is Finland_Swedish.

Off-topic: I also have a .php-file for hsuforum, but AMOS doesn't find any useful strings there. Is there a way to contribute our local translation of hsuforum?

Picture of David Mudrák
Re: Importing multiple files into the stage
by David Mudrák - Tuesday, 19 September 2017, 2:53 AM
Language pack maintainers

Hello Mikael. I am sorry for the experienced troubles.

zip upload feature seems to have been disabled again?

No, the feature still works. But the files are supposed to be directly in the root of the ZIP archive. In your ZIP, they have been put into a "moo_local" subdirectory. Please create a new ZIP in a way that all PHP files are directly in root of the archive and it should work well.

Picture of Mikael Kurula
Re: Importing multiple files into the stage
by Mikael Kurula - Wednesday, 20 September 2017, 4:15 AM
 

Ah, I fixed the .zip file and now it worked. Thanks a lot!

Is the possibility of uploading a zip by the way documented somewhere, including the precise structure of the zip file? I'm afraid I'll forget this until next time I want to upload some local translations.

The problem with contributing hsuforum.php seems to have been that I selected Moodle 3.3, with which hsuforum is not officially compatible (althought it works fine in practice). I uploaded the translations as Moodle 3.2 and propagated them, and now it seems to have worked fine.

A final comment, off topic again: I am a maintainer of the Finland-Swedish language pack, and earlier I could send my contributions for quality review to another of the maintainers. Now, however, I could not find any such option, but rather I had to commit my contributions directly.

Picture of koen roggemans
Re: Importing multiple files into the stage
by koen roggemans - Wednesday, 20 September 2017, 2:38 PM
Picture of Mikael Kurula
Re: Importing multiple files into the stage
by Mikael Kurula - Wednesday, 20 September 2017, 3:27 PM
 
Thanks! I don't understand why I didn't see that, but now that the answer and the link are in this forum thread, I'll find the way next time.
Picture of koen roggemans
Re: Importing multiple files into the stage
by koen roggemans - Wednesday, 20 September 2017, 4:05 PM
Language pack maintainers

Well, it's a small detail and there is a lot of documentation - i'ts easy to mis.