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
[I18n] Fix pseudo-localization of i18n directive placeholders #26948
[I18n] Fix pseudo-localization of i18n directive placeholders #26948
Conversation
Pinging @elastic/kibana-platform |
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked locally. Works as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you!
Do you think its possible to add 1 or 2 small unit tests for the part you added? i know the whole file is not tested but it would help to have those tests in place even if only for that small part alone.
@LeanidShutau Looks good, placeholders are only words? no |
💔 Build Failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
💔 Build Failed |
…ders-pseudo-localization
💚 Build Succeeded |
…c#26948) * [I18n] Fix pseudo-localization of i18n directive placeholders * Add a unit test * Add more tests
#27192) * [I18n] Fix pseudo-localization of i18n directive placeholders * Add a unit test * Add more tests
6.x/6.6: 85780a2 |
Bug
In #26274 we have added
@I18N@
placeholders for html values ini18n-values
attribute. Pseudo-localization localizes these placeholders, so they cannot be replaced by their original values after pseudo-localization. It breaks messages withhtml_
values whenen-xa
locale is used.Fix
Update pseudo-localization RegExp to ignore
@I18N@valueName@I18N@
sub-strings.How to test
Enable pseudo-locale (
yarn start --i18n.locale en-xa
or seti18n.locale: "ex-xa"
inkibana.yml
).Open Timelion -> Help:
@I18N@
placeholders in the text and no rendered html code;