Open GregAscolab opened 2 days ago
Hi. I was unable to reproduce this behavior via Scheduler (it uses Generate Report rule node anyway) My tenant user uses English and customer user uses Ukrainian: Try to restore default Generate Report rule chain logic and check the correct message in debug. Also, are you sure that this customer uses translation configured in Account -> Profile and not browser settings?
I try with scheduler... something strange...
1/ Click on "Generate Test Report" in scheduler dialog box : The message is not routed as "generateReport" message type, but updateValue... So generation of the report is done... magically internally ??? ;-) There is no rule chain to manage it, but I get a pdf report : Always in english, no user language, whatever my tenant user language is.
2/ When scheduler fire it's event :
Generate Report
rule chain (no modification)My scheduler config :
Generate Report Node debug :
=== a6254680-92a3-11ef-9285-db91bf15ba2b
Received email :
Dashboard from g.pub account in French, on web site :
g.pub user settings :
I don't understand...
Plaese clarify the next: Do you use customer user or sub-customer user credentials? Is it some standard widgets with default translations? Do you use custom translation, maybe in {i18n} format?
Informations :
Do you use customer user or sub-customer user credentials?
I want report generated by customer user (g.pub) No sub-customer users for the moment, but can be in futur.
Is it some standard widgets with default translations? Do you use custom translation, maybe in {i18n} format?
Yes and no, standard alarm table widget. But I also use i18n translation from "standard translation" and from added "custom translation".
And lot of custom i18n in cell content :
Still can't reproduce under specified conditions
var map = {
"CRITICAL": "{i18n:custom.severity.critical}",
"MAJOR": "{i18n:custom.severity.major}"
};
return map[value] ? map[value] : value;
{
"custom": {
"severity": {
"critical": "Custom Critical Severity",
"major": "Custom Major Severity"
},
"title": {
"alarmTitle": "Custom Alarm Title"
}
}
}
Hum...
I checked my "g.pub" user...
Something strange : In user account parameters, the language is set to "French". But I cannot change it !
I can select a new language, but there is no "SAVE" button. So I get warning popup message : "You didn't save changes..."
It seems to be my problem !
When I use my tenant user to generate the report : the report language change according my tenant user language settings !
Good...
It seems that my "customers user" don't have the right to change language. Which right it is ?
This is "Profile" permission.
So there is something mixed up : In a way or another, the language has been set to the user (when creating the new user?), because logging as g.pub make the site in French. But report engine seems to check if user has the right to change is language.
I was able to reproduce your behavior and it is not a bug.
Describe the bug Report are not generated in the user language.
When using the generate report rule node, and setting the
userId
by script, frommsg.originatorId
(for example).The report is generated and I can send it by email.
But in my case I sent an email per customer user. So each user generate its own report to be sent (according user rights/visibility). But the user language preference is not apply when generating report.
Add reportConfig
Node :msg.originatorId
is the user Id.Your Server Environment
Your Client Environment
To Reproduce Steps to reproduce the behavior:
generateReport
node(Maybe same problem using "scheduler" ?)
Expected behavior User's language preference must be apply when generating report.
Disclaimer
We appreciate your contribution whether it is a bug report, feature request, or pull request with improvement (hopefully). Please comply with the Community ethics policy, and do not expect us to answer your requests immediately. Also, do not treat GitHub issues as a support channel.