Closed dennybiasiolli closed 2 years ago
Thanks @dennybiasiolli. Is it standard to use underscore in vue and not the dot notation? I did translations a while ago and we used the dot notation and so I stuck that that. Wondering the reason to use underscore. Thanks.
Thanks @dennybiasiolli. Is it standard to use underscore in vue and not the dot notation? I did translations a while ago and we used the dot notation and so I stuck that that. Wondering the reason to use underscore. Thanks.
Well, you can also use the dot notation, but in that case you have to change the translation files acting like objects. Check more here: https://kazupon.github.io/vue-i18n/guide/formatting.html#named-formatting
You can use them with the dot notation changing translation files from
"getInformedDisplay.1": "Acceptable IDs",
"getInformedDisplay.2": "State voter ID information",
"getInformedDisplay.3": "More Information from your State",
"getInformedDisplay.4": "State Voting Info",
to
"getInformedDisplay": {
"1": "Acceptable IDs",
"2": "State voter ID information",
"3": "More Information from your State",
"4": "State Voting Info"
},
@upkarlidder I agree with @dennybiasiolli here. The underscore is better for these particular strings. A nicer why to group the string would be as suggested:
"getInformedDisplay": {
"1": "Acceptable IDs",
"2": "State voter ID information",
"3": "More Information from your State",
"4": "State Voting Info"
},
But in that case I don't think 1,2,3,4 would be used. Instead maybe "acceptable", "stateId", "moreInfo", "stateInfo".
@upkarlidder lmk what you think. The newer Spanish translation are causing a merge conflict here but I'll resolve that with when I merge this PR.
@davidnixon I can rebase this PR if you want 😉
Sounds good. We also have new translations. We can add that after merging this here. Thank you @dennybiasiolli!
Contributes to #288
What did you do?
Why did you do it?
The translation strings are not working with the "dot" notation in their key. https://kazupon.github.io/vue-i18n/guide/formatting.html#named-formatting
Were docs updated if needed?
Type of change
Checklist: