Right now, we have to create at least two patches for each new language that
becomes available: one to update the tripleo-ui itself, and one to update the
defaults in the puppet code. This is painful and takes a long time.
This patch turns things around. Instead of specifying which languages should be
available, we automatically load all of them, and provide users with a way of
disabling some of them should they need to. When a new language is imported
from the translation team into our code, there is no work necessary.
This is accomplished via Webpack plugin which reads the i18n/locales directory,
parses the data, and generates a Javascript file with the necessary imports and
other useful objects. The "languages" setting in the config file is changed to
"excludedLanguages", and it's a simple list of language abbreviations.
Futhermore, this patch adds a simple script that verifies that all available
languages are properly enabled i the constants file.
Reviewed: https:/ /review. openstack. org/456646 /git.openstack. org/cgit/ openstack/ tripleo- ui/commit/ ?id=5c9a687bb7b 5bb106f1d82f651 93eb31fa75e0d8
Committed: https:/
Submitter: Jenkins
Branch: master
commit 5c9a687bb7b5bb1 06f1d82f65193eb 31fa75e0d8
Author: Honza Pokorny <email address hidden>
Date: Thu Apr 13 11:28:16 2017 -0300
Automatically enable all available languages
Right now, we have to create at least two patches for each new language that
becomes available: one to update the tripleo-ui itself, and one to update the
defaults in the puppet code. This is painful and takes a long time.
This patch turns things around. Instead of specifying which languages should be
available, we automatically load all of them, and provide users with a way of
disabling some of them should they need to. When a new language is imported
from the translation team into our code, there is no work necessary.
This is accomplished via Webpack plugin which reads the i18n/locales directory, nguages" , and it's a simple list of language abbreviations.
parses the data, and generates a Javascript file with the necessary imports and
other useful objects. The "languages" setting in the config file is changed to
"excludedLa
Futhermore, this patch adds a simple script that verifies that all available
languages are properly enabled i the constants file.
Closes-Bug: #1682452 8ca6cabbae1e94b c7cb1d1fe94
Change-Id: Idf5a3314c19be1