Skip to content

Commit 9edab7a

Browse files
brawaruGargron
authored andcommitted
Add translation project promotion link (mastodon#12736)
This commit adds promotional notice on appearance settings about translation project if any other locale than English is used. It allows users to learn and contribute translations to Mastodon. Step ahead, in this commit one unusual string is added - link to a guide. By default it refers to Crowdin project itself, but if any of Mastodon localization teams established their own guide, they can refer it. Or, if Crowdin supports localized domain for language, it can also be put there (e.g. https://fr.crowdin.com/...).
1 parent 2a5da8c commit 9edab7a

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

app/views/settings/preferences/appearance/show.html.haml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
.fields-group.fields-row__column.fields-row__column-6
99
= f.input :setting_theme, collection: Themes.instance.names, label_method: lambda { |theme| I18n.t("themes.#{theme}", default: theme) }, wrapper: :with_label, include_blank: false, hint: false
1010

11+
- unless I18n.locale == :en
12+
.flash-message{ style: "text-align: unset; color: unset" }
13+
#{t 'appearance.localization.body'} #{content_tag(:a, t('appearance.localization.guide_link_text'), href: t('appearance.localization.guide_link'), target: "_blank", rel: "noopener", style: "text-decoration: underline")}
14+
1115
%h4= t 'appearance.advanced_web_interface'
1216
1317
%p.hint= t 'appearance.advanced_web_interface_hint'

config/locales/en.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,10 @@ en:
581581
animations_and_accessibility: Animations and accessibility
582582
confirmation_dialogs: Confirmation dialogs
583583
discovery: Discovery
584+
localization:
585+
body: Mastodon is translated by volunteers.
586+
guide_link: https://crowdin.com/project/mastodon
587+
guide_link_text: Everyone can contribute.
584588
sensitive_content: Sensitive content
585589
toot_layout: Toot layout
586590
application_mailer:

0 commit comments

Comments
 (0)