Просмотр исходного кода

Maintenance: Improved translatable source strings.

Martin Gruner 2 лет назад
Родитель
Сommit
85cbfc6851

+ 1 - 1
app/assets/javascripts/app/lib/app_post/browser.coffee

@@ -102,7 +102,7 @@ class Modal extends App.ControllerModal
   buttonSubmit: false
   backdrop: false
   keyboard: false
-  head: __('Browser too old!')
+  head: __('Outdated Browser')
 
   content: ->
     "Your Browser is not supported (#{@data.browser.name} #{@data.browser.major} on #{@data.os.name}). Please use a newer one (e. g. #{@data.browser.name} #{@version} or higher)."

+ 1 - 1
app/controllers/application_controller/authenticates.rb

@@ -128,7 +128,7 @@ module ApplicationController::Authenticates
       logger.debug { "OAuth2 token auth check '#{token}'" }
       access_token = Doorkeeper::AccessToken.by_token(token)
 
-      raise Exceptions::NotAuthorized, __('Invalid token!') if !access_token
+      raise Exceptions::NotAuthorized, __('The provided token is invalid.') if !access_token
 
       # check expire
       if access_token.expires_in && (access_token.created_at + access_token.expires_in) < Time.zone.now

+ 2 - 2
app/controllers/import_freshdesk_controller.rb

@@ -9,7 +9,7 @@ class ImportFreshdeskController < ApplicationController
     if params[:url].blank? || params[:url] !~ %r{^(http|https)://.+?$}
       render json: {
         result:  'invalid',
-        message: __('Invalid URL!'),
+        message: __('The provided URL is invalid.'),
       }
       return
     end
@@ -58,7 +58,7 @@ class ImportFreshdeskController < ApplicationController
 
       render json: {
         result:        'invalid',
-        message_human: __('Invalid credentials!'),
+        message_human: __('The provided credentials are invalid.'),
       }
       return
     end

+ 2 - 2
app/controllers/import_kayako_controller.rb

@@ -10,7 +10,7 @@ class ImportKayakoController < ApplicationController
     if !valid_url_syntax?(url)
       render json: {
         result:  'invalid',
-        message: __('Invalid URL!'),
+        message: __('The provided URL is invalid.'),
       }
       return
     end
@@ -127,7 +127,7 @@ class ImportKayakoController < ApplicationController
 
       render json: {
         result:        'invalid',
-        message_human: __('Invalid credentials!'),
+        message_human: __('The provided credentials are invalid.'),
       }
       return false
     end

+ 1 - 1
app/controllers/import_otrs_controller.rb

@@ -9,7 +9,7 @@ class ImportOtrsController < ApplicationController
     if !params[:url] || params[:url] !~ %r{^(http|https)://.+?$}
       render json: {
         result:  'invalid',
-        message: __('Invalid URL!'),
+        message: __('The provided URL is invalid.'),
       }
       return
     end

+ 2 - 2
app/controllers/import_zendesk_controller.rb

@@ -9,7 +9,7 @@ class ImportZendeskController < ApplicationController
     if params[:url].blank? || params[:url] !~ %r{^(http|https)://.+?$}
       render json: {
         result:  'invalid',
-        message: __('Invalid URL!'),
+        message: __('The provided URL is invalid.'),
       }
       return
     end
@@ -83,7 +83,7 @@ class ImportZendeskController < ApplicationController
 
       render json: {
         result:        'invalid',
-        message_human: __('Invalid credentials!'),
+        message_human: __('The provided credentials are invalid.'),
       }
       return
     end

+ 1 - 1
app/controllers/integration/check_mk_controller.rb

@@ -144,7 +144,7 @@ UserAgent: #{request.env['HTTP_USER_AGENT'] || '-'}
     end
 
     if Setting.get('check_mk_token') != params[:token]
-      raise Exceptions::UnprocessableEntity, __('Invalid token!')
+      raise Exceptions::UnprocessableEntity, __('The provided token is invalid.')
     end
 
     true

+ 1 - 1
app/controllers/mentions_controller.rb

@@ -55,7 +55,7 @@ class MentionsController < ApplicationController
 
   def mentionable_type!
     @mentionable_type ||= begin
-      raise __('Invalid mentionable_type!') if 'Ticket'.freeze != params[:mentionable_type]
+      raise __("The parameter 'mentionable_type' is invalid.") if 'Ticket'.freeze != params[:mentionable_type]
 
       params[:mentionable_type]
     end

+ 1 - 1
app/controllers/users_controller.rb

@@ -364,7 +364,7 @@ curl http://localhost/api/v1/users/email_verify -v -u #{login}:#{password} -H "C
     raise Exceptions::UnprocessableEntity, __('No token!') if !params[:token]
 
     user = User.signup_verify_via_token(params[:token], current_user)
-    raise Exceptions::UnprocessableEntity, __('Invalid token!') if !user
+    raise Exceptions::UnprocessableEntity, __('The provided token is invalid.') if !user
 
     current_user_set(user)
 

+ 3 - 3
app/models/webhook.rb

@@ -17,9 +17,9 @@ class Webhook < ApplicationModel
   def validate_endpoint
     uri = URI.parse(endpoint)
 
-    errors.add(:endpoint, __('Invalid endpoint (no http/https)!')) if !uri.is_a?(URI::HTTP)
-    errors.add(:endpoint, __('Invalid endpoint (no hostname)!')) if uri.host.nil?
+    errors.add(:endpoint, __('The provided endpoint is invalid, no http or https protocol was specified.')) if !uri.is_a?(URI::HTTP)
+    errors.add(:endpoint, __('The provided endpoint is invalid, no hostname was specified.')) if uri.host.nil?
   rescue URI::InvalidURIError
-    errors.add :endpoint, __('Invalid endpoint!')
+    errors.add :endpoint, __('The provided endpoint is invalid.')
   end
 end

Некоторые файлы не были показаны из-за большого количества измененных файлов