|
I meant to add, related forum discussion: http://moodle.org/mod/forum/discuss.php?d=126835
Tim,
thanks for the comment. Please make sure automated creation do not overwrite existing file: I have already committed the new splitted aut_xxx.php In 1.9.5+ the code searches the new auth_xxxx locations.
But yes, creating all the auth_xxx.php files in all lang packs would be a good idea for all those non-English users. And we need to keep ALL strings in auth.php for compat with 1.8, old 1.9 etc ... Hi Guys,
I've written a small patch the does the following things for every language pack in Moodle: 1. Copy any strings defined in auth_*.php that are not in auth.php into auth.php This ensures that all language packs have a language file for all auth plugins, and that all auth strings are duplicated in auth.php to ensure backwards compatibility. If someone could please have a look at the patch just to make sure everything is OK. I've also attached the script I used encase anyone in the future needs to do something similar. Cheers all Added Jerome as QA, thanks Jerome
The format of the resulting files is slightly different to normal ... subtle differences in quoting/string delimeters could cause regressions.
I recommend building up the files in arrays and then using the lang_save_file() function to save them into files. Gives you a shorter script too. A look at admin/lang.php could be useful too. Cheers for the feedback Martin.
I have attached the revised tool, it now properly fixes the strings before writing them to the file and uses single quotes rather than double. I won't attach the new patch as it is very large (1.8M) however I have shown this to Martin and after some testing I will start commiting language pack changes. Done, and done.
auth_*.php files have been created for all language packs that have an auth.php file, and at the same time language strings for those packs were fixed as required by this issue. I tested several language packs with a couple of auth methods, and ran lint over every single file that was changed. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Also, we should automatically create the new auth_xxx.php lang files for all languages - that should be an easy script to write. Much more sensible that translators for 80 different languages doing it manually.
Assigning to Sam.