forked from treehouse/mastodon
Ruby intl8n for themes
parent
282f48ddd1
commit
d08d0f9f33
|
@ -0,0 +1,6 @@
|
|||
en:
|
||||
flavours:
|
||||
glitch: Glitch Edition
|
||||
skins:
|
||||
glitch:
|
||||
default: Default
|
|
@ -0,0 +1,6 @@
|
|||
en:
|
||||
flavours:
|
||||
vanilla: Vanilla Mastodon
|
||||
skins:
|
||||
vanilla:
|
||||
default: Default
|
|
@ -0,0 +1,4 @@
|
|||
en:
|
||||
skins:
|
||||
vanilla:
|
||||
win95: Masto95
|
|
@ -27,8 +27,8 @@
|
|||
|
||||
.fields-group
|
||||
- if Themes.instance.flavours.size > 1
|
||||
= f.input :setting_flavour, collection: Themes.instance.flavours, label_method: lambda { |flavour| I18n.t("themes.#{flavour}", default: flavour) }, wrapper: :with_label, include_blank: false
|
||||
= f.input :setting_skin, collection: Themes.instance.skins_for(current_flavour), label_method: lambda { |skin| I18n.t("themes.#{current_flavour}.skins.#{skin}", default: skin) }, wrapper: :with_label, include_blank: false
|
||||
= f.input :setting_flavour, collection: Themes.instance.flavours, label_method: lambda { |flavour| I18n.t("flavours.#{flavour}", default: flavour) }, wrapper: :with_label, include_blank: false
|
||||
= f.input :setting_skin, collection: Themes.instance.skins_for(current_flavour), label_method: lambda { |skin| I18n.t("skins.#{current_flavour}.#{skin}", default: skin) }, wrapper: :with_label, include_blank: false
|
||||
|
||||
= f.input :setting_unfollow_modal, as: :boolean, wrapper: :with_label
|
||||
= f.input :setting_boost_modal, as: :boolean, wrapper: :with_label
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
I18n.load_path += Dir[Rails.root.join('app', 'javascript', 'flavours', '*', 'names.{rb,yml}').to_s]
|
||||
I18n.load_path += Dir[Rails.root.join('app', 'javascript', 'flavours', '*', 'names', '*.{rb,yml}').to_s]
|
||||
I18n.load_path += Dir[Rails.root.join('app', 'javascript', 'skins', '*', '*', 'names.{rb,yml}').to_s]
|
||||
I18n.load_path += Dir[Rails.root.join('app', 'javascript', 'skins', '*', '*', 'names', '*.{rb,yml}').to_s]
|
Loading…
Reference in New Issue