Skip to content
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

[Tools] Fix pug regular expression #24006

Merged
merged 3 commits into from
Oct 17, 2018

Conversation

LeanidShutau
Copy link
Contributor

Actual
i18n_check parses only interpolation expressions in Pug: #{i18n(...)}.

Expected
i18n function can be called without #{...} interpolation, e.g. h2= i18n(...)
i18n_check tool should parse all possible i18n(...) use cases.

@LeanidShutau LeanidShutau added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Project:i18n v6.5.0 labels Oct 15, 2018
@LeanidShutau LeanidShutau self-assigned this Oct 15, 2018
@elasticmachine
Copy link
Contributor

💔 Build Failed

@LeanidShutau
Copy link
Contributor Author

retest

Copy link
Member

@azasypkin azasypkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/dev/i18n/extractors/pug.test.js Show resolved Hide resolved
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@maryia-lapata maryia-lapata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
I checked with an example: .kibanaWelcomeText(data-error-message=i18n('common.ui.welcomeErrorMessage', { defaultMessage: 'Kibana did not load properly. Check the server output for more information.' }))
The message is extracted by the tool.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@LeanidShutau
Copy link
Contributor Author

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@LeanidShutau LeanidShutau merged commit 9326e8f into elastic:master Oct 17, 2018
@LeanidShutau LeanidShutau deleted the fix/i18n-pug-regex branch October 17, 2018 09:44
LeanidShutau added a commit to LeanidShutau/kibana that referenced this pull request Oct 17, 2018
* [Tools] Fix pug regular expression

* Add one more test
LeanidShutau added a commit that referenced this pull request Oct 17, 2018
* [Tools] Fix pug regular expression

* Add one more test
@LeanidShutau
Copy link
Contributor Author

6.x/6.5: b2ba7c3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported Project:i18n Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v6.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants