Conversation
|
The PR title is misleading. I was expecting all components in widgets to have been translated. Was that your original plan and you just wanted to confirm the approach before translating the remaining components? |
It's still a draft, I'm still working on it. So yes, currently just seeing what the best approach would be. |
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
|
I like the approach and wouldn't know a better way right now. |
Yeah I haven't updated the jsdoc and the proptype for
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Hey @cooper-joe, I was wondering what you think of the translations. These are the ones I've gone with for the Single- and MultiSelectField: Let me know if you'd prefer otherwise and I'll update them. |
Thanks for the ping! I'd like to request some minor changes:
|
|
Great work @ismay, glad to see these are all functions so we won't run into the issues we encountered last week in many repos. The way we have organised the components has changed quite a bit lately so I'm not completely sure where we'd want to add this.... But according to our design system, the
Could you add a ToDo item for that too? In the design specs there are more default texts to be found:
But I think these two are for later on, when we introduce a component that allows us to interact with the file-resources endpoint, i.e. with async functionality. |
@joe Yeah you're right, I remember that we had it and removed it because there were concerns about interpolation with RTL languages. I'm going to test this in the scheduler, see what the issue is exactly. I've addressed these points btw:
|
@HendrikThePendric N.p. 👍 I've added it to the top comment |
So, this took a while, and I don't have a definitive answer, but it seems safe enough. See here: dhis2/notes#103. So we could use an interpolation and use |
Great! Yes, let's use that for the default. I think it's best to include the search term inside single quotes to highlight it as user-content: |
Actually, I was wrong, sorry. It's not possible to include the filter as that's not known at the point where we define the default. Unless we change our translation strategy, but that would be a major change. I'll leave it as is, if you're all right with that as well. |
Ah ok. I see the problem. In that case, let's go for: |
|
@cooper-joe I've added three more default translations for the FileInputField and the FileInputFieldWithList:
Let me know what you think. |
Those look good to me @ismay 👍 |
|
🎉 This PR is included in version 5.0.0-alpha.16 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 5.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |

This adds default, translated texts for our widgets, where appropriate. So say, a placeholder for a filter input. Usually devs will leave those types of placeholders as is, so it makes sense for us to set a proper default.
Since we're not relying on the namespace being set correctly when the modules are parsed, we're delaying the call to i18n.t by allowing a function as prop for the translatable texts. A potential follow up: do we want to allow that for all our string/renderable text props, so that our users can do the same?
Currently I'm just changing things in widgets, so core components are not affected for the time being.
See also: https://dhis2.slack.com/archives/CBM8LNEQM/p1588767905388900 (translations)
Todo:
Follow up: