[7.17] [@kbn/plugin-generator] Skip .i18nrc.json for internal plugins (#150556) (#150694)

# Backport

This will backport the following commits from `main` to `7.17`:
- [[@kbn/plugin-generator] Skip `.i18nrc.json` for internal plugins
(#150556)](https://github.com/elastic/kibana/pull/150556)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Alejandro Fernández
Haro","email":"alejandro.haro@elastic.co"},"sourceCommit":{"committedDate":"2023-02-09T13:03:12Z","message":"[@kbn/plugin-generator]
Skip `.i18nrc.json` for internal plugins (#150556)\n\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"90590d0ac5131e4f39ad625d5f7ca8dec09478c9","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:Core","Team:Operations","Project:i18n","release_note:skip","backport:all-open","v8.8.0"],"number":150556,"url":"https://github.com/elastic/kibana/pull/150556","mergeCommit":{"message":"[@kbn/plugin-generator]
Skip `.i18nrc.json` for internal plugins (#150556)\n\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"90590d0ac5131e4f39ad625d5f7ca8dec09478c9"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/150556","number":150556,"mergeCommit":{"message":"[@kbn/plugin-generator]
Skip `.i18nrc.json` for internal plugins (#150556)\n\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"90590d0ac5131e4f39ad625d5f7ca8dec09478c9"}}]}]
BACKPORT-->

Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
This commit is contained in:
Kibana Machine 2023-02-09 19:28:58 -05:00 committed by GitHub
parent 593b21bb10
commit 7be562392f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View file

@ -83,7 +83,6 @@ it('generates a plugin without UI', async () => {
Array [
<absolute path>/plugins/bar/.eslintrc.js,
<absolute path>/plugins/bar/.gitignore,
<absolute path>/plugins/bar/.i18nrc.json,
<absolute path>/plugins/bar/common/index.ts,
<absolute path>/plugins/bar/kibana.json,
<absolute path>/plugins/bar/package.json,

View file

@ -86,7 +86,7 @@ export async function renderTemplates({
excludeFiles(
([] as string[]).concat(
answers.ui ? [] : 'public/**/*',
answers.ui && !answers.internal ? [] : ['translations/**/*', 'i18nrc.json'],
answers.ui && !answers.internal ? [] : ['translations/**/*', '.i18nrc.json'],
answers.server ? [] : 'server/**/*',
!answers.internal ? [] : ['.eslintrc.js', 'tsconfig.json', 'package.json', '.gitignore']
)