Details
-
Bug
-
Status: Closed (View Workflow)
-
P3
-
Resolution: Done
-
5.0.0
-
Volaris Sprint 147, Volaris Sprint 146
-
3
-
Volaris
-
GBV, University of Leipzig
Description
Overview: refactor ControlledVocab to accept translation keys as props and issue a console deprecation warning when such props are not provided.
Details: ControlledVocab strings with a placeholder for {type} cannot be correctly translated in some languages. Instead of CV having translation keys with values like
"The {type} <b>{term}</b> will be <b>deleted.</b>"
it needs to accept as props translation keys with values like
"The patron group <b>{term}</b> will be <b>deleted.</b>"
To avoid a breaking change, the existing CV translation keys should stay in place and be used only if new props are not provided. Using the existing CV translation keys should cause a deprecation warning in the console. Maybe add a new prop, translations, an object shaped like this:
"cannotDeleteHeader": "ui-users.cv.foo.cannotDeleteHeader", "cannotDeleteMessage": "ui-users.cv.foo.cannotDeleteMessage", "noneExist": "ui-users.cv.foo.noneExist", "willDelete": "ui-users.cv.foo.willDelete", "wasDeleted": "ui-users.cv.foo.wasDeleted",
Why do we have to do this? Doesn't everybody speak American?
A German translation of
"The {type} <b>{term}</b> will be <b>deleted.</b>"
is
"Der {type} <b>{term}</b> wird <b>gelöscht.</b>" "Die {type} <b>{term}</b> wird <b>gelöscht.</b>" "Das {type} <b>{term}</b> wird <b>gelöscht.</b>"
depending on genus of {type}.
TestRail: Results
Attachments
Issue Links
- relates to
-
STRIPES-708 Discourage placeholders in I18N documentation
-
- Closed
-
-
UICIRC-849 provide local translations to ControlledVocab
-
- Closed
-
-
UICR-163 Provide local translations to ControlledVocab. UI-Course Reserves
-
- Open
-
-
UIIN-2167 Provide local translations to ControlledVocab. UI-Inventory
-
- Open
-
-
UINOTES-135 NOTES - provide local translations to ControlledVocab
-
- Closed
-
-
UIOR-1018 Orders - provide local translations to ControlledVocab
-
- Closed
-
-
UISACQCOMP-123 Add common util which will provide translations for <ControlledVocab>
-
- Closed
-
-
STRIPES-748 Add example section to doc/i18n.md
-
- Closed
-
- mentioned in
-
Page Loading...