Can't create a new album with an other name that "Nouvel Album" Can't create a new album with an other name that "Nouvel Album"
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Can't create a new album with an other name that "Nouvel Album"

Started by François Keller, September 23, 2005, 01:31:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

François Keller

Hi,

another little bug. :-\\
I can't creat a new album with an other name that "Nouvel Album" whith french language file:
I can create a new album with thes default name ("Nouvel Album") but when renaming, the new album is not create.
(another issue with the javascript ?)

The feature works fine with english language file.
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

François Keller

I had a look to the change Aditya Mooley has made in the picmgr.php file.

changing the simple cote in the javascript in albmgr.php  fixes the bug for mee.
Is that changing rhigth?

Attach file my new albmgr.php file (remove the .txt)
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Joachim Müller

from the translator guide:
QuoteEscaping single quotes
As you may have noted, all translation strings are put into single quotes - this is the proper way in PHP. If you want your translation to actually contain a single quote (apostrophe), you will have to "tell" PHP that the string that was started with a single quot; doesn't end at the next single quote. This is called escaping in programming languages. PHP uses the backslash (\) to escape characters, that's why it must not be
array('Target address for the 'See more pictures' link in e-cards', 'ecards_more_pic_target', 0),
, but
array('Target address for the \'See more pictures\' link in e-cards', 'ecards_more_pic_target', 0),

Single quotes in JavaScript (//js-alert)
Things get even a bit more complicated if the output will not be only in plain HTML, but in JavaScript, as you have to escape the single quote in JavaScript with a backslash as well. That's why I marked the lines in the language file that will be JavaScript in Coppermine output later with a comment at the end of the line, saying //js-alert. If you want to have a single quote in the final output, you'll have to add 3 backslashes in front of the single quote, like in this example:

'no_change' => 'Vous n\\\'avez effectué aucun changement !', //js-alert
I suggest reviewing the french language file.

François Keller

QuoteI suggest reviewing the french language file.
No problem found in french.php
but the change Aditya Mooley has made was:
in picmgr.php changing this code
alert('<?php echo $lang_picmgr_php['pic_need_name'?>');
whith
alert("<?php echo $lang_picmgr_php['pic_need_name'?>");
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Aditya Mooley

I changed single quote to double as I saw many strings with nested single quotes in lang file. And I thought there might be some other language files also with same problem. Thus I changes PHP code instead of lang file.

If we are reviwing language files, then we can revert the changes I have made.
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

François Keller

Ok,
I've rewiewed the french language file and effectiv found any "Single quotes in JavaScript (//js-alert)" errors
Tested on my test gallery and works fine with revert Aditya changes
my new french.php file in attachment (remove txt extention)
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Joachim Müller


François Keller

Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Joachim Müller

commited your file to devel branch of cvs.
However, there's a BOM issue with your file, make sure to use a proper editor for utf-8 files.

Joachim

P.S. no need to add stuff like$Author: stefvar, Frantz, Titooy $- it's a cvs tag that will get replaced when checking in anyway, the regular credit section is all you need to edit.