-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Kibana Globalization - Phase 1 #7545
Commits on Dec 13, 2016
-
Manages languages that are available and is responsible for loading translated content at the granularity of a plugin. To be done: - APIs for store and retrieval
Configuration menu - View commit details
-
Copy full SHA for aca671f - Browse repository at this point
Copy the full SHA aca671fView commit details -
Use Kibana install as root for the translation store directory
Setting the path for storing the bundled language translation files to <KIBANA_INSTALL>/data/store_translations/<PLUGIN_NAME>
Configuration menu - View commit details
-
Copy full SHA for c3ba578 - Browse repository at this point
Copy the full SHA c3ba578View commit details -
Updated i18n core plugin APIs to be asynchronous
To be done: - Better error handling in APIs - Fix threading issue with storePluginLanguageTranslations API
Configuration menu - View commit details
-
Copy full SHA for 80d8a2c - Browse repository at this point
Copy the full SHA 80d8a2cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 856fb02 - Browse repository at this point
Copy the full SHA 856fb02View commit details -
Configuration menu - View commit details
-
Copy full SHA for c5d22be - Browse repository at this point
Copy the full SHA c5d22beView commit details -
Change to use NodeJS mkdirp function for creating directories recursi…
…vely Updates with review comments from @srl295. Changed export syntax to show the exported functions at end of file.
Configuration menu - View commit details
-
Copy full SHA for b37e4f8 - Browse repository at this point
Copy the full SHA b37e4f8View commit details -
Add REST API for getting translations of a language for a plugin
To be done: - Add algorithm to decide on the language for a plugin by comparing the accept languages from the REST call and the plugin supported languages - Add REST API tests
Configuration menu - View commit details
-
Copy full SHA for ec6d2b1 - Browse repository at this point
Copy the full SHA ec6d2b1View commit details -
Add algorithm for determining plugin language when retrieving transla…
…tions Client would pass languages used in the 'accept-language' header. These languages would then be compared against the plugin supported languages and best compared language would be selected. To be done: - Add REST API tests
Configuration menu - View commit details
-
Copy full SHA for a75faae - Browse repository at this point
Copy the full SHA a75faaeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 66d051b - Browse repository at this point
Copy the full SHA 66d051bView commit details -
Configuration menu - View commit details
-
Copy full SHA for c3403e7 - Browse repository at this point
Copy the full SHA c3403e7View commit details -
Update register translations API to be independent of plugin name and…
… language The register API is updated to be independent of plugin name and language. The API will now traverse the path given and create language bundles as per language files it traverses. The translations files structure has also been simplified to be just key/value objects. To be done: - Add hapi API to get translations - Extend the API tests to test responses
Configuration menu - View commit details
-
Copy full SHA for 0f4902d - Browse repository at this point
Copy the full SHA 0f4902dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9785df2 - Browse repository at this point
Copy the full SHA 9785df2View commit details -
Configuration menu - View commit details
-
Copy full SHA for d41fcec - Browse repository at this point
Copy the full SHA d41fcecView commit details -
From review elastic#7545 (comment) following comments updated: - README, .gitignore, and .eslintrc are not needed in a core plugin - package.json only needs name and version - unit tests need to go in a tests directory otherwise they won't get picked up by the grunt tasks. Also our convention is to name the test file with the same name as the module it's testing (so i18n_tests.js should just be i18n.js) - For consistency with the rest of the code base, rename the data directory to fixtures. - Prefer const (or let if necessary). Don't use var. - Use ES6 imports/exports rather than commonjs style - Only export the i18n module's public API. For instance, I don't think getPluginTranslationDetails is used outside of the i18n module, so it shouldn't be exposed publicly. If you want to expose it for testing purposes, I would recommend creating an i18n directory with an index.js file that exports the module's public API, and a separate i18n.js file with the "private" API. index.js will be for public use, i18n.js will be for private internal use.
Configuration menu - View commit details
-
Copy full SHA for c8b2197 - Browse repository at this point
Copy the full SHA c8b2197View commit details -
From review (elastic#7545 (comment)): - i18n module API should return promises for async operations instead of using callbacks - All filesystem access should be async - Unit tests need to be updated based on new proposed plugin structure (single language file, not split by view) From design (elastic#6515 (comment)): - Removed API as will consider in later phase TODO: - Make write function async
Configuration menu - View commit details
-
Copy full SHA for e17653d - Browse repository at this point
Copy the full SHA e17653dView commit details -
Updated write function to be asynchronous
Configuration menu - View commit details
-
Copy full SHA for eaf35ab - Browse repository at this point
Copy the full SHA eaf35abView commit details -
Update registerTranslations API to take absolute translation file as …
…argument The API originally took the directory as the argument but following reviews it was decided to change to absolute file because it will be less brittle since it is more explicit.
Configuration menu - View commit details
-
Copy full SHA for f1974ca - Browse repository at this point
Copy the full SHA f1974caView commit details -
Translate the Kibana welcome message
Translates the start-up message (“Kibana is loading ...”)in the Jade template. To be done: - Means to register the core plugin translations. They are currently added in the fixtures directory as static files. Need to be generated on the fly.
Configuration menu - View commit details
-
Copy full SHA for 10db458 - Browse repository at this point
Copy the full SHA 10db458View commit details -
Add build task to generate core plugin translations
Task which calls registerTranslations API and then a task which copies the regsitered translations to <kibana_root>/build/kibana
Configuration menu - View commit details
-
Copy full SHA for 4957173 - Browse repository at this point
Copy the full SHA 4957173View commit details -
Add hook to optimize module to add registration during dev startup
Registration of the core plugin translations during development start of Kibana server. The translations include the welcome message and server error startup message.
Configuration menu - View commit details
-
Copy full SHA for 5f61475 - Browse repository at this point
Copy the full SHA 5f61475View commit details -
Handle scenario when the user preferred language header is not passed
The UI when loading asks i18n plugin which language translation to use depending on the user preferred language header 'accept-language'. This commit is to handle scenario where header is not passed. The algorithm then chooses the default language.
Configuration menu - View commit details
-
Copy full SHA for 9fbe6d5 - Browse repository at this point
Copy the full SHA 9fbe6d5View commit details -
Replace registering of translations at plugin install time to the plu…
…gin init phase This change follows review comments in: elastic#6515 (comment)
Configuration menu - View commit details
-
Copy full SHA for 32d5034 - Browse repository at this point
Copy the full SHA 32d5034View commit details -
Comments: - elastic#7545 (diff) - elastic#7545 (diff)
Configuration menu - View commit details
-
Copy full SHA for 8c7f51c - Browse repository at this point
Copy the full SHA 8c7f51cView commit details -
Update after plugin folder layout changes in Kibana
This require to use <kibana_root>/data for registered translations and i18n plugin moved to core_plugins from plugins. Refer to PR for more details: elastic#7562
Configuration menu - View commit details
-
Copy full SHA for b84f40a - Browse repository at this point
Copy the full SHA b84f40aView commit details -
Update translation registration to file path rather than bundling
After review discussions it was agreed to just register the absolute paths to translation files rather than bundling each file into one central file at registration.
Configuration menu - View commit details
-
Copy full SHA for 2dd3065 - Browse repository at this point
Copy the full SHA 2dd3065View commit details -
This commit contains the following review comments: - elastic#7545 (diff) - elastic#7545 (diff) - elastic#7545 (diff) - elastic#7545 (diff) - elastic#7545 (diff) - elastic#7545 (diff) - elastic#7545 (diff) - elastic#7545 (diff) - elastic#7545 (diff)
Configuration menu - View commit details
-
Copy full SHA for db11a2d - Browse repository at this point
Copy the full SHA db11a2dView commit details -
The following review comments are included in the commit: - elastic#7545 (comment) - elastic#7545 (comment) - elastic#7545 (comment)
Configuration menu - View commit details
-
Copy full SHA for 8c39a8d - Browse repository at this point
Copy the full SHA 8c39a8dView commit details -
Expose the i18n APIs in the server object for plugin access
Plugins should call the i18n plugin APIs through the server object and not directly from the module. This closes he following comments: - elastic#7545 (comment) - elastic#7545 (comment) - elastic#7545 (comment)
Configuration menu - View commit details
-
Copy full SHA for a9e30d3 - Browse repository at this point
Copy the full SHA a9e30d3View commit details -
Update accept-language-parser module to 1.2.0
Module version 1.2.0 fixes issue: opentable/accept-language-parser#8 This commit updates review comments: elastic#7545 (diff) elastic#7545 (comment)
Configuration menu - View commit details
-
Copy full SHA for da669da - Browse repository at this point
Copy the full SHA da669daView commit details -
Add i18n default locale as a configurable item
Adds 'defaultLocale' configurable item to the i18n plugin configuration. The default locale is used for translations if the locale specified by user is not supported. This commit satisfies the review comment: - elastic#7545 (diff)
Configuration menu - View commit details
-
Copy full SHA for 9064e8a - Browse repository at this point
Copy the full SHA 9064e8aView commit details -
Move UI i18n wrapper functionality into a module
This commit better structures the i18n capability so that it can be called in UI code in a clearly defined fashion with minimum code. It also fixes potential race conditions. This commit updates review comments: - elastic#7545 (diff) - elastic#7545 (diff) - elastic#7545 (diff)
Configuration menu - View commit details
-
Copy full SHA for c20a204 - Browse repository at this point
Copy the full SHA c20a204View commit details -
Fill any missing translations using translations from default locale
The default language translations are loaded and are compared against the selected language translations. The comparison can then highlight any missing translation keys and can load the default translations keys as needed. This helps to unsure where possible that a translation string is available in most scenarios even if not in the locale requested. This commit resolves review comments: - elastic#7545 (comment) - elastic#7545 (comment)
Configuration menu - View commit details
-
Copy full SHA for 5a17a15 - Browse repository at this point
Copy the full SHA 5a17a15View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8abf25c - Browse repository at this point
Copy the full SHA 8abf25cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 62a4986 - Browse repository at this point
Copy the full SHA 62a4986View commit details -
Add translation keys verification tool
This tool helps to check that translation keys are translated. This tool can be used for non-angular translation constructs like the Jade templates.
Configuration menu - View commit details
-
Copy full SHA for ab27330 - Browse repository at this point
Copy the full SHA ab27330View commit details -
Updates for review comments: elastic#7545 (review)
Configuration menu - View commit details
-
Copy full SHA for 53ef6bb - Browse repository at this point
Copy the full SHA 53ef6bbView commit details -
Update for review comments: elastic#7545 (review) To be done: - Update of unit tests for UI and server - Call of verify translations
Configuration menu - View commit details
-
Copy full SHA for 59d4e5f - Browse repository at this point
Copy the full SHA 59d4e5fView commit details -
Update unit tests after review changes
There was a number of changes to the i18n module and the ui i18n wrapper following review comments. This commit is to update the unit tests with respect.
Configuration menu - View commit details
-
Copy full SHA for c766d95 - Browse repository at this point
Copy the full SHA c766d95View commit details -
Configuration menu - View commit details
-
Copy full SHA for be6ab1b - Browse repository at this point
Copy the full SHA be6ab1bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7aaebc8 - Browse repository at this point
Copy the full SHA 7aaebc8View commit details -
Update verify translations to test registered translations
It was testing the static translation files. It is now updated to test the translations registered when Kibana server is started and the plugins have initialized.
Configuration menu - View commit details
-
Copy full SHA for c34637f - Browse repository at this point
Copy the full SHA c34637fView commit details -
Updates following review comments: elastic#7545 (review)
Configuration menu - View commit details
-
Copy full SHA for c3e5227 - Browse repository at this point
Copy the full SHA c3e5227View commit details -
This commit contain updates after the following review: elastic#7545 (review)
Configuration menu - View commit details
-
Copy full SHA for dd934bf - Browse repository at this point
Copy the full SHA dd934bfView commit details -
Updates for review comments: elastic#7545 (review)
Configuration menu - View commit details
-
Copy full SHA for fa580f7 - Browse repository at this point
Copy the full SHA fa580f7View commit details -
Updates for the following review comments: elastic#7545 (review)
Configuration menu - View commit details
-
Copy full SHA for cfb7b36 - Browse repository at this point
Copy the full SHA cfb7b36View commit details -
Updates after the following review comments: elastic#7545 (review)
Configuration menu - View commit details
-
Copy full SHA for a792f97 - Browse repository at this point
Copy the full SHA a792f97View commit details -
Configuration menu - View commit details
-
Copy full SHA for a2bee9f - Browse repository at this point
Copy the full SHA a2bee9fView commit details -
Update after rebase with master
Loading message changed following merge of commit elastic@26c53e8#diff-e25d7fee746a4f249e17f87c02fd95f8R55 This required update to the welcome message and how it is called.
Configuration menu - View commit details
-
Copy full SHA for d2174ca - Browse repository at this point
Copy the full SHA d2174caView commit details -
Updated the following review comments: elastic#7545 (review)
Configuration menu - View commit details
-
Copy full SHA for 096c47d - Browse repository at this point
Copy the full SHA 096c47dView commit details -
Update the algorithm to return the locale
The algorithm to return which locale to use for translations based on the user locale list and the regsitered locales is updated in this commit. The algorithm previously did an exact match on all the user locales first before (by priority) then checking for best case match. The algorithm is now modified to check each user locale starting with the highest priority first for an exact match and then for best case match. If no match it then moves to the next user locale with the next highest priority. This is to follow the priority list that a user browser is configured for where there maybe a locale translation available but might not be the exact match with regard to the locale code and/or script. An example of this is that the highest priority locale of the user is 'en-US' but the locale translation available is 'en'. It is better select the 'en' locale rather than select the next highest locale which is an exact match.
Configuration menu - View commit details
-
Copy full SHA for 0e167ca - Browse repository at this point
Copy the full SHA 0e167caView commit details -
Updates after the following reviews: elastic#7545 (review) elastic#7545 (review)
Configuration menu - View commit details
-
Copy full SHA for 1a83249 - Browse repository at this point
Copy the full SHA 1a83249View commit details -
Change in the flo and layout of ui index meant that acceptLanguages were not being passed. This commit is an update to fix this so that the welcome messages are loaded.
Configuration menu - View commit details
-
Copy full SHA for 286e200 - Browse repository at this point
Copy the full SHA 286e200View commit details -
This commit is for updates after the following review: elastic#7545 (review)
Configuration menu - View commit details
-
Copy full SHA for a8c6dc3 - Browse repository at this point
Copy the full SHA a8c6dc3View commit details -
Fix issue when unit test run in CI as core translations are registered
When unit tests are run on a test server (like in the CI), it will start Kibana server and register the core translations. This means that the i18n unit tests need to be able to store the existing registration prior to testing and replace after testing.
Configuration menu - View commit details
-
Copy full SHA for 3b1ea3b - Browse repository at this point
Copy the full SHA 3b1ea3bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 56a4e28 - Browse repository at this point
Copy the full SHA 56a4e28View commit details -
Configuration menu - View commit details
-
Copy full SHA for 423ad53 - Browse repository at this point
Copy the full SHA 423ad53View commit details -
Configuration menu - View commit details
-
Copy full SHA for a97037b - Browse repository at this point
Copy the full SHA a97037bView commit details -
Configuration menu - View commit details
-
Copy full SHA for a10a4f6 - Browse repository at this point
Copy the full SHA a10a4f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for f2d6096 - Browse repository at this point
Copy the full SHA f2d6096View commit details -
Moving the i18n module into a class so as to encapsulate the registered translations which means there can be different and distinct instances per process. This is to accomodate the user case where there might be multiple Kibana server instances in a process and the localization should be at the server level.
Configuration menu - View commit details
-
Copy full SHA for 02b2ab8 - Browse repository at this point
Copy the full SHA 02b2ab8View commit details -
Configuration menu - View commit details
-
Copy full SHA for d190815 - Browse repository at this point
Copy the full SHA d190815View commit details -
Remove redundant translation from core translation file
Message starting with 'Give me a moment...' is no longer part of loading message folowing a rebase with master.
Configuration menu - View commit details
-
Copy full SHA for 3d48799 - Browse repository at this point
Copy the full SHA 3d48799View commit details -
Configuration menu - View commit details
-
Copy full SHA for 078bde9 - Browse repository at this point
Copy the full SHA 078bde9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e01026 - Browse repository at this point
Copy the full SHA 9e01026View commit details -
- Update after following review: elastic#7545 (review) - Also, fix syntax mess following rebase with master of src/optimize/index.js
Configuration menu - View commit details
-
Copy full SHA for 53db1a2 - Browse repository at this point
Copy the full SHA 53db1a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b36753 - Browse repository at this point
Copy the full SHA 2b36753View commit details -
Configuration menu - View commit details
-
Copy full SHA for c6265ee - Browse repository at this point
Copy the full SHA c6265eeView commit details
Commits on Dec 14, 2016
-
Configuration menu - View commit details
-
Copy full SHA for b1fe29d - Browse repository at this point
Copy the full SHA b1fe29dView commit details