Browse Source

Maintenance: Fix problematic translatable source strings.

Martin Gruner 2 years ago
parent
commit
47798e37eb

+ 1 - 1
app/assets/javascripts/app/controllers/_manage/ticket_auto_assignment.coffee

@@ -36,7 +36,7 @@ class App.SettingTicketAutoAssignment extends App.ControllerSubContent
     )
 
     configure_attributes = [
-      { name: 'user_ids', display: __('Exception users'), tag: 'column_select', multiple: true, null: true, relation: 'User', sortBy: 'firstname' },
+      { name: 'user_ids', display: __('Excepted users'), tag: 'column_select', multiple: true, null: true, relation: 'User', sortBy: 'firstname' },
     ]
 
     ticket_auto_assignment_user_ids_ignore = App.Setting.get('ticket_auto_assignment_user_ids_ignore')

+ 1 - 1
app/assets/javascripts/app/controllers/_ui_element/_application_selector.coffee

@@ -529,7 +529,7 @@ class App.UiElement.ApplicationSelector
     return config
 
   @humanText: (condition) ->
-    none = App.i18n.translateContent('No filter.')
+    none = App.i18n.translateContent('No filter was configured.')
     return [none] if _.isEmpty(condition)
     [defaults, groups, elements] = @defaults()
     rules = []

+ 0 - 38
app/assets/javascripts/app/controllers/_ui_element/ticket_perform_action.coffee

@@ -573,41 +573,3 @@ class App.UiElement.ticket_perform_action
     )
 
     elementRow.find('.js-setArticle').html(articleElement).removeClass('hide')
-
-  @humanText: (condition) ->
-    none = App.i18n.translateContent('No filter.')
-    return [none] if _.isEmpty(condition)
-    [defaults, groups, operators, elements] = @defaults()
-    rules = []
-    for attribute, value of condition
-
-      objectAttribute = attribute.split(/\./)
-
-      # get stored params
-      if meta && objectAttribute[1]
-        model = toCamelCase(objectAttribute[0])
-        config = elements[attribute]
-
-        valueHuman = []
-        if _.isArray(value)
-          for data in value
-            r = @humanTextLookup(config, data)
-            valueHuman.push r
-        else
-          valueHuman.push @humanTextLookup(config, value)
-
-        if valueHuman.join
-          valueHuman = valueHuman.join(', ')
-        rules.push "#{App.i18n.translateContent('Set')} <b>#{App.i18n.translateContent(model)} -> #{App.i18n.translateContent(config.display)}</b> #{App.i18n.translateContent('to')} <b>#{valueHuman}</b>."
-
-    return [none] if _.isEmpty(rules)
-    rules
-
-  @humanTextLookup: (config, value) ->
-    return value if !App[config.relation]
-    return value if !App[config.relation].exists(value)
-    data = App[config.relation].fullLocal(value)
-    return value if !data
-    if data.displayName
-      return App.i18n.translateContent( data.displayName() )
-    valueHuman.push App.i18n.translateContent( data.name )

+ 1 - 1
app/assets/javascripts/app/controllers/cti.coffee

@@ -161,7 +161,7 @@ class App.CTI extends App.Controller
         item.state_human = switch item.comment
           when 'cancel', 'noAnswer', 'congestion' then __('not reached')
           when 'busy' then __('busy')
-          when 'notFound' then __('not exist')
+          when 'notFound' then __('does not exist')
           when 'normalClearing' then ''
           else item.comment
       else

+ 2 - 2
app/assets/javascripts/app/views/data_privacy/preview.jst.eco

@@ -3,11 +3,11 @@
     <%- @delete_organization_html %>
   </div>
   <div class="form-group">
