闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
582 B

  1. # frozen_string_literal: true
  2. module SettingsHelper
  3. HUMAN_LOCALES = {
  4. en: 'English',
  5. de: 'Deutsch',
  6. es: 'Español',
  7. eo: 'Esperanto',
  8. fr: 'Français',
  9. hu: 'Magyar',
  10. nl: 'Nederlands',
  11. no: 'Norsk',
  12. pt: 'Português',
  13. fi: 'Suomi',
  14. ru: 'Русский',
  15. uk: 'Українська',
  16. ja: '日本語',
  17. 'zh-CN': '简体中文',
  18. 'zh-HK': '繁體中文(香港)',
  19. bg: 'Български',
  20. }.freeze
  21. def human_locale(locale)
  22. HUMAN_LOCALES[locale]
  23. end
  24. def hash_to_object(hash)
  25. HashObject.new(hash)
  26. end
  27. end