Details
-
Type:
Bug
-
Status: Open (View Workflow)
-
Priority:
P3
-
Resolution: Unresolved
-
Affects Version/s: 5.0.0
-
Fix Version/s: None
-
Labels:
-
Template:
-
Development Team:Stripes Force
-
Affected Institution: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> will be <b>deleted.</b>" "Die {type} <b>{term}</b> will be <b>deleted.</b>" "Das {type} <b>{term}</b> will be <b>deleted.</b>"
depending on genus of {type}.
TestRail: Results
Attachments
Issue Links
- relates to
-
STRIPES-708 Discourage placeholders in I18N documentation
-
- Closed
-
-
STRIPES-748 Add example section to doc/i18n.md
-
- Closed
-
- mentioned in
-
Page Loading...