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

34 lines
700 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. hr: 'Hrvatski',
  10. hu: 'Magyar',
  11. it: 'Italiano',
  12. nl: 'Nederlands',
  13. no: 'Norsk',
  14. pt: 'Português',
  15. 'pt-BR': 'Português do Brasil',
  16. fi: 'Suomi',
  17. ru: 'Русский',
  18. uk: 'Українська',
  19. ja: '日本語',
  20. 'zh-CN': '简体中文',
  21. 'zh-HK': '繁體中文(香港)',
  22. 'zh-TW': '繁體中文(臺灣)',
  23. bg: 'Български',
  24. }.freeze
  25. def human_locale(locale)
  26. HUMAN_LOCALES[locale]
  27. end
  28. def hash_to_object(hash)
  29. HashObject.new(hash)
  30. end
  31. end