-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add lang
attribute to translated text
#7998
Conversation
…ess `html: false` is specified in the options (re: #7963) Update `text` functions to `html` to support inserting the `span` elements Specify `html: false` for various instances where a `span` is not desired, e.g. `placeholder` and `title` attributes
# Conflicts: # modules/ui/fields/combo.js
# Conflicts: # modules/ui/commit_warnings.js # modules/ui/field.js # modules/ui/fields/wikidata.js # modules/ui/fields/wikipedia.js # modules/ui/full_screen.js # modules/ui/panels/history.js # modules/ui/sections/entity_issues.js # modules/ui/sections/map_features.js # modules/ui/sections/raw_member_editor.js # modules/ui/sections/validation_rules.js # modules/ui/tag_reference.js
Add `t.html` function for getting the string with the `lang` attribute
Clean up a few things from prior commit
I ended up making this backwards-compatible, so developers won't see different behavior from the Haven't yet achieved 100% coverage of the UI, but I'm happy with the groundwork so I went ahead and merged. |
Closes #7963.
Turns out that adding a
lang
attribute to every text snippet in iD is a sweeping proposition 😬This type of change isn't ideal, but I think it's necessary in making iD a first-class multilingual app. We can't really have mixed text throughout the UI without specifying what text is in what language. And some users of iD will always see mixed text unless we had a professional translation team that reaches 100% coverage in every language for every release (highly unlikely).