Page 1 of 2

[closed]Installer:single quote will break JavaScript in Fr

Posted: Thu Jul 03, 2014 7:49 am
by jce76350
Hi,

if a lang string have single quote
(ex : ... au panneau d\'administration ...
the message is not displayed
if the lang string is : au panneau administration
the message is displayed

so the lang string are used into the files :
in app/wizard/class.wizard_step9.php
- all the string $lang['finished_

in app\wizard/class.wizard_step7.php
- $lang['install_extractfiles'] --> OK in SVN 116

in app/templates/index.tpl
- $lang['confirm_freshen']
- $lang['confirm_upgrade']

Re: [open]Installer:single quote will break JavaScript in Fr

Posted: Sun Jul 20, 2014 10:23 am
by jce76350
In last SVN 114
same problem with "send_admin_email" OK in SVN 116
line 96 \app\wizard\class.wizard_step9.php

If the lang file is
$lang['send_admin_email'] = 'Envoyer les informations d\'identification par email pour la connexion d\'administration';
the message is not displayed on step9

If the string is
$lang['send_admin_email'] = 'Envoyer les identifiants par email pour la connexion Admin';
the message is displayed on step9

Re: [open]Installer:single quote will break JavaScript in Fr

Posted: Sun Jul 20, 2014 6:56 pm
by calguy1000
should be fixed now.

Re: [open]Installer:single quote will break JavaScript in Fr

Posted: Sun Jul 20, 2014 7:29 pm
by jce76350
should be fixed now.
Rev 116 Not OK for
in app/templates/index.tpl
- $lang['confirm_freshen']
- $lang['confirm_upgrade']

EDIT
Not OK for
in app/wizard/class.wizard_step9.php
- all the string $lang['finished_

OK for
in app\wizard/class.wizard_step7.php
- $lang['install_extractfiles']

Re: [open]Installer:single quote will break JavaScript in Fr

Posted: Sun Jul 20, 2014 8:01 pm
by jce76350
Rev 116 OK for this string
line 96 \app\wizard\class.wizard_step9.php
$lang['send_admin_email'] = 'Envoyer les informations d\'identification par email pour la connexion d\'administration';

Re: [open]Installer:single quote will break JavaScript in Fr

Posted: Thu Jul 24, 2014 7:45 pm
by jce76350
to temporarily correct the problem

- $lang['confirm_freshen']
- $lang['confirm_upgrade']
and all the string $lang['finished_

are translated into French by replacing the ' (apostrophe) with the ' (right single quote)

Re: [open]Installer:single quote will break JavaScript in Fr

Posted: Sat Jul 26, 2014 2:54 pm
by calguy1000
With the latest snapshot built phar-installer I could not reproduce this problem.

I used the .phar file in 'freshen' mode, in French, on an existing 2.0-beta2 install, and watching the javascript console for errors. The confirmation messages appeared just fine and no javascript errors were encountered.

Re: [open]Installer:single quote will break JavaScript in Fr

Posted: Sat Jul 26, 2014 4:22 pm
by jce76350
With the latest snapshot built phar-installer I could not reproduce this problem.
as you see on the post above

Code: Select all

to temporarily correct the problem
- $lang['confirm_freshen']
- $lang['confirm_upgrade']
and all the string $lang['finished_
are translated into French by replacing the ' (apostrophe) with the ' (right single quote)
so to test You need to replace the ' (right single quote) by ' (apostrophe)
and you won't have any messages
- $lang['confirm_freshen']
- $lang['finished_

Re: [open]Installer:single quote will break JavaScript in Fr

Posted: Sat Jul 26, 2014 5:11 pm
by calguy1000
fixed in svn, thanks.

Re: [open]Installer:single quote will break JavaScript in Fr

Posted: Sat Jul 26, 2014 5:44 pm
by jce76350
sorry not, the French language is not easy ;)

test with Rev 122
with $lang['confirm_freshen']='Êtes-vous sûr(e) de vouloir rafraîchir l\'installation existante de CMSMS ?'; // ' (apostrophe)
freshen : '{'confirm_freshen'|tr|escape}' shows
Êtes-vous sûr(e) de vouloir rafraîchir l'installation existante de CMSMS ?
so not correct it would be
Êtes-vous sûr(e) de vouloir rafraîchir l'installation

and the $lang['finished_ are not displayed besause the problem is on the set_block_html('bottom_nav'

Re: [open]Installer:single quote will break JavaScript in Fr

Posted: Sat Jul 26, 2014 6:48 pm
by calguy1000
should now be fixed... I call addslashes instead of escape.

Re: [open]Installer:single quote will break JavaScript in Fr

Posted: Sat Jul 26, 2014 7:17 pm
by jce76350
1/2 solved in rev 125

Ok the the $lang['confirm_freshen']
tha'ts fine

But not for the set_block_html
the $lang['finished_ are not displayed
so the the JavaScript break the output.

The ' (right single quote) into our translation works and
I suggests to leave out this problem at the moment.
Try later afert the beta2.

Re: [open]Installer:single quote will break JavaScript in Fr

Posted: Sat Sep 06, 2014 6:01 pm
by Rolf
is this fixed in 2.0, JC?

Re: [open]Installer:single quote will break JavaScript in Fr

Posted: Sun Sep 07, 2014 1:05 pm
by jce76350
is this fixed in 2.0, JC?
not at this moment, the $lang['finished_.. are not displayed is we use ' (apostrophe)
ON TC now the strings are translated with with the ' (right single quote)
if no translator has problem with these strings, it is possible to consider the problem solved for now temporarily

Re: [open]Installer:single quote will break JavaScript in Fr

Posted: Tue Jan 13, 2015 12:31 pm
by Rolf
Could you please re-test this issue in the Beta 3 release?

Thanks, Rolf