Has anyone tried customizing a language in moodle 2.0 recently? Just tried to customize English today, using Moodle 2.0 (Build: 20101201).
When clicking on the Check out strings into translator button, nothing happens (well, the hard disk runs like mad) and after 3 minutes I get this error message:
Fatal error: Maximum execution time of 180 seconds exceeded in [moodle20]\lib\dml\mysqli_native_moodle_database.php on line 841
I have not found a report in the bug tracker but will report if people can report same problem in this forum.
when you press the checkout button, Moodle will search for all strings from the core and all plugins and will copy them to the database. The translation tool then works with the strings in the database and the customized strings can be then written back to the files in the local language folders.
The initial checkout when there are no strings registered yet in the database may take a longer time. Later checkouts are usually shorter as only the new and modified strings are updated.
At all sites I tested the new tool at, the initial checkout took reasonable amount of time - up to twenty seconds or so. At your machine, the script was not able to finish the complete checkout within the maximum execution time defined in your php.ini. The fact it took so long at your machine may indicate that your database performance is not very good and you should consider some performance tweaking. Sure, there could be a progress bar or something to indicate what is going on. And the script could even try to detect the upcoming maximum execution time deadline.
Anyway, please try to just re-run the checkout several times. If you have access to your database, try to get the count of already checked-out strings using
SELECT COUNT(*) FROM mdl_report_customlang;
You should see the increasing number of records after each run of the checkout and you need to reach almost 16000 records before the translation tool can be launched.
I finally persisted and re-launched the Checkout strings into translator a few more times and after I think a total of 15 minutes (5 x 180 seconds max. execution time) I got all of the strings into the database!
There definitely ought to be a progress bar on that page plus maybe a warning telling users to try again ... and again if they get a timeout.
Thanks too for your suggestion to improve my mysql database performance. Since this is only a local test site on my computer I'd never bothered much about performance, but I have read with interest the Performance doc at http://docs.moodle.org/en/Performance
Unfortunately the performance script at moodle/admin/dbperformance.php does not work in Moodle 2.0; it needs re-writing.
Yes, customize your system will solve this problem. I increase my memory limit for PHP. Referene:
I'm facing a similar problem. The situation is the following. I'll be grateful for any help.
I setup Moodle 2.0 on my personal pc via "Moodle Windows Installer" and each time I try to translate the strings in 2.0 doing the following steps I get a blank page at the end.
1- Language customization
2- Choose the language. I get the following link:
3- I click on Check out strings into translator
I get the following link but the page is blank and there is no strings to chheck.
Could anybody help to solve this problem. What could be wrong? I tried this with several browsers (I.E, Google Chrome, Firefox, and Safari) but no success.
Is it my PC or what?!
I would highly appreciate it if anybody could help with this so I will be able to continue translating moodle 2.0
Thank Joseph. I am not getting anything except a blank page and in the status bar Done.
I'll try to follow what you suggested and update you.
The following is what I got:
Fatal error: Maximum execution time of 60 seconds exceeded in E:\Moodle\MoodleWindowsInstaller-latest\server\moodle\lib\dml\mysqli_native_moodle_database.php on line 841
I shall come with a patch that would prevent throwing this error.
Thanks it worked after taking so long time.
There is another error that needs your final magic touch.
After translating the strings I clicked save and continue. then I got the following screesn:
There are 12 modified strings. You must check in them into disk to store them permanently.
There are two buttons: One says (
Check out strings into translator) the other (Check in strings into disk)
If you the first is clicked it goes back to the strings page.
If the second one is clicked it gives the following message:
(Coding error detected, it must be fixed by a programmer: Incorrect file location E:\Moodle\MoodleWindowsInstaller-latest\server\moodledata/lang/ar_local)
This same message appears if you click the button (Save and check in strings into file)
I created a folder and named "ar_local" moodle automatically deletes it.
please turn Debugging mode on and let me know the stack info and all other messages that appear when you try to check-in the customized strings.
During the check-in, the lang/xx_local/ is removed and repopulated from the database, normally.