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

[ESLint I18n Rule] Cleanup #181959

Merged
merged 1 commit into from Apr 29, 2024

Conversation

CoenWarmer
Copy link
Contributor

Summary

Just a tiny cleanup PR that was leftover.

@CoenWarmer CoenWarmer requested review from a team as code owners April 29, 2024 10:47
@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@CoenWarmer CoenWarmer added the release_note:skip Skip the PR/issue when compiling release notes label Apr 29, 2024
node.range,
`i18n.translate('${newI18nIdentifier}', ${opts})`
);
return [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

2 main changes:

1: Added the additional fixer which adds an import { i18n } from '@kbn/i18n' line to the imports if it wasn't there before.
2: In the previous approach we targeted the whole i18n.translate() node and reconstructed it by using the correct first parameter and getting the existing options object (if any) from the source code. Now we are a bit smarter still: we don't target the full node, we target the node of the first parameter, we just update that with the correct identifier and keep the rest of the code intact.

@CoenWarmer CoenWarmer enabled auto-merge (squash) April 29, 2024 10:53
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@CoenWarmer CoenWarmer merged commit e28cb6e into elastic:main Apr 29, 2024
19 checks passed
@kibanamachine kibanamachine added v8.15.0 backport:skip This commit does not require backporting labels Apr 29, 2024
yuliacech pushed a commit to yuliacech/kibana that referenced this pull request May 3, 2024
## Summary

Just a tiny cleanup PR that was leftover.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants