diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b7600fd..67477a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,9 +11,6 @@ jobs: strategy: matrix: include: - - redmine-repository: 'redmica/redmica' - redmine-version: 'stable-3.0' - ruby-version: '3.3' - redmine-repository: 'redmica/redmica' redmine-version: 'master' ruby-version: '3.3' diff --git a/README.md b/README.md index dac21ae..a8857d1 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,17 @@ # redmine_message_customize This is a plugin for Redmine. -This plugin changes the translation of the wording on the screen defined in "config/locales/*.yml" in the admin view. +This plugin changes the translation of the wording on the screen defined in "config/locales/*.yml" in the admin view. +It is available for Redmine 6.0 or later. ## Install ``` $ cd /your/path/redmine $ git clone https://github.com/farend/redmine_message_customize.git plugins/redmine_message_customize -$ # When Redmine 4.1 or lower versions -$ cp plugins/redmine_message_customize/35_change_load_order_locales.rb config/initializers/35_change_load_order_locales.rb $ # redmine restart ``` -:warning: To customize messages for other plugins in **Redmine 4.1 or lower versions**, redmine_message_customize/35_change_load_order_locales.rb It is necessary to copy the file to redmine/config/initializers. -If redmine/config/initializers/35_change_load_order_locales.rb is missing, only non-plugin messages can be customized. - ## Usage * 1: Open setting page diff --git a/app/helpers/custom_message_settings_helper.rb b/app/helpers/custom_message_settings_helper.rb index 3fab8dd..4be0e87 100644 --- a/app/helpers/custom_message_settings_helper.rb +++ b/app/helpers/custom_message_settings_helper.rb @@ -17,17 +17,17 @@ def normal_mode_input_fields(setting, lang) content += content_tag(:p) do content_tag(:label, k) + text_field_tag("settings[custom_messages][#{k}]", v.to_s) + - link_to_function('', '$(this).closest("p").remove();', class: 'icon icon-del clear-key-link') + link_to_function(sprite_icon('del'), '$(this).closest("p").remove()', class: 'icon clear-key-link') end end content end def open_default_messages_window_link(lang) - link_to l(:label_default_messages), + link_to sprite_icon('file', l(:label_default_messages)), default_messages_custom_message_settings_path(lang: lang), - class: 'icon icon-file text-plain', + class: 'icon text-plain', onclick: "window.open(this.href,'redmine_message_customize_plugin-default_messages', 'height=800, width=500');return false;", id: 'default-messages-link' end -end \ No newline at end of file +end diff --git a/app/views/custom_message_settings/_messages.html.erb b/app/views/custom_message_settings/_messages.html.erb index d8486d4..aafe6b5 100644 --- a/app/views/custom_message_settings/_messages.html.erb +++ b/app/views/custom_message_settings/_messages.html.erb @@ -1,6 +1,6 @@