Skip to Content.
Sympa Menu

grouper-dev - [grouper-dev] Re: french translations and javascript problem

Subject: Grouper Developers Forum

List archive

[grouper-dev] Re: french translations and javascript problem


Chronological Thread 
  • From: Yoann Delattre <>
  • To: Francis Bouchard-Boulianne <>, "" <>
  • Subject: [grouper-dev] Re: french translations and javascript problem
  • Date: Thu, 15 Feb 2018 11:41:29 +0100
  • Dkim-filter: OpenDKIM Filter v2.11.0 webmail.ac-lille.fr 8B57FCEE07
  • Ironport-phdr: 9a23:nWCU1xaTinN8an37ANgg/Nb/LSx+4OfEezUN459isYplN5qZr8SybnLW6fgltlLVR4KTs6sC17KN9fi4EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCazbL9oMBm6sRjau9ULj4dlNqs/0AbCrGFSe+RRy2NoJFaTkAj568yt4pNt8Dletuw4+cJYXqr0Y6o3TbpDDDQ7KG81/9HktQPCTQSU+HQRVHgdnwdSDAjE6BH6WYrxsjf/u+Fg1iSWIdH6QLYpUjm58axlVAHnhzsGNz4h8WHYlMpwjL5AoBm8oxBz2pPYbJ2JOPZ7eK7WYNEUSndbXstJSiJPHI28YYsMAeQPM+lXoIvyqEcVoBSkGQWhHvnixiNGi3L026AxzuQvERvB3AwlB98BsnPUo8/zNKcUTOu7wrfHzTHZYPNKxTf98pbHeQ0mrPCMWrJ/a8zRyU81GwzYkFqQrZbqPy+J1uQXrWeW9PBvWv62h24jqgFxpjyvydk2honHnIIY01bJ/jh6zoYtPdC0VUp2bNG+HJdNsyyXM5F6T8EmTm1ypSo2174LtJimdyYQ0psn3QTQa/mffoiI/B3jUOGRLC9ii3J7eb+znQy9/lS5xu34V8m01FJKoTRfntnCrHABzx3T6s6ZRfth5kqtxDKC2g/J5u1ZJU05kbDXJpwlz7Iqi5YfrEfOEjfzmErsja+Wcksk+vKv6+TierjnppicOJVyigH4KKghh9KwAeAiPQgSQ2ib4/qz2ab58kLlWblKivw2kq3dsJ/EP8gbqLS5DxdP0ok/8xa/Eyum0NMAkHkINlJFfw+Hj5D3NFHUOfz3EOmwg0q3nTdvxvDGJaHhAo7TInTZkbfhe6p95FBGyAo1099f+4xYBqsfL/3uR0+i/ODfWzEjOgq/wv2vItJg3YMXQ27KKKiENKLbt1mFrrYBOeCKb44O/hz6NvMl7uTiyFU+hFscdK+v0LMqU3C1BP58JEKabDzni4FFWS0FpA0jVOHwzVGPTxZSYWq/RaQx+mt9BY67R8+XSZqqnaSMxmK3E4N+Z2ZaB0qKHGuyMYiIRqFfRjiVJ5pQlTUCU/CNRosoyQ20uUeu2r1uKOyS9iAcvI7/ztVd7uaWkRA28TEyAd7LgDLFdH19gm5dH2x+56t4u0Eojw7biaU=

Hello Francis,

Test with the latest patch for the UI : you can create/view/edit attribut def and attribute def name in the New UI.

Yoann


Le 14/02/2018 à 16:01, Francis Bouchard-Boulianne a écrit :

Hi,

 

I added a lot of french translations recently. I discovered that a few of them introduced bugs in the UI.

 

Some translations use quotes ( ' ) like «  l’attribut ». This is ok most of the time, but some dialogs or toolips will make the _javascript_ code break.

 

An example is the property simpleAttributeUpdate.editPanelDeleteConfirm

« simpleAttributeUpdate.editPanelDeleteConfirm                        = Ceci supprimera la d\u00E9finition d'attribut, tous les noms de d\u00E9finition d\'attribut associ\u00E9s, et toutes les affectations et les valeurs. \u00CAtes-vous s\u00FBr de vouloir le supprimer? »

I tried to \-escape \\-escape. Only the double escape works. The generated _javascript_ is the following. If I remove the quote, it works again. This is weird though since you translate you can’t always know where this string will be used and if it is used in JS AND normal text.

 

With no escape or simple escape in the properties:

<input class="redButton" _onclick_="if (confirm('Ceci supprimera la définition *d'attribut*, tous les attributs associés, et toutes les affectations et les valeurs. Êtes-vous sûr de vouloir le supprimer?')) {ajax('../app/SimpleAttributeUpdate.attributeEditPanelDelete', {formIds: 'attributeEditFormId'}); } return false;" value="Supprimer" style="margin-top: 2px" type="submit">

 

With double escape :

<input class="redButton" _onclick_="if (confirm('Ceci supprimera la définition *d\'attribut*, tous les attributs associés, et toutes les affectations et les valeurs. Êtes-vous sûr de vouloir le supprimer?')) {ajax('../app/SimpleAttributeUpdate.attributeEditPanelDelete', {formIds: 'attributeEditFormId'}); } return false;" value="Supprimer" style="margin-top: 2px" type="submit">

 

You can test this property :

·        Go in the simple interface 

·        Attribute and permission

·        Attribute def

·        Select an attribute definition

·        Modify the attribute def

·        Try to delete it.

o   The dialog will not appear if there is a quote.

 

Is this a bug or should I log one.

___________________________________________

Francis Bouchard B. M. Sc.

Analyste – Analyse et assurance qualité - division Systèmes d’information.

Service des technologies de l’information

Université de Sherbrooke

 

Tél. : 819 821-8000, poste 63465

Courriel :

 





Archive powered by MHonArc 2.6.19.

Top of Page