Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Bug when switching in Italian language Topic is solved

Questions related to using nuBuilder Forte.
Post Reply
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Bug when switching in Italian language

Unread post by yvesf »

Hello,


I am experiencing a bug with a customer lucio/lucio which uses the italian language in his nubuilder profile. He was working previously in italian language and suddenly came back to me explaining that the application doesn't work anymore. Looking at it, I have found finally that changing the language solves the issue.
I have tried to switch to another language different than italian and it is working perfectly.
Looking into the database table zzzzsys_translate around italian words, nothing has changed : it is exactly the same records. (tested with extraction of all italian labels exported in xml format and then compare output files with compareit --> no difference between the pb base and a brand new base).
I don't know which records are involved in this language issue. It seems that the customers has been able to change something.
Any help would be highly appreciated. Database attached. If you switch lucio to italian, you cannot use the product anymore.

Yves
Last edited by kev1n on Thu Mar 02, 2023 6:40 am, edited 1 time in total.
Reason: Attachment removed for privacy reasons
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Bug when switching in Italian language

Unread post by kev1n »

Hi Yves,

Have you done that?
If you encounter an issue, be sure to check the developer console for errors by clicking the `F12` key on most browsers.
I see errors:
2023-03-02_063741.png
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Bug when switching in Italian language

Unread post by kev1n »

I think this should fix it:

Replace:

Code: Select all

var d = { 'y': o[3], 'm': FMT[nuTranslateToEnglish(o[1])].jsmonth, 'd': o[2], 'h': time[0], 'n': time[1], 's': time[2] };	//-- today's date time[2]};	//-- today's date
with

Code: Select all

var d = { 'y': o[3], 'm': FMT[o[1]].jsmonth, 'd': o[2], 'h': time[0], 'n': time[1], 's': time[2] };	//-- today's date time[2]};	//-- today's date

https://github.com/nuBuilder/nuBuilder- ... s.js#L1026


PS: There's a typo in the form's Custom Code:

Now:

Code: Select all

    nuSetvalue ('inv_quantité', '1.00');
Corrected:

Code: Select all

    nuSetValue ('inv_quantité', '1.00');
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: Bug when switching in Italian language

Unread post by yvesf »

Hello Kev1n,

Your correction has solved the issue. It is strange that it worked until yesterday ? How can we explain that ? Why the problem appears with italian language only ? Do I have to deploy this fix to the other projects ? Anyway many thanks for this and for the typo (ooops).

Yves
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Bug when switching in Italian language

Unread post by kev1n »

The problem has probably existed for some time, but in your case it causes the form to freeze. Have you updated nuBuilder recently?
The issue is that it tries to translate "Mar" (Short for March) into Italian (Tu), and then it looks that string up in a format object, which only contains English names. In short, if nuTranslateToEnglish() is removed, the problem no longer occurs.
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: Bug when switching in Italian language

Unread post by yvesf »

Kev1n,
Understood,many thx for your reactivity as usual. If you have time....

Yves
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Bug when switching in Italian language

Unread post by kev1n »

Fix is on Github.
Post Reply