Open adelisle opened 4 years ago
Pinging @elastic/kibana-operations (Team:Operations)
also bumped into this problem in https://discuss.elastic.co/t/the-problem-with-a-custom-translation-file/230370/2
I had the same error but it seems the file produced by the script i18n_extract contains some comments useful to people doing the translation. Theses comments should not be present in the JSON file used by Kibana.
To get rid of theses comments I've used the provided script i18n_integrate which generates a new JSON from your translated one.
node scripts/i18n_integrate --source path/to/locale.json --target locale-integrated.json
If you put the generated file in the translations
folder you should get rid of the errors.
Kibana version: 7.5.0 Elasticsearch version: 7.5.0 Server OS version: Windows 10 Browser version: Edge 82.0.453.2 Browser OS version: Windows 10 Original install method (e.g. download page, yum, from source, etc.): From source Describe the bug:
node scripts/i18n_extract --output-dir ./translations
produces a file according to format specified here but, once configured to be used as a source translation file, errors like this are produced:Steps to reproduce:
translations
existsnode scripts/i18n_extract --output-dir ./translations
.i18nrc.json
kibana.yml
to use the new localeyarn start
The same error is visible in the Console Logs of the broswer if a page load is attempted.
Expected behavior: The form of messages with
text
andcomment
is supported as produced by the extraction tool.Screenshots (if relevant):
Errors in browser console (if relevant):
Provide logs and/or server output (if relevant):
Any additional context: I have managed to fix this issue for me using the following patch.
In this file, replace the line:
with