-      <h3><%- @T('Preview customer tickets') %> <span class="subtitle js-previewCounterContainer">(<span class="js-previewCounter"><%= @customer_count %></span> <%- @T('matches') %>)</span></h3>
+      <h3><%- @T('Preview customer tickets') %> <span class="subtitle js-previewCounterContainer">(<span class="js-previewCounter"><%= @customer_count %></span> <%- @T('matches found') %>)</span></h3>
       <p><%- @T('Customer tickets of the user will get deleted on execution of the task. No rollback possible.') %></p>
       <div class="js-previewTableCustomer"></div>
     <% if @owner_count > 0: %>
-      <h3><%- @T('Preview owner tickets') %><span class="subtitle js-previewCounterContainer"> <span class="u-highlight js-previewCounter"><%= @owner_count %></span> <%- @T('matches') %></span></h3>
+      <h3><%- @T('Preview owner tickets') %><span class="subtitle js-previewCounterContainer"> <span class="u-highlight js-previewCounter"><%= @owner_count %></span> <%- @T('matches found') %></span></h3>
       <p><%- @T('Owner tickets of the user will not get deleted. The owner will be mapped to the system user (ID 1).') %></p>
       <div class="js-previewTableOwner"></div>
     <% end %>

+ 1 - 1
app/assets/javascripts/app/views/generic/application_selector.jst.eco

@@ -1,6 +1,6 @@
 <div class="horizontal-filters js-filter">
 </div>
 <div class="js-preview <% if @attribute.preview is false: %>hide<% end %>">
-  <h3><%- @T('Preview') %><span class="subtitle js-previewCounterContainer hide"> (<span class="js-previewCounter">?</span> <%- @T('matches') %>)</span> <span class="tiny loading icon js-previewLoader hide" style="margin-left: 3px;"></span></h3>
+  <h3><%- @T('Preview') %><span class="subtitle js-previewCounterContainer hide"> (<span class="js-previewCounter">?</span> <%- @T('matches found') %>)</span> <span class="tiny loading icon js-previewLoader hide" style="margin-left: 3px;"></span></h3>
   <div class="js-previewTable"></div>
 </div>

+ 4 - 4
app/assets/javascripts/app/views/settings/proxy.jst.eco

@@ -1,24 +1,24 @@
 <form class="settings-entry" id="<%= @setting.name %>">
   <h2><%- @T(@setting.title) %></h2>
-  <p class="help-text"><%- @T('Proxy address.') %></p>
+  <p class="help-text"><%- @T('Proxy address') %></p>
   <div class="horizontal end">
     <div class="form-item flex">
       <input type="text" name="proxy" value="<%= @proxy %>" placeholder="proxy.example.com:3128" class="form-control">
     </div>
   </div>
-  <p class="help-text"><%- @T('Username for proxy connection.') %></p>
+  <p class="help-text"><%- @T('Username for proxy connection') %></p>
   <div class="horizontal end">
     <div class="form-item flex">
       <input type="text" name="proxy_username" value="<%= @proxy_username %>" class="form-control">
     </div>
   </div>
-  <p class="help-text"><%- @T('Password for proxy connection.') %></p>
+  <p class="help-text"><%- @T('Password for proxy connection') %></p>
   <div class="horizontal end">
     <div class="form-item flex">
       <input type="password" name="proxy_password" value="<%= @proxy_password %>" class="form-control">
     </div>
   </div>
-  <p class="help-text"><%- @T('No proxy for the following hosts.') %></p>
+  <p class="help-text"><%- @T('Do not use the proxy for the following hosts.') %></p>
   <div class="horizontal end">
     <div class="form-item flex">
       <input type="text" name="proxy_no" value="<%= @proxy_no %>" placeholder="localhost,127.0.0.1" class="form-control">

+ 3 - 3
app/models/postmaster_filter.rb

@@ -13,11 +13,11 @@ class PostmasterFilter < ApplicationModel
   sanitized_html :note
 
   def validate_condition
-    raise Exceptions::UnprocessableEntity, __('Min. one match rule needed!') if match.blank?
+    raise Exceptions::UnprocessableEntity, __('At least one match rule is required, but none was provided.') if match.blank?
 
     match.each_value do |meta|
