Kibana: [Localization] Support for French Language

Created on 8 Mar 2019  路  18Comments  路  Source: elastic/kibana

With localization introduced in 6.7, we will now begin tracking requests for specific languages. This request is to support French.

i18n Core enhancement

Most helpful comment

Hi @nonow53, we are still missing certain pieces in terms of workflow for to account for full i18n readiness and to be able to support end-to-end localization, so until that's in place, we are on hold in terms of adding additional languages. This is something we're trying to build out in the coming months.

All 18 comments

Pinging @elastic/kibana-platform

good news, we are waiting to have french translation, could you please tell us when it will be available ?

What are the guidelines to implement new translations for a language ?

Hi @nonow53, we are still missing certain pieces in terms of workflow for to account for full i18n readiness and to be able to support end-to-end localization, so until that's in place, we are on hold in terms of adding additional languages. This is something we're trying to build out in the coming months.

Me and especially my company are very interested by this feature!
I'm also interested to know what are the guidelines to implement a new translation.

@chiweichang is there a meta issue/pr for all missing pieces for full i18n support?

The main missing pieces involve quality assurance. We have no good way to ensure that a translation is accurate, and we also have no good way to allow people to report issues with translations. Since we cannot ensure the quality, it does not make sense for us to proceed with additional languages.

As far as guidelines, if you are creating the translation for you own use, then those guidelines fall upon your own discretion. If you are asking what you would need to do for us to accept a translation and support it, we do not plan on having a mechanism for this for the reasons I just outlined.

Thank for your answer.
So the question is: how to add a new translation on my own kibana instance? Is there a way/tool to generate a kibana i18n file with whole english translations get from all kibana source files?

hey @fbaligand I think these two links might be helpful for learning more about our technical approach to i18n and generating the translation files.

https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md
https://github.com/elastic/kibana/blob/master/src/dev/i18n/README.md

@Bamieh is there any other content that might be helpful for a custom translation?

Thank you very much for this helpful documentation!

I try to create a plugin, with only french translations inside.
I didn't find information in documentation to create a minimalist plugin with only translations inside (no or few js/ts files).
But I found this core plugin:
https://github.com/elastic/kibana/tree/master/x-pack/plugins/translations

I installed a plugin (in plugins dir) with:

  • kibana.json (with "server": true)
  • package.json (with classic content for a plugin)
  • server/index.ts (with same content than https://github.com/elastic/kibana/blob/master/x-pack/plugins/translations/server/index.ts)
  • translations/fr.json (with one message for advancedSettings.advancedSettingsLabel label

Then I changed i18n.locale: "fr" in kinana.yml, and started Kibana

But when I go to management tab, "Advanced settings" entry is still written in english.
What did I missed?

Or maybe there is a better way to add translations than add a plugin?

I finally manage to build a plugin with some french translation and works fine with Kibana 7.7.0
The key point was that a .i18nrc.json file must be added in plugin's root folder.
And it should contain this:

{
  "translations": [
    "translations/fr.json"
  ]
}

So here's the "french translations" sample plugin I wrote:
french-translations-0.1.0.zip

By the way, the tool to build a plugin package (using yarn build) has a little bug:
it does not include the ".i18nrc.json" file in the generated package.

@fbaligand You need to select yes when prompted with the question Should translation files be generated? when using the plugin generator tool. Did that not work for you?

Hi @Bamieh,

I created my plugin "from zero".
So now, I followed your advice and used plugin generator tool.
But I don't get the question you mentioned.

Here's my output (based on Kibana v7.7.0 tagged code):

node scripts/generate_plugin french_translations
? Would you like to create the plugin in a different folder?
? Provide a short description Kibana French Translations
? What Kibana version are you targeting? 7.7.0
? Should an app component be generated? No
? Should a server API be generated? Yes
? Would you like to use a custom eslint file? No

Same thing for me I had to create the ".i18nrc.json" to make it works.

It's may be a good idea to create a "kibana_community_translations" plugin to centralize translations files from the community. We can start with the french translation and found people to translate other languages.

The file is huge with about 15000 translations x-pack included, so the translation will be faster with the help of the all community :)

What do you think guys ? (@fbaligand, @obrahimi, @nonow53)

I created a repository to do that: https://github.com/pchakour/kibana_community_translations

Good idea!

great ! Now, I must find the time to work on it .. :)

I've ran the following on master and it seems working:

node scripts/generate_plugin.js test

image

Generated plugin files:

image

I'll checkout to 7.7 and check if there are any issues there.

Thanks @Bamieh for your test on master branch.
And thanks in advance for your future test on 7.7 branch.
Much appreciated.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rashidkpc picture rashidkpc  路  116Comments

ctindel picture ctindel  路  81Comments

doubret picture doubret  路  105Comments

Alex-Ikanow picture Alex-Ikanow  路  364Comments

stormpython picture stormpython  路  74Comments