Skip to content

Commit ab335a5

Browse files
committed
Change to display a message if there is no 35_change_load_order_locales #30
1 parent 5606fd4 commit ab335a5

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

app/views/custom_message_settings/edit.html.erb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@
1212
<% if @setting.errors.any? %>
1313
<%= error_messages_for(@setting) %>
1414
<% end %>
15-
<p class='toggle-enable'>
15+
<div class='message-customize-menu'>
1616
<%= link_to (@setting.enabled? ? l(:label_disable_customize) : l(:label_enable_customize)), toggle_enabled_custom_message_settings_path, method: :post, class: 'icon icon-settings' %> /
1717
<%= open_default_messages_window_link(@lang) %>
18-
</p>
18+
19+
<% unless MessageCustomize::Locale.customizable_plugin_messages? %>
20+
<p>
21+
<%= l(:text_unable_to_customize_plugin_messages, MessageCustomize::Locale::CHANGE_LOARD_ORDER_LOCALES_FILE_PATH) %>
22+
</p>
23+
<% end %>
24+
</div>
1925
<%= render_tabs (@setting.errors.any? ? [] : [{name: 'normal', partial: 'normal_tab', label: 'label_normal_tab'}]) + [{name: 'yaml', partial: 'yaml_tab', label: 'label_yaml_tab'}] %>

assets/stylesheets/custom_messages.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636
color: white;
3737
}
3838

39-
p.toggle-enable {
39+
div.message-customize-menu {
4040
text-align: right;
41+
}
42+
div.message-customize-menu p {
43+
color: gray;
44+
font-size: 5px;
4145
}

config/locales/en.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ en:
99
text_description_of_search_box: You can enter search terms in the search box to narrow down the results.
1010
text_for_your_reference: If you do not know how to write, please refer to "%{value}".
1111
text_disabled_customize: Message customization by this plugin is disabled.
12+
text_unable_to_customize_plugin_messages: You cannot customize the plugin messages because there is no "%{value}".
1213

1314
error_unused_keys: The keys not present in Redmine are used.
1415
error_unavailable_languages: The languages not present in Redmine are used.

config/locales/ja.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ja:
99
text_description_of_search_box: 検索ボックスにキーワードを入力することで、選択肢を絞り込むことが出来ます。
1010
text_for_your_reference: "もし書き方がわからない場合は、「%{value}」が参考になるはずです。"
1111
text_disabled_customize: このプラグインによるメッセージのカスタマイズは無効になっています。
12+
text_unable_to_customize_plugin_messages: "「%{value}」が無いためプラグインのメッセージはカスタマイズできません。"
1213

1314
error_unused_keys: Redmineに存在しないキーが利用されています。
1415
error_unavailable_languages: Redmineで利用できない言語が利用されています。

0 commit comments

Comments
 (0)