This repository has been archived on 2019-05-14. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon/app/helpers/settings_helper.rb
Koala Yeung 935aecdc32 Add Indonesian (Bahasa Indonesia / id) translation (#2200)
* add Indonesian (Bahasa Indonesia) translation

add id.jsx
add translations on email views
add devise.id.yml
add doorkeeper.id.yml
add id.yml
add simple_form.id.yml

update id locale on mastodon.jsx, index.jsx, settings_helper.rb, and
application.rb

* add Indonesian (Bahasa Indonesia) translation

add id.jsx
add translations on email views
add devise.id.yml
add doorkeeper.id.yml
add id.yml
add simple_form.id.yml

update id locale on mastodon.jsx, index.jsx, settings_helper.rb, and
application.rb

* fix InvalidLocaleData on a string

* fix InvalidLocaleData on a string

* Fix language keys in Indonesian ruby locale (id)

Use "id" instead of "en" as object keys.

* Removed obsoleted translation (id)
2017-04-21 19:16:26 +02:00

39 lines
785 B
Ruby

# frozen_string_literal: true
module SettingsHelper
HUMAN_LOCALES = {
en: 'English',
de: 'Deutsch',
es: 'Español',
eo: 'Esperanto',
fr: 'Français',
hr: 'Hrvatski',
hu: 'Magyar',
io: 'Ido',
it: 'Italiano',
nl: 'Nederlands',
no: 'Norsk',
oc: 'Occitan',
pl: 'Polszczyzna',
pt: 'Português',
'pt-BR': 'Português do Brasil',
fi: 'Suomi',
ru: 'Русский',
uk: 'Українська',
ja: '日本語',
'zh-CN': '简体中文',
'zh-HK': '繁體中文(香港)',
'zh-TW': '繁體中文(臺灣)',
bg: 'Български',
id: 'Bahasa Indonesia',
}.freeze
def human_locale(locale)
HUMAN_LOCALES[locale]
end
def hash_to_object(hash)
HashObject.new(hash)
end
end