闭社主体 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.

40 lines
833 B

  1. # frozen_string_literal: true
  2. module SettingsHelper
  3. HUMAN_LOCALES = {
  4. en: 'English',
  5. ar: 'العربية',
  6. bg: 'Български',
  7. de: 'Deutsch',
  8. eo: 'Esperanto',
  9. es: 'Español',
  10. fa: 'فارسی',
  11. fi: 'Suomi',
  12. fr: 'Français',
  13. hr: 'Hrvatski',
  14. hu: 'Magyar',
  15. id: 'Bahasa Indonesia',
  16. io: 'Ido',
  17. it: 'Italiano',
  18. ja: '日本語',
  19. nl: 'Nederlands',
  20. no: 'Norsk',
  21. oc: 'Occitan',
  22. pl: 'Polszczyzna',
  23. pt: 'Português',
  24. 'pt-BR': 'Português do Brasil',
  25. ru: 'Русский',
  26. uk: 'Українська',
  27. 'zh-CN': '简体中文',
  28. 'zh-HK': '繁體中文(香港)',
  29. 'zh-TW': '繁體中文(臺灣)',
  30. }.freeze
  31. def human_locale(locale)
  32. HUMAN_LOCALES[locale]
  33. end
  34. def hash_to_object(hash)
  35. HashObject.new(hash)
  36. end
  37. end