Lang translation tool - feature improvements

Lang translation tool - feature improvements

by David Mudrák -
အကြောင်းပြန်မှု အရေအတွက်: 20
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Moodle HQ ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Peer reviewers ၏ ရုပ်ပုံ Plugin developers ၏ ရုပ်ပုံ Plugins guardians ၏ ရုပ်ပုံ Testers ၏ ရုပ်ပုံ Translators ၏ ရုပ်ပုံ
Hi folks,

I am just working on updates of the Czech UTF lang pack during these evenings. And some small possible improvements of the lang.php translation tool came into my mind.
  • It would be nice to have submit (save page) buttons being displayed after each let us say 20 string lines, not only the one at the bottom of the page.
  • It would be fantastic if there is an HTML anchor being rendered at the position of the first missing string. So after submitting (saving) the page it could open not at the top but at the position where you should continue with translation.
I would like to discuss this with you a bit before I start to write the code (what I think is not much complicated at all).
ပျှမ်းမျှအဆင့်သတ်မှတ်ချက်များ: -
David Mudrák ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by Andrea Bicciolo -
Those features are interesting indeed. I would also add a feature enabling the utility to be aware of the "*_UTF8_local" languages, thus letting people to edit them.
Andrea Bicciolo ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by koen roggemans -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Moodle HQ ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Plugin developers ၏ ရုပ်ပုံ Translators ၏ ရုပ်ပုံ
Yes interesting features.
I would say especially the locales are important to be able to change with the build in editor. Compare the about 100 translators with all admins over the world having a customized lang pack.
Since we are heading for a stable, I suggest keeping this for 1.7
koen roggemans ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by David Mudrák -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Moodle HQ ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Peer reviewers ၏ ရုပ်ပုံ Plugin developers ၏ ရုပ်ပုံ Plugins guardians ၏ ရုပ်ပုံ Testers ၏ ရုပ်ပုံ Translators ၏ ရုပ်ပုံ
Yes, I agree. I am just thinking about how to enable modification of *_local lang packs in some really clever and handful way... Please join with more ideas.

Maybe there could be a button switching between "local pack mode" and "system pack mode". Once you are in _local mode, you changes (and *only* changes) are going into _local directory... thoughtful
David Mudrák ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by Mitsuhiro Yoshida -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Translators ၏ ရုပ်ပုံ
Hi David,

I really like both of your idea.

When I'm translating Japanese UTF lang pack ( ja_utf8 ), I have to scroll down a lot to save moodle.php. And HTML anchor would lead me to translation required string much faster.

David Mudrák ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by David Mudrák -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Moodle HQ ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Peer reviewers ၏ ရုပ်ပုံ Plugin developers ၏ ရုပ်ပုံ Plugins guardians ၏ ရုပ်ပုံ Testers ၏ ရုပ်ပုံ Translators ၏ ရုပ်ပုံ
OK, attached you can find version of lang.php with following improvements.
  1. "go to first missing string" link can be displayed (see LANG_DISPLAY_MISSING_LINKS)
  2. "go to next missing" link can be displayed (see LANG_DISPLAY_MISSING_LINKS)
  3. submit button may be repeated (see LANG_SUBMIT_REPEAT*)
  4. added (empty) "summary" attribute for the <table>'s
lang changes screenshot

I would like to continue improving this file. Koen - may I ask you for CVS write access to this file so I could commit my changes into HEAD? Thank you,

David
David Mudrák ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by David Mudrák -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Moodle HQ ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Peer reviewers ၏ ရုပ်ပုံ Plugin developers ၏ ရုပ်ပုံ Plugins guardians ၏ ရုပ်ပုံ Testers ၏ ရုပ်ပုံ Translators ၏ ရုပ်ပုံ
As I do not have CVS write access still, I am attaching new version of lang.php to this post.

/**
 * CHANGES

 *
 * 2006/05/16 mudrd8mz
 * 1) LANG_DEFAULT_FILE can be now set. moodle.php used to be opened automatically.
 *    As it was (and still is) one of the biggest files it usually took a long time to load the page
 *    even if you just want to choose the file to translate.
 * 2) added links from "missing" to "compare" mode page
 * 3) english strings are now key-sorted in "missing" mode
 * 4) list of files with missing strings is now displayed at the top of "missing" page
 */

screenshot
David Mudrák ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by David Mudrák -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Moodle HQ ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Peer reviewers ၏ ရုပ်ပုံ Plugin developers ၏ ရုပ်ပုံ Plugins guardians ၏ ရုပ်ပုံ Testers ၏ ရုပ်ပုံ Translators ၏ ရုပ်ပုံ
Attached you can find an update of lang.php with *_utf8_local support. Please, can you test it and report any bugs/requests?

This version allows administrators to translate local modification of default language pack on line. As Koen has mentioned, this is a great way how to involve hundreds of admins in translation (they can just e-mail the lang maintainer their local modification and s/he can incorporate them in standard language pack. Maybe we could automate this sharing somehow in the future...)

I have changed the color highlighting in lang.php (see the source code)
// red #ef6868 - translation missing in both system and local pack
// yellow #feff7f - translation missing in system pack but is translated in local
// green #AAFFAA - translation present in both system and local but is different

Hope you will like these improvements. Pitty I had not written them before 1.6 became beta mixed

lang-changes-screenshot3.png
David Mudrák ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by Mitsuhiro Yoshida -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Translators ၏ ရုပ်ပုံ
Hi David,

Thank you very much for great improvements!!

I put UP and Down button on each missing strings using "pix/t/up.gif" and "pix/t/down.gif".
I hope you like this small modification (attached lang.zip). smile
Mitsuhiro Yoshida ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by David Mudrák -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Moodle HQ ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Peer reviewers ၏ ရုပ်ပုံ Plugin developers ၏ ရုပ်ပုံ Plugins guardians ၏ ရုပ်ပုံ Testers ၏ ရုပ်ပုံ Translators ၏ ရုပ်ပုံ
Thank you, Mitsuhiro! I will check it out as soon as I get back to my notebook.
David Mudrák ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by koen roggemans -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Moodle HQ ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Plugin developers ၏ ရုပ်ပုံ Translators ၏ ရုပ်ပုံ
Hi David,

Sorry, missed this tread, but you're right about the 1.6 beta.
It can go to 1.7. This is not a problem for translators, since I believe most of them use head to translate.

Thanks for your effort on improving the language tool.
koen roggemans ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by David Mudrák -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Moodle HQ ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Peer reviewers ၏ ရုပ်ပုံ Plugin developers ၏ ရုပ်ပုံ Plugins guardians ၏ ရုပ်ပုံ Testers ၏ ရုပ်ပုံ Translators ၏ ရုပ်ပုံ
>since I believe most of them use head to translate

I believe they use brain as well. Funny this computer slang, isn't it? သွားဖြီး (အရမ်းပျော်)

Koen, is there a way how to get write-access rights for admin/lang.php in CVS? I already have got access for langdoc.php but as MartinD has stopped using his (too much) known e-mail I do not know where to ask for this . Thank you for any info.
David Mudrák ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by Helen Foster -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Moodle HQ ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Plugin developers ၏ ရုပ်ပုံ Testers ၏ ရုပ်ပုံ Translators ၏ ရုပ်ပုံ
Hi David,

Thanks for your feature improvements. approve Please note that they are now in the bug tracker/feature request store - bug 5570.
Helen Foster ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements - commited

by David Mudrák -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Moodle HQ ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Peer reviewers ၏ ရုပ်ပုံ Plugin developers ၏ ရုပ်ပုံ Plugins guardians ၏ ရုပ်ပုံ Testers ၏ ရုပ်ပုံ Translators ၏ ရုပ်ပုံ
The code is now commited in CVS as cvs:/admin/lang.php in revision 1.66. The file needs more testing by admins/translators and then the bug may be closed. I have set the "To be Closed in Version" to 1.7 dev and "Status" to Resolved.

Thank you all for your ideas and posts!

David
David Mudrák ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by David Mudrák -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Moodle HQ ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Peer reviewers ၏ ရုပ်ပုံ Plugin developers ၏ ရုပ်ပုံ Plugins guardians ၏ ရုပ်ပုံ Testers ၏ ရုပ်ပုံ Translators ၏ ရုပ်ပုံ
Hi all using new admin/lang.php

Please let me know - shall I ask maintainers for merging this new tool into 1.6.1 release? Is it stable enough now? Thanks for any comments

David
David Mudrák ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by koen roggemans -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Moodle HQ ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Plugin developers ၏ ရုပ်ပုံ Translators ၏ ရုပ်ပုံ
Works very well for me David. Thanks a lot for the improvements.
David Mudrák ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by Mitsuhiro Yoshida -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Translators ၏ ရုပ်ပုံ
Hi David,

admin/lang.php is stable enough for me and it's very easy to use. smile
David Mudrák ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by Tim Allen -
Not sure if it is just me but the latest fix for editing en_utf8_local doesn't seem to be working for me on Moodle 1.6 stable.

I haven't tested it on HEAD, maybe it works ok there.

I wanted to implement it in 1.6 because of a question in another thread.

Tim.
Tim Allen ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by Tim Allen -
Please ignore this, it was a silly mistake on my part.  blush

Tim.
David Mudrák ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by David Mudrák -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Moodle HQ ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Peer reviewers ၏ ရုပ်ပုံ Plugin developers ၏ ရုပ်ပုံ Plugins guardians ၏ ရုပ်ပုံ Testers ၏ ရုပ်ပုံ Translators ၏ ရုပ်ပုံ
The improved lang.php was approved by MartinD and it has just been commited to MOODLE_16_STABLE. Thank you all for your testing and bug reporting. As a reward for your cooperation please have a piece of attached Czech cake မျက်စိတစ်ဖက်မှိတ်
Attachment cake.jpeg
David Mudrák ထံသို့ အကြောင်းပြန်ရာတွင်

Re: Lang translation tool - feature improvements

by Mitsuhiro Yoshida -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Translators ၏ ရုပ်ပုံ
Congratirations on your committing, David!
If I had meet this lang.php, I would have spent more less time for translation. smile