forked from isso-comments/isso
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
js: Make lang code handling more robust in config
Differing internal representations of two-level language codes, e.g. pt_BR/pt_PT or zh_CN/zh_TW, would lead to inconsistencies when combined with overrides of i18n strings for templating. E.g. setting data-isso-lang=pt_BR and data-isso-postbox-text-text-PT_BR would result in an internal representation of data-isso-postbox-text-text-pt-br (note: lowercase) and thus user-supplied i18n strings not being applied. To make this handling more robust, convert everything into lowercase and substitute underscores for dashes. Fixes isso-comments#982
- Loading branch information
Showing
2 changed files
with
18 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters