Merging the upstream translation of TinyMCE

Merging the upstream translation of TinyMCE

David Mudrák -
Number of replies: 3
Language pack maintainers Նկարը

Hi maintainers!

Moodle stores strings for TinyMCE editor in editor_tinymce component. TinyMCE project is already localized (fully or at least partially) into many languages - see http://tinymce.moxiecode.com/download_i18n.php for the overview.

I have used a custom tool (originally written by Petr Škoda - credit goes to him) that fetches the upstream language packs from TinyMCE and converts it into Moodle format so that it can be uploaded into AMOS. This way, you do not need to re-translate what is already done and also you keep the Moodle translation of TinyMCE consistent with upstream.

  • See the Folder in this course at http://lang.moodle.org/mod/folder/view.php?id=13
  • Locate the directory with the language code you are maintaining and download the file xx/editor_tinymce.php (where xx is your language code)
  • Upload the file back into the empty AMOS stage
  • Rebase the stage to keep just modified and missing strings
  • Review the translation
  • Commit the stage

Hot tip! Thanks to the new cool File management in Moodle 2.0, you even do not need to download the file and upload it back to AMOS. Just go to the AMOS stage, open the file picker and navigate into System/Courses/Translating Moodle/Upstream translation of TinyMCE (Folder)/Files and subfolders/ and you can choose the file from there directly!

If your language is missing in the folder but your language is published at the TinyMCE i18n page, please let me know. Currently, I am unable to transform Chamorro and Chinese due to encoding problem in XML sources. If you spot any other problem, let me please know too.

Hope this helps!

In reply to David Mudrák

回复: Merging the upstream translation of TinyMCE

Zhigang Sun -
Language pack maintainers Նկարը

Hi, david

Could you send me the script file which converts TinyMCE's language files into Moodle format? Perhaps I can solve the problem about Chinese.

Thank you!

Sunner

In reply to Zhigang Sun

Re: 回复: Merging the upstream translation of TinyMCE

David Mudrák -
Language pack maintainers Նկարը
Hi Sunner,

the script is part of the official Moodle 2.0 distribution - lib/editor/tinymce/extra/tools/update_lang_files.php

Thanks in advance for the review of it.

David
In reply to David Mudrák

回复: Re: 回复: Merging the upstream translation of TinyMCE

Zhigang Sun -
Language pack maintainers Նկարը

Hi David,

The problem is caused by TinyMCE's original zh.xml file. The file is encoded in utf-8 exactly, but the first line of it says <?xml version="1.0" encoding="gbk"?> . I just changed the bold string from gbk to utf-8, then update_lang_files.php can convert it very well.

This is a special case happens on Chinese only. So I think it is no need to patch the converting script. I can handle it by myself.

Sunner