-      raise Exceptions::UnprocessableEntity, 'operator invalid, ony "contains" and "contains not" is supported' if meta['operator'].blank? || meta['operator'] !~ %r{^(contains|contains not)$}
-      raise Exceptions::UnprocessableEntity, 'value invalid/empty' if meta['value'].blank?
+      raise Exceptions::UnprocessableEntity, __('The provided match operator is missing or invalid.') if meta['operator'].blank? || meta['operator'] !~ %r{^(contains|contains not)$}
+      raise Exceptions::UnprocessableEntity, __('The required match value is missing.') if meta['value'].blank?
 
       begin
         Channel::Filter::Match::EmailRegex.match(value: 'test content', match_rule: meta['value'], check_mode: true)

+ 1 - 1
app/models/report.rb

@@ -75,7 +75,7 @@ class Report
 
     config[:metric][:create_channels] = {
       name:    'create_channels',
-      display: __('Create Channels'),
+      display: __('Creation Channels'),
       prio:    9000,
     }
     backend = [

+ 34 - 26
i18n/zammad.pot

@@ -996,6 +996,10 @@ msgstr ""
 msgid "At least one letter is required"
 msgstr ""
 
+#: app/models/postmaster_filter.rb
+msgid "At least one match rule is required, but none was provided."
+msgstr ""
+
 #: app/assets/javascripts/app/controllers/widget/ticket_bulk_form.coffee
 msgid "At least one object must be selected."
 msgstr ""
@@ -2213,10 +2217,6 @@ msgstr ""
 msgid "Create Channel"
 msgstr ""
 
-#: app/models/report.rb
-msgid "Create Channels"
-msgstr ""
-
 #: app/assets/javascripts/app/views/knowledge_base/new_controller.coffee
 msgid "Create Knowledge Base"
 msgstr ""
@@ -2333,6 +2333,10 @@ msgstr ""
 msgid "Created by"
 msgstr ""
 
+#: app/models/report.rb
+msgid "Creation Channels"
+msgstr ""
+
 #: app/assets/javascripts/app/controllers/core_workflow.coffee
 msgid "Creation mask"
 msgstr ""
@@ -3366,6 +3370,10 @@ msgstr ""
 msgid "Do not sign email"
 msgstr ""
 
+#: app/assets/javascripts/app/views/settings/proxy.jst.eco
+msgid "Do not use the proxy for the following hosts."
+msgstr ""
+
 #: app/assets/javascripts/app/controllers/knowledge_base/delete_action.coffee
 #: app/assets/javascripts/app/controllers/knowledge_base/sidebar/attachments.coffee
 msgid "Do you really want to delete \"%s\"?"
@@ -3967,7 +3975,7 @@ msgid "Examples"
 msgstr ""
 
 #: app/assets/javascripts/app/controllers/_manage/ticket_auto_assignment.coffee
-msgid "Exception users"
+msgid "Excepted users"
 msgstr ""
 
 #: app/assets/javascripts/app/controllers/_integration/exchange.coffee
@@ -5940,10 +5948,6 @@ msgstr ""
 msgid "Milestone"
 msgstr ""
 
-#: app/models/postmaster_filter.rb
-msgid "Min. one match rule needed!"
-msgstr ""
-
 #: db/seeds/settings.rb
 msgid "Min. size of number"
 msgstr ""
@@ -6468,8 +6472,7 @@ msgid "No file formats allowed."
 msgstr ""
 
 #: app/assets/javascripts/app/controllers/_ui_element/_application_selector.coffee
-#: app/assets/javascripts/app/controllers/_ui_element/ticket_perform_action.coffee
-msgid "No filter."
+msgid "No filter was configured."
 msgstr ""
 
 #: app/controllers/integration/exchange_controller.rb
@@ -6480,7 +6483,6 @@ msgstr ""
 msgid "No linked issues"
 msgstr ""
 
-#: app/assets/javascripts/app/views/settings/proxy.jst.eco
 #: db/seeds/settings.rb
 msgid "No proxy for the following hosts."
 msgstr ""
@@ -7067,6 +7069,9 @@ msgid "Password changed successfully!"
 msgstr ""
 
 #: app/assets/javascripts/app/views/settings/proxy.jst.eco
+msgid "Password for proxy connection"
+msgstr ""
+
 #: db/seeds/settings.rb
 msgid "Password for proxy connection."
 msgstr ""
@@ -7417,7 +7422,7 @@ msgid "Proxy User"
 msgstr ""
 
 #: app/assets/javascripts/app/views/settings/proxy.jst.eco
-msgid "Proxy address."
+msgid "Proxy address"
 msgstr ""
 
 #: app/assets/javascripts/app/controllers/knowledge_base/content_can_be_published_form.coffee
@@ -8195,10 +8200,6 @@ msgstr ""
 msgid "Sessions"
 msgstr ""
 
-#: app/assets/javascripts/app/controllers/_ui_element/ticket_perform_action.coffee
-msgid "Set"
-msgstr ""
-
 #: db/seeds/settings.rb
 msgid "Set agent limit"
 msgstr ""
@@ -9096,6 +9097,10 @@ msgstr ""
 msgid "The provided endpoint is invalid."
 msgstr ""
 
+#: app/models/postmaster_filter.rb
+msgid "The provided match operator is missing or invalid."
+msgstr ""
+
 #: app/controllers/application_controller/authenticates.rb
 #: app/controllers/integration/check_mk_controller.rb
 #: app/controllers/users_controller.rb
@@ -9118,6 +9123,10 @@ msgstr ""
 msgid "The required field 'endpoint' is missing from the config."
 msgstr ""
 
+#: app/models/postmaster_filter.rb
+msgid "The required match value is missing."
+msgstr ""
+
 #: lib/external_credential/facebook.rb
 msgid "The required parameter 'application_id' is missing."
 msgstr ""
@@ -10289,6 +10298,9 @@ msgid "Username / email"
 msgstr ""
 
 #: app/assets/javascripts/app/views/settings/proxy.jst.eco
+msgid "Username for proxy connection"
+msgstr ""
+
 #: db/seeds/settings.rb
 msgid "Username for proxy connection."
 msgstr ""
@@ -11248,6 +11260,10 @@ msgstr ""
 msgid "disconnect"
 msgstr ""
 
+#: app/assets/javascripts/app/controllers/cti.coffee
+msgid "does not exist"
+msgstr ""
+
 #: app/assets/javascripts/app/views/import/freshdesk.jst.eco
 #: app/assets/javascripts/app/views/import/kayako.jst.eco
 #: app/assets/javascripts/app/views/import/otrs.jst.eco
@@ -11524,7 +11540,7 @@ msgstr ""
 
 #: app/assets/javascripts/app/views/data_privacy/preview.jst.eco
 #: app/assets/javascripts/app/views/generic/application_selector.jst.eco
-msgid "matches"
+msgid "matches found"
 msgstr ""
 
 #: app/assets/javascripts/app/views/cti/caller_log.jst.eco
@@ -11587,10 +11603,6 @@ msgstr ""
 msgid "none"
 msgstr ""
 
-#: app/assets/javascripts/app/controllers/cti.coffee
-msgid "not exist"
-msgstr ""
-
 #: app/assets/javascripts/app/controllers/cti.coffee
 msgid "not reached"
 msgstr ""
@@ -11836,10 +11848,6 @@ msgstr ""
 msgid "till (relative)"
 msgstr ""
 
-#: app/assets/javascripts/app/controllers/_ui_element/ticket_perform_action.coffee
-msgid "to"
-msgstr ""
-
 #: app/views/knowledge_base/public/not_found.html.erb
 msgid "to go to the homepage."
 msgstr ""