Browse Source

Fixes #4824 - Default macro names are marked for translation but it's not translated inside the frontend.

Dominik Klein 1 year ago
parent
commit
5dd022ad12

+ 1 - 1
app/assets/javascripts/app/models/macro.coffee

@@ -3,7 +3,7 @@ class App.Macro extends App.Model
   @extend Spine.Model.Ajax
   @extend Spine.Model.Ajax
   @url: @apiPath + '/macros'
   @url: @apiPath + '/macros'
   @configure_attributes = [
   @configure_attributes = [
-    { name: 'name',            display: __('Name'),              tag: 'input', type: 'text', limit: 100, null: false },
+    { name: 'name',            display: __('Name'),              tag: 'input', type: 'text', translate: true, limit: 100, null: false },
     { name: 'perform',         display: __('Actions'),           tag: 'ticket_perform_action',           null: true
     { name: 'perform',         display: __('Actions'),           tag: 'ticket_perform_action',           null: true
     },
     },
     { name: 'ux_flow_next_up', display: __('Once completed…'), tag: 'select', default: 'none', translate: true, options: {
     { name: 'ux_flow_next_up', display: __('Once completed…'), tag: 'select', default: 'none', translate: true, options: {

+ 1 - 1
app/assets/javascripts/app/views/ticket_zoom/attribute_bar.jst.eco

@@ -68,7 +68,7 @@
         <% if !@macroDisabled: %>
         <% if !@macroDisabled: %>
           <li class="dropdown-header" role="menuitem"><%- @T('Macros') %></li>
           <li class="dropdown-header" role="menuitem"><%- @T('Macros') %></li>
           <% for macro in @macros: %>
           <% for macro in @macros: %>
-            <li class="js-dropdownActionMacro" role="menuitem" data-id="<%= macro.id %>"><%- macro.displayName() %>
+            <li class="js-dropdownActionMacro" role="menuitem" data-id="<%= macro.id %>"><%- @T(macro.displayName()) %>
           <% end %>
           <% end %>
         <% end %>
         <% end %>
     </ul>
     </ul>