{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/kibana/issues/7545","repository_url":"https://api.github.com/repos/elastic/kibana","labels_url":"https://api.github.com/repos/elastic/kibana/issues/7545/labels{/name}","comments_url":"https://api.github.com/repos/elastic/kibana/issues/7545/comments","events_url":"https://api.github.com/repos/elastic/kibana/issues/7545/events","html_url":"https://github.com/elastic/kibana/pull/7545","id":162175179,"number":7545,"title":"[wip] i18n Plugin","user":{"login":"hickeyma","id":14892004,"avatar_url":"https://avatars.githubusercontent.com/u/14892004?v=3","gravatar_id":"","url":"https://api.github.com/users/hickeyma","html_url":"https://github.com/hickeyma","followers_url":"https://api.github.com/users/hickeyma/followers","following_url":"https://api.github.com/users/hickeyma/following{/other_user}","gists_url":"https://api.github.com/users/hickeyma/gists{/gist_id}","starred_url":"https://api.github.com/users/hickeyma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hickeyma/subscriptions","organizations_url":"https://api.github.com/users/hickeyma/orgs","repos_url":"https://api.github.com/users/hickeyma/repos","events_url":"https://api.github.com/users/hickeyma/events{/privacy}","received_events_url":"https://api.github.com/users/hickeyma/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Bargs","id":6239176,"avatar_url":"https://avatars.githubusercontent.com/u/6239176?v=3","gravatar_id":"","url":"https://api.github.com/users/Bargs","html_url":"https://github.com/Bargs","followers_url":"https://api.github.com/users/Bargs/followers","following_url":"https://api.github.com/users/Bargs/following{/other_user}","gists_url":"https://api.github.com/users/Bargs/gists{/gist_id}","starred_url":"https://api.github.com/users/Bargs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bargs/subscriptions","organizations_url":"https://api.github.com/users/Bargs/orgs","repos_url":"https://api.github.com/users/Bargs/repos","events_url":"https://api.github.com/users/Bargs/events{/privacy}","received_events_url":"https://api.github.com/users/Bargs/received_events","type":"User","site_admin":false},"assignees":[{"login":"Bargs","id":6239176,"avatar_url":"https://avatars.githubusercontent.com/u/6239176?v=3","gravatar_id":"","url":"https://api.github.com/users/Bargs","html_url":"https://github.com/Bargs","followers_url":"https://api.github.com/users/Bargs/followers","following_url":"https://api.github.com/users/Bargs/following{/other_user}","gists_url":"https://api.github.com/users/Bargs/gists{/gist_id}","starred_url":"https://api.github.com/users/Bargs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bargs/subscriptions","organizations_url":"https://api.github.com/users/Bargs/orgs","repos_url":"https://api.github.com/users/Bargs/repos","events_url":"https://api.github.com/users/Bargs/events{/privacy}","received_events_url":"https://api.github.com/users/Bargs/received_events","type":"User","site_admin":false}],"milestone":null,"comments":31,"created_at":"2016-06-24T15:45:50Z","updated_at":"2016-08-04T15:05:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/elastic/kibana/pulls/7545","html_url":"https://github.com/elastic/kibana/pull/7545","diff_url":"https://github.com/elastic/kibana/pull/7545.diff","patch_url":"https://github.com/elastic/kibana/pull/7545.patch"},"body":"i18n Plugin\r\n-----------\r\n-   Manages the language translations for Kibana\r\n-   Responsible for loading translated content per language\r\n-   The translations file are JSON files with a flat keyspace, where the keys are unique. This uniqueness between translation plugins could be achieved by prefixing the keys with the plugin name. The key signifies the translation ID which would be referenced in translatable files (like JS, HTML etc.).\r\n-   The key value is the translation string\r\n\r\n-   Example translation JSON file\r\n\r\n`kibana-en.json`\r\n\r\n```json \r\n    {\r\n        \"CORE-WELCOME_MESSAGE\": \"is loading. Give me a moment here. I'm loading a whole bunch of code. Don't worry, all this good stuff will be cached up for next time!\",\r\n        \"CORE-WELCOME_ERROR\": \"Kibana did not load properly. Check the server output for more information.\"\r\n    }\r\n```\r\n\r\n-   Core Kibana plugins like ‘kibana’ and ‘status\\_page’ could come with their own English translations bundled in\r\n-   API:\r\n    -   Register translations:\r\n        -   *registerTranslations(\\<absolute_path_to_translation_file\\>)*\r\n        -   The path to the translation file is registered with i18n plugin\r\n    -   Fetch the list of currently supported languages:\r\n        -   *getRegisteredTranslationLanguages()*\r\n        -   Returns a list of all languages as language codes for which translations are registered\r\n    -   Fetch a specific language translated content bundle:\r\n        -   *getRegisteredLanguageTranslations(\\<language\\_code\\>)*\r\n        -   Returns a JSON object of all registered translations for the language code specified\r\n-   Deliverable:\r\n    -   Translate the start-up message (“Kibana is loading ...”)in the Jade template\r\n        ([*https://github.com/elastic/kibana/blob/master/src/ui/views/ui\\_app.jade*](https://github.com/elastic/kibana/blob/master/src/ui/views/ui_app.jade))\r\n    -   Plugin Unit tests \r\n    -   Jade template verification of translation strings:\r\n        -   Enforce a pattern to be used. For example a `translate(<key>)` function in the Jade template. A tool can then be used to find such pattern and extract the keys to file.\r\n        -   The keys in the key file(s) would then be checked against the language translation files registered\r\n    -   Core plugin registers its translation file during the initialization phase. The translation file contains strings for the welcome message and the start-up error message."},"comment":{"url":"https://api.github.com/repos/elastic/kibana/issues/comments/237581967","html_url":"https://github.com/elastic/kibana/pull/7545#issuecomment-237581967","issue_url":"https://api.github.com/repos/elastic/kibana/issues/7545","id":237581967,"user":{"login":"hickeyma","id":14892004,"avatar_url":"https://avatars.githubusercontent.com/u/14892004?v=3","gravatar_id":"","url":"https://api.github.com/users/hickeyma","html_url":"https://github.com/hickeyma","followers_url":"https://api.github.com/users/hickeyma/followers","following_url":"https://api.github.com/users/hickeyma/following{/other_user}","gists_url":"https://api.github.com/users/hickeyma/gists{/gist_id}","starred_url":"https://api.github.com/users/hickeyma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hickeyma/subscriptions","organizations_url":"https://api.github.com/users/hickeyma/orgs","repos_url":"https://api.github.com/users/hickeyma/repos","events_url":"https://api.github.com/users/hickeyma/events{/privacy}","received_events_url":"https://api.github.com/users/hickeyma/received_events","type":"User","site_admin":false},"created_at":"2016-08-04T15:05:57Z","updated_at":"2016-08-04T15:05:57Z","body":"@Bargs, @epixa, @shikhasriva. @srl295 Looking to try and drive on the implementation from WIP to ready for reviews for merging.  This PR should cover \"Phase 1\" of the design (#6515).\r\n\r\nHopefully this checklist below covers all open issues that need to be resolved (let me know if not):\r\n\r\n- [ ]   Should we use the [negotiator](https://github.com/jshttp/negotiator#accept-language-negotiation) instead of [language parser](https://github.com/opentable/accept-language-parser)? \r\n- [ ]   Should the algorithm for deciding the translation language be a delivery for Phase 1?\r\n- [ ]   *'What do we do when the requested language exists, but it doesn't cover all translations keys (for instance, there are French translations for a plugin but not core Kibana)? Do we fill in the missing keys with the default language?'* We may have an issue here now as how do we resort to a default language for a group of identifiers as the current implementation of i18n plugin has no reference to translations for a particular plugin. Translations for different plugin maybe registered as different translations plugins. There is no easy key to check to simply return translations for a language of a particular group of identifiers.\r\n- [ ]   Minor issues:\r\n     - [ ]   Elapsed time logic would be worth putting in a function?\r\n     - [ ]   Remove `en-US` translations file\r\n     - [ ]   Add 'Kibana' to the welcome message identifier\r\n     - [ ]   Add 'Kibana' to the welcome message identifier\r\n     - [ ]   Update `language` variable in `getTranslationDetailsFromFile` function with variable name that better describes the full locale   "}}
{"actor":{"display_login":"hickeyma"}}