Skip to content
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

js: Make language code handling more robust, add tests #983

Merged
merged 3 commits into from
Jan 22, 2024

Commits on Jan 19, 2024

  1. 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
    ix5 committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    b1e8c58 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e708803 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f4a55fc View commit details
    Browse the repository at this point in the history