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: "Hyzer, Chris" <>, Francis Bouchard-Boulianne <>, "" <>
  • Subject: [grouper-dev] Re: french translations and javascript problem
  • Date: Wed, 2 May 2018 10:18:04 +0200
  • Arc-authentication-results: i=1; auth=pass
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ac-lille.fr; s=aclille-dkim; t=1525249096; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a1PCXhGAYmXK1goMKXxeeCPFx6txgxxZTyoQl85pG3E=; b=ayrQN8WyuvNWmK0TGsfsVTXvui2RJW89V0vGnFE/RqvO5pBM0h9J1LQoTtoPiBsiaKfEzN rLPHyjfg3HJcrtFMAIaWP+tpEr3N9U+VR67cUt9BGkz5ko9qly7VDa47zK11pP5iaUXyD2 ijivt1YWjq6u6KVdHv4ncnbEBqlCzCk=
  • Arc-seal: i=1; s=aclille-dkim; d=ac-lille.fr; t=1525249096; a=rsa-sha256; cv=none; b=BwDFvQoonarFJqEPcNB3CqlAd7Dm6Obyr36p9CfxjtYBh6wIvSctcBdbXe/UF1yLVntF1NnDsonrsIolPpyz/YEau3UNgvlY1YhBK+RriLdBhPRPq8zCCjtV6RqBCDDAfPavc2+QnYLyiB7AHtjm62Y/xH0jddVC28FUgrjwkY8=
  • Authentication-results: auth=pass
  • Ironport-phdr: 9a23:sTr0Ixy5ThgcO8nXCy+O+j09IxM/srCxBDY+r6Qd0uoVIvad9pjvdHbS+e9qxAeQG9mDsLQc06L/iOPJYSQ4+5GPsXQPItRndiQuroEopTEmG9OPEkbhLfTnPGQQFcVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZvJuTyB4Xek9m72/q99pHPbQhEniaxba9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wBMr1RxrMZJKFRUiOQ9O6DCs3Q85rhdICfgw1T9q4iQ3b0jDvD7ILv72NGJEu9K/AhT78K9srmFjc06x0vl4vRM0HGWCij7Jj7QWbU5/OmkOf0aqnca0AwDTA3G6IiG6PuEVVFgBqB/aWFUsDb1fb+IyqrnjJSKWjXPF+alNM

Hi Chris,

thanks a lot !
Just tested, and i have one suggestion : there are a lot of extra spaces and lines in the translated file, is it possible to delete them ?

Thanks again :)
Yoann.

Le 26/04/2018 à 16:56, Hyzer, Chris a écrit :

Ive been meaning to put this in the grouperInstaller.  I added it.  If you want to get the latest grouperInstaller you can try to translate from there:

 

https://bugs.internet2.edu/jira/browse/GRP-1744

 

https://spaces.internet2.edu/display/Grouper/Grouper+UI+text+translation

 

Let me know what you think

 

Thanks

Chris

 

From: Yoann Delattre []
Sent: Tuesday, April 24, 2018 9:47 AM
To: Francis Bouchard-Boulianne ; Hyzer, Chris ;
Subject: Re: french translations and _javascript_ problem

 

Hi,

the first version had a little "split" problem.
in attached, the new version.

thanks,
Yoann

Le 24/04/2018 à 12:13, Yoann Delattre a écrit :

Hello,

in attached, a little script in python who basically do what Francis describe.
The script don't ask (yet) the name of the base file and so work only with french translation (unless you change the code) but it's a start :)

Just execute it in a folder where there is grouper.text.fr.fr.base.properties and grouper.text.en.us.base.properties and the result will be a new file (grouper.text.fr.fr.base.properties.new).
Also, it print the translations who are missing.

Thanks,

Yoann

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

Hi,

 

I will try to be as clear as I can.

 

The idea is to keep in synch the different languages with the master english strings and be able to spot missing strings without messing the file.  IDE are good to filter missing values but very bad at keeping the file organised. So, the tool would basically :

 

·         Take as input two files

o   The original base english file

o   The translated file from IDE (i’m changing the file name so that the IDE recognize them as ressource bundle)

·         It would ask me (or command-line option) for output filename. In my case that would be grouper.text.fr.fr.base.properties

·         Process :

o   Copy the base english file to the new specified name (say « newfile »)

o   Strip all vlaues from the file

o   Foreach key of the translated file, put the value into the « newfile »

·         Save « newfile »

That would end-up with a translated file, with all the keys from the english file, but the values from the translated file AND with the comments and block from the english file.

 

Hope that is clear.

Working on attestation’s translations (love that feature!)

Thanks

Francis

 

De : Hyzer, Chris []
Envoyé : 15 février 2018 10:37
À : Francis Bouchard-Boulianne ; Yoann Delattre ;
Objet : RE: french translations and _javascript_ problem

 

So you want a program where you input the grouper text file, and the translated one, and it creates a new file with the translations there, and the new properties blank so you can add the translations?  And print out which ones it needs?

 

Thanks

Chris

 

From: [] On Behalf Of Francis Bouchard-Boulianne
Sent: Thursday, February 15, 2018 10:16 AM
To: Yoann Delattre <>;
Subject: [grouper-dev] RE: french translations and _javascript_ problem

 

Ok that works, but with much more translations !! J

 

Working on them and a pull request will follow.

 

Yoann, you might want to review the pull request once it is done to ensure consistency.

 

At one point I would like to ask someone to write a script to take the english base file, strip the values and insert the french values to the keys in order to synch the attributes. If someone has such a script, please let me know. I don’t have time to work on that.

 

Francis

 

De : Yoann Delattre []
Envoyé : 15 février 2018 05:41
À : Francis Bouchard-Boulianne <>;
Objet : Re: french translations and _javascript_ problem

 

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