From 78c62a0633572ba3e5def3989e5fff07f98ff307 Mon Sep 17 00:00:00 2001 From: Eric Tsai Date: Mon, 13 Jan 2020 17:14:53 +0800 Subject: [PATCH] add i18n for displaying subtitle / cover image --- app/views/admin/announcements/_form.html.erb | 4 ++-- config/locales/en.yml | 4 +++- config/locales/zh_tw.yml | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/views/admin/announcements/_form.html.erb b/app/views/admin/announcements/_form.html.erb index 96b6587..62ebf88 100644 --- a/app/views/admin/announcements/_form.html.erb +++ b/app/views/admin/announcements/_form.html.erb @@ -69,7 +69,7 @@
- <%= f.label :display_subtitle, 'display subtitle', :class => "control-label muted" %> + <%= f.label :display_subtitle, t("announcement.display_subtitle"), :class => "control-label muted" %>
<%= f.check_box :display_subtitle %>
@@ -77,7 +77,7 @@
- <%= f.label :display_img, 'display img src', :class => "control-label muted" %> + <%= f.label :display_img, t("announcement.display_img"), :class => "control-label muted" %>
<%= f.check_box :display_img %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index 5c2479a..550dd01 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -93,4 +93,6 @@ en: resend_mail: Re-send Email is_external_link: Enable External Link external_link: External Link - external_link_hint: "Make sure URL starts with http://" \ No newline at end of file + external_link_hint: "Make sure URL starts with http://" + display_subtitle: Display Subtitle + display_img: Display Cover Image diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index a64f0fe..5980d73 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -98,3 +98,5 @@ zh_tw: is_external_link: 連結外部網址 external_link: 外部連結 external_link_hint: "確定連結開頭為http://" + display_subtitle: 顯示副標題 + display_img: 顯示圖片