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

Display language name or language key #2949

Merged
merged 7 commits into from
Oct 10, 2018
Merged

Commits on Oct 5, 2018

  1. Display language name or language key

    There where two issues with the current implementation:
    
    - There was a possible duplication between looking up the language name in key "locale" and in key "i18n.language.name"
    
    - The "default" option was not being picked up, as the fallback always returned the default locale's translation, "English"
    
    With this implementation there is only a single place to put the language name: i18n.language.name. I think this place is easier to find and understand for Crowdin translators than a "locale" key hidden in general.yml
    
    If the translation is not found we display the language key, instead of English, which makes more sense to me too 😌
    
    Solution based on recent comments[1] on a related I18n issue
    
    [1] ruby-i18n/i18n#365 (comment)
    voodoorai2000 committed Oct 5, 2018
    Configuration menu
    Copy the full SHA
    0a02619 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    66c9f67 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9d7042c View commit details
    Browse the repository at this point in the history
  4. Fix i18n task' specs

    Add i18n.yml to i18n task's available translation files
    voodoorai2000 committed Oct 5, 2018
    Configuration menu
    Copy the full SHA
    168ebe3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ad51109 View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2018

  1. Fix portuguese specs

    voodoorai2000 committed Oct 9, 2018
    Configuration menu
    Copy the full SHA
    6f978b9 View commit details
    Browse the repository at this point in the history
  2. Fix flaky spec

    `I18n.available_locales=` does a little magic[1] and was causing some flakieness along the way, as the `:wl` locale persisted in future specs
    
    Thanks for the heads up @javierm 👌
    
    [1] https://www.rubydoc.info/github/svenfuchs/i18n/I18n%2FConfig:available_locales=
    voodoorai2000 committed Oct 9, 2018
    Configuration menu
    Copy the full SHA
    59b3515 View commit details
    Browse the repository at this point in the history