Err 500 with translation editing (italian in particular)

Please report bugs here!

Moderator: Thorsten

Post Reply
joka
Posts: 3
Joined: Thu Jan 02, 2014 6:55 pm

Err 500 with translation editing (italian in particular)

Post by joka »

Hi,
i downloaded phpmyfaq for a spin and hit a rock immediately :)

I was to correct some of the translations, but as soon as you click "save" you get error-500 from the server and a php error because the language file gets corrupted (invalid php).

This is because italian translations have a single quote often in the text as in:

$PMF_LANG["msgS2FButton"] = "Invia l'e-mail";

If you save this with the current version of phpmyfaq that line becomes (mind the quotes):

$PMF_LANG["msgS2FButton"] = 'Invia l'e-mail';

hence the error.

I like phpmyfaq and would like to contribute some translations ... but this is a show stopper.

Joka.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Err 500 with translation editing (italian in particular)

Post by Thorsten »

Hi,

which version do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Err 500 with translation editing (italian in particular)

Post by Thorsten »

Hi,

I fixed the Italian file for you: https://github.com/thorsten/phpMyFAQ/bl ... age_it.php

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
joka
Posts: 3
Joined: Thu Jan 02, 2014 6:55 pm

Re: Err 500 with translation editing (italian in particular)

Post by joka »

Hi Thorsen, the problem is not in the italian file but what seems to be missing escape for strings input from the user using the translation interface provided by phpmyfaq.

On SAVE, all strings are then quoted with single quotes which contain other single quotes from the translated strings.

Either use double quotes for string when regenerating the file or escape the single quotes inside.

Or perhaps I am missing something.
Post Reply