opendcim / openDCIM

An open source (GPL v3) Data Center Inventory Management (DCIM) application.
http://opendcim.org
302 stars 203 forks source link

French language pack breaks configuration screen.. #1055

Open NickSifniotis opened 6 years ago

NickSifniotis commented 6 years ago

.. or 'unescaped single quotes are breaking the Javascript'

I was trying out the different languages and I noticed that when I switched to French, the 'configuration' screen breaks, as per the screenshot below.

screenshot from 2018-07-07 11-35-34

I dug around in the code and found that the issue is being caused by unescaped single quotation marks in the translated text being passed through to Javascript strings.

var modal=$('<div />', {id: 'modal', title: 'Erreur de changement de type d'attribut d'équipement personnalisé '}).html('<div id="modaltext">AAAAAAAAAAHHHHHHHHHH!!!  *crash* *fire* *chaos*<br><br>Quelque chose n'a pas fonctionné correctement</div>').dialog ...

Perhaps it would be worth modifying the gettext functions to escape these, or substitute them with a HTML code like & # 3 9 ; .

wilpig commented 6 years ago

This has already been fixed for the next release

On Jul 6, 2018 9:01 PM, Nick Sifniotis notifications@github.com wrote:

.. or 'unescaped single quotes are breaking the Javascript'

I was trying out the different languages and I noticed that when I switched to French, the 'configuration' screen breaks, as per the screenshot below.

[screenshot from 2018-07-07 11-35-34]https://user-images.githubusercontent.com/4010503/42405474-c37cd00e-81d9-11e8-850d-c62ca07bd827.png

I dug around in the code and found that the issue is being caused by unescaped single quotation marks in the translated text being passed through to Javascript strings.

var modal=$('

', {id: 'modal', title: 'Erreur de changement de type d'attribut d'équipement personnalisé '}).html('
AAAAAAAAAAHHHHHHHHHH!!! crash fire chaos

Quelque chose n'a pas fonctionné correctement
').dialog ...

Perhaps it would be worth modifying the gettext functions to escape these, or substitute them with a HTML code like & # 3 9 ; .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/samilliken/openDCIM/issues/1055, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABk8enDGdykDGyCpL7mOL1wzf3qw-Mt5ks5uEBaKgaJpZM4VGME_.