I have some problems when translating my OpenSearch Dashboards app to my language. It works all fine, but the reporting plugin does not. When I navigate using the side bar it works, but the Reporting button inside a dashboard/search/visualization disappears!!
Hi @alexc,
what tool are you using to translate the app?
Is the butting missing in the developer console?
As far as I can see the “Reporting” button isn’t different from the rest, so it’s not clear why this particular one would be missing.
Thanks, Patryk
Hi, @Patryk1, thanks for replying!
I have a .i18nrc file inside Opensearch Dashboards’ root folder, with this line at the end:
“translations”: [“translations/es.json”]. Also, in the .yml config file I specify “es” as i18n.locale.
Additionally in the reports plugin folder, C:.…\opensearchDashboards\plugins\reportsDashboards, I have a “translations” folder with file “es.json” containing the translations. In the reports folder I have also another file 18nrc.json with the same line as before, “translations”: [“translations/es.json”].
As I mentioned before, when I restart my app it appears translated. If I navigate to reporting using the side bar it works correctly, the plugin is translated. However, in dashboards and saved searches, the “Reporting” button does not appear. If I delete the config for translating, when the app is in English, the button shows again. The only thing that I see that is different between this button and the rest is the following, when I look at the html code (inside a dashboard):
As you can see, the only difference I see is that the reporting button does not have a “data-test-subj” elem, instead it has an id, “downloadReport”. I have tried many things, changing the location of folders, the content of the i18nrc files and it doesn’t work. Do you have any idea?
Hi @alexc, sorry for the late reply.
Are you finding this field or any equivalent in “translations/es.json"? Maybe it was overlooked. I’ll try to reproduce it when I get a chance to see if I’m seeing the same behavior from my side.
Thank you, Patryk
Hi @Patryk1, in my es.json I’m sure I have all the literals belonging to the reporting plugin, in fact, my reporting plugin if you access through the sidebar is perfectly translated. As an example, I have these literals that are well translated:
Somewhere in the github repo I found time ago other literals that belong exactly to the topbar that appears in dashboards, where my “Reporting” button disappears. I can see that the literals of the rest of the button are the same in my actual version (“dashboard.topNave.cloneButtonAriaLabel” and “dashboard.topNave.cloneConfigDescription” for “Clone”, and the same for Cancel, Share…). In my json I also have these two:
"dashboard.topNave.reportingButtonAriaLabel" and
"dashboard.topNave.reportingConfigDescription"
However, now I can’t find them in any js. Maybe that’s the issue and the reason why the button doesn’t show.