Translated strings are not saved

Translated strings are not saved

ved Plamen Gradinarov -
Antal besvarelser: 23

Hello,

Smaller files can be saved, larger files (5K and above) do not save in the new 1.9 Moodle lamg-utf8_local folder. Permissions are the same, owners are the same, behaviour is different. Any suggestions as to why it may be so?

For instance, quiz.php does not save and returns to the language selector page, while quiz_analysis.php does save and you can continue editing the same file.

Thank you

Gennemsnitsbedømmelse: -
I svar til Plamen Gradinarov

Re: Translated strings are not saved

ved David Mudrák -
Billede af Core developers Billede af Documentation writers Billede af Moodle HQ Billede af Particularly helpful Moodlers Billede af Peer reviewers Billede af Plugin developers Billede af Plugins guardians Billede af Testers Billede af Translators
Hi Plamen,

Hmmm... that's strange. I have never noticed such a problem. Can anybody else here confirm problem with saving quiz.php and similar large files?

Plamen, are you able to post larger files elsewhere in your Moodle installation (e.g. as a forum post attachment)? Maybe the problem is in your PHP/HTTPD settings. See also the value of "maxbytes" Moodle configuration variable:

This specifies a maximum size that uploaded files can be throughout the whole site. This setting is limited by the PHP settings post_max_size and upload_max_filesize, as well as the Apache setting LimitRequestBody. In turn, maxbytes limits the range of sizes that can be chosen at course level or module level.
I svar til David Mudrák

Re: Translated strings are not saved

ved Nadav Kavalerchik -
Billede af Core developers Billede af Plugin developers Billede af Testers Billede af Translators
i have the same issues with moodle.php , admin.php and other (relatively big) files.

i have tried to raise the max post/upload values inside moodle with in php.ini but with no help.

i can change the files on the remote hosted server but not throught the language interface.

almost all other language files are edited and saved just fine.

i turned developer debug messages but with not help.

maybe some illigel charecter is crashing the the upload ?
(i use moodle 1.9.2 - july-2008 , php 5, apache 2)

I svar til Nadav Kavalerchik

Re: Translated strings are not saved

ved David Mudrák -
Billede af Core developers Billede af Documentation writers Billede af Moodle HQ Billede af Particularly helpful Moodlers Billede af Peer reviewers Billede af Plugin developers Billede af Plugins guardians Billede af Testers Billede af Translators
Hi Nadav,

please proceed the following experiment. Take the file moodle.php from the English master pack (moodle/lang/en_utf8/moodle.php) and try to upload it into the Site files area thru the Moodle web interface. Let me know if the file gets uploaded. Thank in advance.

David
I svar til David Mudrák

Re: Translated strings are not saved

ved Nadav Kavalerchik -
Billede af Core developers Billede af Plugin developers Billede af Testers Billede af Translators
uploaded successfully smiler

i also uploaded it with ftp to moodle/lang/he_utf8_local/moodle.php
then, i tried to edit/translate it in the "moodle web translation interface" from english to hebrew... but with no success trist

no errors in the full debug mode.
I svar til Nadav Kavalerchik

Re: Translated strings are not saved

ved David Mudrák -
Billede af Core developers Billede af Documentation writers Billede af Moodle HQ Billede af Particularly helpful Moodlers Billede af Peer reviewers Billede af Plugin developers Billede af Plugins guardians Billede af Testers Billede af Translators
Thanks for the report, Nadav.

Unfortunately, I am not able to reproduce your problem as everything seems to work for me. This is what I did:
  1. went to Administration Language Language editing
  2. chose "Local string customization" card
  3. switched "Current language" to Hebrew (he)
  4. clicked on "Edit words or phrases"
  5. chose en_utf8_local/moodle.php as a file to edit
  6. changed some string
  7. clicked on "Save"
The changed string was successfully saved into the moodledata/lang/he_utf8_local/moodle.php

I will try to add some debugging code into the translation tool and will ask you for more testing then, ok? I am leaving for my holiday today but I shall be back on 18th August.
I svar til David Mudrák

Re: Translated strings are not saved

ved Nadav Kavalerchik -
Billede af Core developers Billede af Plugin developers Billede af Testers Billede af Translators
thank you very much
i will keep investigating this issue.

may be it is permissions ?
i found out that php files with group/other write-access cause errors within apache and it does not serve those files (in themes,for example) so maybe it is related ?

for now, i am translating directly within the files
{ not so terrible smiler }
I svar til David Mudrák

Re: Translated strings are not saved

ved Nadav Kavalerchik -
Billede af Core developers Billede af Plugin developers Billede af Testers Billede af Translators
i have another Moodle site that i manage it has some differences in configuration from this one (in which i have issues with)
at that site it works fine (same moodle version 1.9.2)

first, i use Apache 2 and the other (working site) uses apache 1
the php version are similar but has some differences.

i am attaching both phpinfo output. so maybe you can spot the one difference that would solve this issue.

here is the buggy one that does not re-load the translation after i submit it.

btw,
150KB translation pages work fine. bigger then that does not.
I svar til Nadav Kavalerchik

Re: Translated strings are not saved

ved Molly Crofton -
I am having similar troubles with Language Editing large language files (moodle.php, admin.php, etc). Editing smaller files (bulkusers.php, etc) works properly, but large files are irregular, sometimes taking changes, sometimes not.

Has there been any further progress with this?

Thanks
I svar til Molly Crofton

Re: Translated strings are not saved

ved David Mudrák -
Billede af Core developers Billede af Documentation writers Billede af Moodle HQ Billede af Particularly helpful Moodlers Billede af Peer reviewers Billede af Plugin developers Billede af Plugins guardians Billede af Testers Billede af Translators
Hi,

sorry - no big progress yet. But there is a plan to rewrite the translation tool and I will keep this problem in my mind. I would like to publish the new version of the tool as soon as possible, hopefully during three or four weeks.

Thanks for being patient
I svar til David Mudrák

Re: Translated strings are not saved

ved Jacob Dayan -
Unfortunately, I encountered similar problem.

I'm trying to translate the facetoface.php mod.

The translated strings are not saved.
I tried forcing a facetoface.php file into the local_he_utf8 directory. It didn't solve the problem.

I don't think that this is related o file size. the moodle.php changes are saved ok.
I noticed that the facetoface.php file starts with
<?PHP
while all other lang files start with <?PHP // $Id$
I changed this as well. No luck.

I copied the en_utf8 version of facetoface.php to the local_he_utf8
The strings showed up in the Translation page. But when I change a value, it does not show up.

If I modify the file with Notepad to translate teh lines to hebrew, I end up with black question marks when I upload the file.

Any suggestions?

I svar til Jacob Dayan

Re: Translated strings are not saved

ved David Mudrák -
Billede af Core developers Billede af Documentation writers Billede af Moodle HQ Billede af Particularly helpful Moodlers Billede af Peer reviewers Billede af Plugin developers Billede af Plugins guardians Billede af Testers Billede af Translators
Koen, please, where can I get the Petr's langpack syntax checker? Maybe there is something wrong with these files that can not be saved...
I svar til David Mudrák

Re: Translated strings are not saved

ved koen roggemans -
Billede af Core developers Billede af Documentation writers Billede af Moodle HQ Billede af Particularly helpful Moodlers Billede af Plugin developers Billede af Translators
Hi David. The checker is in MDL-1415.
I don't see anything major wrong in the lang files. Nothing at all with Hebrew.

I svar til koen roggemans

Re: Translated strings are not saved

ved Jacob Dayan -
Hello Koen, David,

Thanks for your willingness to assist.

Nadav (the original poster of this discussion) told me that he found a workaround: he is doing the translation on a local moodle installation, and then ftp the files to the site. Maybe this has to do with Apache / php issues on the hosting site? I'm not php/apache expert, but maybe Nadav's workaround can show where the bug is? Thanks

I svar til Jacob Dayan

Re: Translated strings are not saved

ved David Mudrák -
Billede af Core developers Billede af Documentation writers Billede af Moodle HQ Billede af Particularly helpful Moodlers Billede af Peer reviewers Billede af Plugin developers Billede af Plugins guardians Billede af Testers Billede af Translators
Jacob,

I can't reproduce your problem. I am able to translate the attached facetoface.php into Czech with no problems.
You can't use the plain Notepad as it does not support UTF-8 encoding. IIRC there should some other tools described in the wiki docs, eg. Notepad++ [1].

Regards
David

[1] http://notepad-plus.sourceforge.net/uk/site.htm
I svar til David Mudrák

Re: Translated strings are not saved

ved Milan Jaroš -
Hello, I have similar problem (not the same). I can modify translation easily, so it's stored in [moodledata]/lang/cs_utf8_local/moodle.php then. But it is not showing for unlogged user. And worse - there is some old one modification I did in past.
Is it stored somewhere in db? Is here something like "clear db string cache" button? Thank you.

With best regards, Milan Jaros.
I svar til Milan Jaroš

Re: Translated strings are not saved

ved Milan Jaroš -
Well, I found it in database in mdl_cache_text but after backup and deleting this items nothing happens. I refreshed the page and that row in database comes again. :'( From where?
I svar til Milan Jaroš

Re: Translated strings are not saved

ved David Mudrák -
Billede af Core developers Billede af Documentation writers Billede af Moodle HQ Billede af Particularly helpful Moodlers Billede af Peer reviewers Billede af Plugin developers Billede af Plugins guardians Billede af Testers Billede af Translators
Hi Milan,

no, strings are not stored in DB, just in the string files. Can you give a step-by-step example of what you are trying to do?

David
Gennemsnitsbedømmelse:Useful (1)
I svar til Milan Jaroš

Re: Translated strings are not saved

ved Milan Jaroš -
My problem was solved via e-mail. Thanks David. It wasn't problem but my mistake. I've filled auth_instructions and I tried to change this text by language tool. That's all.
I svar til Plamen Gradinarov

Re: Translated strings are not saved

ved Trevor Cunningham -
Seems I can't edit moodle.php either in 1.9.2. For whatever reason, when try to change "Topic outline" to "Course Content and Units of Study" it doesn't take and never saves the change. Whenever I go back into moodle.php, it's back to Topic outline. I checked my administrator definition and nothing is blocked, but I can't change a thing in this file.

HELP!
I svar til Plamen Gradinarov

Re: Translated strings are not saved

ved Slettet bruger -
We've had the same problem for months; language editing works fine except for moodle.php and admin.php which are never successfully saved.

Our server has the suhosin php extension installed, and that appears to be the cause.

These lines were added to php.ini to resolve the issue:

suhosin.cookie.max_vars = 2000
suhosin.get.max_vars = 2000
suhosin.post.max_vars = 2000
suhosin.request.max_vars = 2000

It would be useful to get feedback from someone who knows suhosin and can suggest more optimal values for the above settings - they are probably quite high.
Gennemsnitsbedømmelse:Useful (2)