diff options
author | Randy Bertram <rbertram@us.ibm.com> | 2014-09-09 17:28:17 -0400 |
---|---|---|
committer | Randy Bertram <rbertram@us.ibm.com> | 2014-09-23 14:24:48 +0000 |
commit | 78c917570e2182bfdd8f5cb7eb5cb2c71d8df6f0 (patch) | |
tree | 6d6938af5f788c1f7c6b49b581940e3e5ea46589 /horizon/contrib | |
parent | e0e46374de3ff041ba0bbde81eaabe7563792186 (diff) | |
download | horizon-78c917570e2182bfdd8f5cb7eb5cb2c71d8df6f0.tar.gz |
Datepicker locale support
Also adds general language info to the
horizon JS object.
Change-Id: I8fbf20635ac0a2ae1f3b8f618ce5a37eb53e9cc0
Closes-Bug: 1274145
Diffstat (limited to 'horizon/contrib')
-rw-r--r-- | horizon/contrib/__init__.py | 0 | ||||
-rw-r--r-- | horizon/contrib/bootstrap_datepicker.py | 68 |
2 files changed, 68 insertions, 0 deletions
diff --git a/horizon/contrib/__init__.py b/horizon/contrib/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/horizon/contrib/__init__.py diff --git a/horizon/contrib/bootstrap_datepicker.py b/horizon/contrib/bootstrap_datepicker.py new file mode 100644 index 000000000..3741fa689 --- /dev/null +++ b/horizon/contrib/bootstrap_datepicker.py @@ -0,0 +1,68 @@ +# Copyright 2014 IBM Corp. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +# Map Horizon languages to datepicker locales +LOCALE_MAPPING = { + 'ar': 'ar', + 'az': 'az', + 'bg': 'bg', + 'ca': 'ca', + 'cs': 'cs', + 'cy': 'cy', + 'da': 'da', + 'de': 'de', + 'el': 'el', + 'es': 'es', + 'et': 'et', + 'fa': 'fa', + 'fi': 'fi', + 'fr': 'fr', + 'gl': 'gl', + 'he': 'he', + 'hr': 'hr', + 'hu': 'hu', + 'id': 'id', + 'is': 'is', + 'it': 'it', + 'ja': 'ja', + 'ka': 'ka', + 'kk': 'kk', + 'ko': 'kr', # difference between horizon and datepicker + 'lt': 'lt', + 'lv': 'lv', + 'mk': 'mk', + 'ms': 'ms', + 'nb': 'nb', + 'nl-be': 'nl-BE', + 'nl': 'nl', + 'no': 'no', + 'pl': 'pl', + 'pt-br': 'pt-BR', + 'pt': 'pt', + 'ro': 'ro', + 'rs-latin': 'rs-latin', + 'sr': 'rs', # difference between horizon and datepicker + 'ru': 'ru', + 'sk': 'sk', + 'sl': 'sl', + 'sq': 'sq', + 'sv': 'sv', + 'sw': 'sw', + 'th': 'th', + 'tr': 'tr', + 'ua': 'ua', + 'vi': 'vi', + 'zh-cn': 'zh-CN', + 'zh-tw': 'zh-TW', +} |