mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 11:17:49 +01:00
Add 🇨🇳 Chinese simplified (#310)
Thanks to omltcat for the translation!
This commit is contained in:
committed by
GitHub
parent
8a133ddbfe
commit
437262040a
@@ -162,6 +162,7 @@ const GeneralSiteSettingsP = ({
|
||||
<option value="de">🇩🇪 Deutsch</option>
|
||||
<option value="fr">🇫🇷 Français</option>
|
||||
<option value="es">🇪🇸 Español</option>
|
||||
<option value="zh-CN">🇨🇳 中文</option>
|
||||
<option value="ru">🇷🇺 Русский</option>
|
||||
<option value="vi">🇻🇳 Tiếng Việt</option>
|
||||
</select>
|
||||
|
||||
@@ -3,6 +3,7 @@ import I18n from "i18n-js"
|
||||
I18n.translations = <%= I18n::JS.filtered_translations.to_json %>
|
||||
I18n.locale = LOCALE
|
||||
|
||||
I18n.pluralization["zh-CN"] = function(count) { return ["other"] }
|
||||
I18n.pluralization["vi"] = function(count) { return ["other"] }
|
||||
|
||||
export default I18n
|
||||
@@ -1,11 +1,12 @@
|
||||
# Configure I18n to look at subfolders too
|
||||
I18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.yml')]
|
||||
|
||||
I18n.available_locales = [:en, :it, :de, :fr, :ru, :es, :vi]
|
||||
I18n.available_locales = [:en, :it, :de, :fr, :es, 'zh-CN', :ru, :vi]
|
||||
|
||||
I18n.default_locale = :en
|
||||
|
||||
# Custom pluralization rules
|
||||
# Those must be mirrored in app/javascript/translations/index.js.erb
|
||||
I18n::Backend::Simple.include(I18n::Backend::Pluralization)
|
||||
I18n.backend.store_translations 'zh-CN', i18n: { plural: { rule: lambda { |n| :other } } } # Chinese simplified
|
||||
I18n.backend.store_translations :vi, i18n: { plural: { rule: lambda { |n| :other } } } # Vietnamese
|
||||
Reference in New Issue
Block a user