CMS Made Simple Forums
https://forum.cmsmadesimple.org/

[closed]Installer:single quote will break JavaScript in Fr
https://forum.cmsmadesimple.org/viewtopic.php?f=84&t=70554
Page 1 of 2

Author:  jce76350 [ Thu Jul 03, 2014 7:49 am ]
Post subject:  [closed]Installer:single quote will break JavaScript in Fr

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']

Author:  jce76350 [ Sun Jul 20, 2014 10:23 am ]
Post subject:  Re: [open]Installer:single quote will break JavaScript in Fr

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

Author:  calguy1000 [ Sun Jul 20, 2014 6:56 pm ]
Post subject:  Re: [open]Installer:single quote will break JavaScript in Fr

should be fixed now.

Author:  jce76350 [ Sun Jul 20, 2014 7:29 pm ]
Post subject:  Re: [open]Installer:single quote will break JavaScript in Fr

\$1:
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']

Author:  jce76350 [ Sun Jul 20, 2014 8:01 pm ]
Post subject:  Re: [open]Installer:single quote will break JavaScript in Fr

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';

Author:  jce76350 [ Thu Jul 24, 2014 7:45 pm ]
Post subject:  Re: [open]Installer:single quote will break JavaScript in Fr

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)

Author:  calguy1000 [ Sat Jul 26, 2014 2:54 pm ]
Post subject:  Re: [open]Installer:single quote will break JavaScript in Fr

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.

Author:  jce76350 [ Sat Jul 26, 2014 4:22 pm ]
Post subject:  Re: [open]Installer:single quote will break JavaScript in Fr

\$1:
With the latest snapshot built phar-installer I could not reproduce this problem.


as you see on the post above

\$1:
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_

Author:  calguy1000 [ Sat Jul 26, 2014 5:11 pm ]
Post subject:  Re: [open]Installer:single quote will break JavaScript in Fr

fixed in svn, thanks.

Author:  jce76350 [ Sat Jul 26, 2014 5:44 pm ]
Post subject:  Re: [open]Installer:single quote will break JavaScript in Fr

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'

Author:  calguy1000 [ Sat Jul 26, 2014 6:48 pm ]
Post subject:  Re: [open]Installer:single quote will break JavaScript in Fr

should now be fixed... I call addslashes instead of escape.

Author:  jce76350 [ Sat Jul 26, 2014 7:17 pm ]
Post subject:  Re: [open]Installer:single quote will break JavaScript in Fr

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.

Author:  Rolf [ Sat Sep 06, 2014 6:01 pm ]
Post subject:  Re: [open]Installer:single quote will break JavaScript in Fr

is this fixed in 2.0, JC?

Author:  jce76350 [ Sun Sep 07, 2014 1:05 pm ]
Post subject:  Re: [open]Installer:single quote will break JavaScript in Fr

\$1:
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

Author:  Rolf [ Tue Jan 13, 2015 12:31 pm ]
Post subject:  Re: [open]Installer:single quote will break JavaScript in Fr

Could you please re-test this issue in the Beta 3 release?

Thanks, Rolf

Page 1 of 2 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/