Enable ro and ta locales in Rails (#8583)

* Enable ro and ta locales in Rails

* Add Tamil and Romanian to language dropdown
This commit is contained in:
Eugen Rochko 2018-09-02 22:31:53 +02:00 committed by GitHub
parent 78b89e7a5d
commit 14a300b428
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -35,12 +35,14 @@ module SettingsHelper
pl: 'Polszczyzna', pl: 'Polszczyzna',
pt: 'Português', pt: 'Português',
'pt-BR': 'Português do Brasil', 'pt-BR': 'Português do Brasil',
ro: 'Limba română',
ru: 'Русский', ru: 'Русский',
sk: 'Slovenčina', sk: 'Slovenčina',
sl: 'Slovenščina', sl: 'Slovenščina',
sr: 'Српски', sr: 'Српски',
'sr-Latn': 'Srpski (latinica)', 'sr-Latn': 'Srpski (latinica)',
sv: 'Svenska', sv: 'Svenska',
ta: 'தமிழ்',
te: 'తెలుగు', te: 'తెలుగు',
th: 'ภาษาไทย', th: 'ภาษาไทย',
tr: 'Türkçe', tr: 'Türkçe',

View file

@ -69,12 +69,14 @@ module Mastodon
:pl, :pl,
:pt, :pt,
:'pt-BR', :'pt-BR',
:ro,
:ru, :ru,
:sk, :sk,
:sl, :sl,
:sr, :sr,
:'sr-Latn', :'sr-Latn',
:sv, :sv,
:ta,
:te, :te,
:th, :th,
:tr, :tr,
@ -85,6 +87,7 @@ module Mastodon
] ]
config.i18n.default_locale = ENV['DEFAULT_LOCALE']&.to_sym config.i18n.default_locale = ENV['DEFAULT_LOCALE']&.to_sym
unless config.i18n.available_locales.include?(config.i18n.default_locale) unless config.i18n.available_locales.include?(config.i18n.default_locale)
config.i18n.default_locale = :en config.i18n.default_locale = :en
end end