Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Can't create a new album with an other name that "Nouvel Album"  (Read 6285 times)

0 Members and 1 Guest are viewing this topic.

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9096
  • aka Frantz
    • Ma galerie
Can't create a new album with an other name that "Nouvel Album"
« on: September 23, 2005, 01:31:10 pm »

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.
« Last Edit: October 17, 2005, 08:04:49 am by GauGau »
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9096
  • aka Frantz
    • Ma galerie
Re: Can't create a new album with an other name that "Nouvel Album"
« Reply #1 on: September 23, 2005, 01:53:33 pm »

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)
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Can't create a new album with an other name that "Nouvel Album"
« Reply #2 on: September 23, 2005, 10:28:48 pm »

from the translator guide:
Quote
Escaping 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
Code: [Select]
array('Target address for the 'See more pictures' link in e-cards', 'ecards_more_pic_target', 0),, but
Code: [Select]
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:
Code: [Select]
'no_change' => 'Vous n\\\'avez effectué aucun changement !', //js-alert
I suggest reviewing the french language file.
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9096
  • aka Frantz
    • Ma galerie
Re: Can't create a new album with an other name that "Nouvel Album"
« Reply #3 on: September 24, 2005, 08:19:28 am »

Quote
I 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
Code: [Select]
alert('<?php echo $lang_picmgr_php['pic_need_name'?>');whith
Code: [Select]
alert("<?php echo $lang_picmgr_php['pic_need_name'?>");
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 781
    • My Sweet Home
Re: Can't create a new album with an other name that "Nouvel Album"
« Reply #4 on: September 24, 2005, 08:33:45 am »

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.
Logged
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9096
  • aka Frantz
    • Ma galerie
Re: Can't create a new album with an other name that "Nouvel Album"
« Reply #5 on: September 24, 2005, 10:01:04 am »

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)
« Last Edit: September 24, 2005, 10:18:43 am by Frantz »
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Can't create a new album with an other name that "Nouvel Album"
« Reply #6 on: September 24, 2005, 10:09:40 am »

something's wrong with your attachment: it's empty.
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9096
  • aka Frantz
    • Ma galerie
Re: Can't create a new album with an other name that "Nouvel Album"
« Reply #7 on: September 24, 2005, 10:19:34 am »

ok  sorry  :-\\
correct file attaced on previous post
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Can't create a new album with an other name that "Nouvel Album"
« Reply #8 on: September 24, 2005, 10:53:48 am »

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
Code: [Select]
$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.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 18 queries.