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: "Hyzer, Chris" <>
  • To: Yoann Delattre <>, Francis Bouchard-Boulianne <>, "" <>
  • Subject: [grouper-dev] RE: french translations and javascript problem
  • Date: Wed, 2 May 2018 12:44:34 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) ;
  • Ironport-phdr: 9a23:ye6NHhRYKIbzJpqp5dYtl67IYdpsv+yvbD5Q0YIujvd0So/mwa67ZR2Ht8tkgFKBZ4jH8fUM07OQ7/i7HzRYqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba98IRmssQndqtQdjJd/JKo21hbHuGZDdf5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2UbJXDDI9M2Ao/8LrrgXMTRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6tvZ41SKHM8D6Uaw4VDK/5KpwVhTmlDkIOCI48GHPi8x/kqRboA66pxdix4LYeZyZOOZicq/Ye94RWGhPUdtLVyFZAo2ycZYBD/YPM+hboYnypVoOogexCgS3Huzj1iNEi2Xq0aEm0eksFxzN0gw6H9IJtXTZtNv5OqUSUOG00qbI1y3PZO5I1Df98ojIcwshrf+RVr93dMre1UkvFgPEj1qOs4zoJDKV1v8RvGSB8upgTfygi2ghqw1rvDeg29osh5DPi4kIxF7E8iB5z5w0Jd2+UEN7ecSkEJxIty6ELYt2XsIiTH9zuCogzL0Jp5C6cDAWyJs5yB/fd+aLc4aS4h77VeaRJyt4i2x/eLK5mRmy7VasxvfiWcapzVZGtjRKkt/WunAQzBze7NWMRPhl/kq5xzqAzRzf5vxBLEwpiKbXNpsswrA/m5YPrUjOGy37l1v5gaOLc0gp//ak5/jmb7n+u5OROZN4hhv6P6gzgMCzH/k0PwwUU2SG++mx1aXv/UPnT7hJkvE7l6zUvZDHKcgFpaO0BhNa34Q45Bu8CjqpzNUVnXcJIV9Adh+Kj5bmN0zILfvlF/mwmU6sny1ux/3ePr3uHJHNLn/bnbn5Ybtz7FJQxBcqwd1C/5xZBKgNIPXoVUDvrtDYCQI5MxCvzObgFdV90J4RVXiXAq+DN6PSrUGH6f4zI+mNY48VvizxK/845/7yiX85nlgdfaqz0ZQLb3C4G+xqI0SfYXXyntcMCXkGsRAiQOD3jVCOTCNfa2u3UqIy6Tw3FJ6qAILBS4+zj7GNwSK2E5hIamxaC12ACXLoeJ+FW/cIZiKSOMhhkjkcWLikV4Ah1RGvtQ7kxLp9NefU+zYYuo752Nho/+3cixcy9TpuA8uDzm6NUnl4nnkUSD8uwKB/vUt9x0+M0ahihPxYCMRT6O1TUgsjKJHT0fJ6Bsv2WgLAZdeJVE2mTsu8DTEwSNIx38EBY1x7G9q8khDPwTCmDKEImLyWV9QI9fft2HH3IY5RxnLPyLU7ghFyU8xGM2vgiqN7/hTPHYPhmk7ck6eucala0jSbsC+t12OIt0BDGCR3TK7FVGoTI2HRsND470XEQvf6J64uNABA0oioLbZBatTzgRBsQ+rnOd3YZW+ZplywCAyC3LSLb4escGxLmG2XB1IDjhge5zOKOBYWByG9rnjYASA0U1/jfgmkpeZkr26jQ1VxwwyUR0xny7ev/BMJ37qRR+5FjZwevyJ04RVlDlunm5r9C8CBvEApKKBXYcIv7U1v1HnS8RFlM5qmaa1umwhNIExMo0ry2kAvWc17ms8woSZvlVIqJA==
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

Can you please send me an example of what you are asking?

 

Thanks

Chris

 

From: Yoann Delattre [mailto:]
Sent: Wednesday, May 02, 2018 4:18 AM
To: Hyzer, Chris <>; Francis Bouchard-Boulianne <>;
Subject: Re: french translations and _javascript_ problem

 

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