Forum

Problems with lists...
 
Notifications
Retirer tout

Problems with lists of objects

20 Posts
2 Utilisateurs
0 Reactions
14 {numéro}K Vu
(@jean-luc)
Posts: 73
Active Member
Début du sujet
 

So it seems you broke something in the lang.js file that prohibits its loading.
Some special caracters may cause this, or some "not reallu special" ones suche as point or line break.

No « special characters ». Therefore, nothing is loaded neither for french nor for english, and this one is pure ASCII !
Verified all end-of-line : LR+NL (DOS-Windows) everywhere. Tried NL (Unix), no change.
Found an error due to sort made on the entire file (except first and last lines which are delimiters: the last line (currentLocaleOfFile) was not in alphabetical place, so it was moved to the middle without terminal comma, whereas the new last line (year) kept a comma. But afted correction, still no change.

How did you generate lang.js file ?
Did you use lang.xls ?

Not at this time, only direct update in lang.js files.

But fr/lang.js and en/lang.js (identical to nls/lang.js, a symbolic link would be more appropriate than a duplication… but problematic under Windows, I suppose) have been in-depth checked, I’m sure they are O.K.
However, they are in attachment here (suffixes with ".txt" to be accepted as attachments), so you can verify by yourself..


 
Posté : 23 Juin AM 10:066
(@babynus)
Posts: 14952
Membre Admin
 

No « special characters ». Therefore, nothing is loaded neither for french nor for english, and this one is pure ASCII !
Verified all end-of-line : LR+NL (DOS-Windows) everywhere. Tried NL (Unix), no change.
Found an error due to sort made on the entire file (except first and last lines which are delimiters: the last line (currentLocaleOfFile) was not in alphabetical place, so it was moved to the middle without terminal comma, whereas the new last line (year) kept a comma. But afted correction, still no change.

Can you try and retrieve standard lang.js file and check that profile names are translated in the list (working fine with standard version).
Then add progressively you new tranlation lines, and check progressivemely to find which new line brings the issue.

Not at this time, only direct update in lang.js files.

Advise : use lang.xls file to add new lines and generate lang.js files

But fr/lang.js and en/lang.js (identical to nls/lang.js, a symbolic link would be more appropriate than a duplication… but problematic under Windows, I suppose) have been in-depth checked, I’m sure they are O.K.

As translation works fine woth standard version and not with your own, I'm almost sure issue comes from the new lines.

However, they are in attachment here (suffixes with ".txt" to be accepted as attachments), so you can verify by yourself..

Sorry, but I'll spend no time to analyze your own changes. I would do this only for paid support customers.


 
Posté : 23 Juin PM 13:066
(@jean-luc)
Posts: 73
Active Member
Début du sujet
 

OK, found. ONE key had a hyphen, that javascript didn’t digest!
This implies that javascript, somewhere in the load process, convert these keys to variables, I don’t see why…

Now, all works. 🙂


 
Posté : 23 Juin PM 16:066
(@jean-luc)
Posts: 73
Active Member
Début du sujet
 

Thus I have to create a "colorTranslateNameFormatter" (found the module containing these functions. 😉 )
(possible enhancement for a future version, no ?)

Possible.
But I will not spend time on this, as I pesonnaly see no interest to it.
If you code it, please post it so that include change in later version.

Done, very easy.

Just:
1. duplicate colorNameFormatter in view/js/projeqtorFormatter.js et tool/formatter.php, renaming the copy as colorTranslateNameFormatter;
2. in tool/formatter.php, replace in "return" line with html code "$val" by "i18n($val)";
3. in view/js/projeqtorFormatter.js, replace in "return" line with html code "val" by "i18n(val)".
Now, you can replace in various models «formatter="colorNameFormatter"» with «formatter="colorTranslateNameFormatter"» in translatable colored fields.
It works perfectly. 😛


 
Posté : 23 Juin PM 16:066
(@babynus)
Posts: 14952
Membre Admin
 

Thanks.


 
Posté : 23 Juin PM 16:066
Page 2 / 2
Share:
Retour en haut