Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Javascript errors with French language....  (Read 6473 times)

0 Members and 1 Guest are viewing this topic.

etienne

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 17
    • Etienne's Gallery
Javascript errors with French language....
« on: December 30, 2003, 08:39:21 am »

In French translations, there are some quotes.
When these translations are used in javascripts, this leads to errors.
For example, in albmgr.php we have the following javascript:
Code: [Select]
alert('Vous n'avez effectué aucun changement !').

Probably the solution is to enclose the string parameter between double-quotes... (assuming there is no double-quote within translations!).
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Javascript errors with French language....
« Reply #1 on: December 30, 2003, 08:43:03 am »

no, the solution is to escape the single quotes like this
Quote
alert('Vous n\'avez effectué aucun changement !')
(with a backslash in front of it).
Could you go through french.php and fix the errors that occur? I'll send you a pm with my email address, I'd appreciate you sending me the corrected version.

GauGau
Logged

etienne

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 17
    • Etienne's Gallery
Javascript errors with French language....
« Reply #2 on: December 30, 2003, 09:00:25 am »

Gaugau,

in fact the quotes are already escaped...
what needs to be change is the way the alert is coded.
Code: [Select]
alert('<?php echo $lang_albmgr_php['no_change'&#93; ?>');
always generates  alert('Vous n'avez effectué aucun changement !') that is wrong

On my site I've changed it to:
Code: [Select]
alert("<?php echo $lang_albmgr_php['no_change'&#93; ?>");

and it now works!
Logged

Titooy

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 736
    • under construction...
Javascript errors with French language....
« Reply #3 on: December 30, 2003, 06:06:55 pm »

Actually that was solved some months ago... it's strange that these solutions didn't take place in the new release...

http://forum.coppermine-gallery.net/viewtopic.php?p=2948#2948

A corrected french translation was even provided by Rodinou...

It seems that the 1.2.1 was based on an ancient one :?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Javascript errors with French language....
« Reply #4 on: December 31, 2003, 09:29:58 am »

things like that can happen, with a lots of people sending in translation files where they change the bits they're concerned about.
Please forgive this oversight...
To use a string with a single quote inside JavaScript PopUps they have to be escaped two times, making it a total of three backslashes, like this
Quote
'Vous n\\\'avez effectué aucun changement !'
I'm sure I've already explained this on the thread dealing with translations.

GauGau
Logged

binocle

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
    • http://www.surf-bzh.com
bug with french language
« Reply #5 on: January 03, 2004, 05:36:04 pm »

I use coppermine1.1 for more than 6 month I've try the 1.2 version.
When I try to create album, when using the french language, no album is creates.
When I try to create albums, when using the english language, i've got no problem.
I don't understant what happen  :?
Logged

Titooy

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 736
    • under construction...
Javascript errors with French language....
« Reply #6 on: January 03, 2004, 05:44:11 pm »

The problem has already been discuted but was not yet solved in the distribution.

Here is my corrected version
http://titooy.free.fr/coppermine_lang_french.zip
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Javascript errors with French language....
« Reply #7 on: January 04, 2004, 01:53:08 am »

merged the last two postings before mine to this thread (were originally posted as different thread). I've uploaded the proposed fixes of Titooy to the download section (minus some additions that are not in the standard distribution), get it here: cpg1.2.1lang_french.zip - they will go into the next release as well. Thanks for the contribution...

GauGau
Logged

chtito

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 186
  • I run Mac OS X, despite the penguin ;)
Error in French translation
« Reply #8 on: January 04, 2004, 12:07:02 pm »

There is an error in the date formats in the French translation.

Here are the right formats:

Code: [Select]

// The various date formats
// See http://www.php.net/manual/en/function.strftime.php to define the variable below
$album_date_fmt =    '%e %B %Y';
$lastcom_date_fmt =  '%d/%m/%y à %H:%M';
$lastup_date_fmt = '%e %B %Y';
$register_date_fmt = '%e %B %Y';
$lasthit_date_fmt = '%e %B %Y à %H:%M';
$comment_date_fmt =  '%e %B %Y à %H:%M';


cheers
Logged
Vous pouvez poser vos questions en français sur le forum francophone !
Pages: [1]   Go Up
 

Page created in 0.05 seconds with 18 queries.