Maintenance: Improved translatable source strings.

This commit is contained in:
Martin Gruner 2021-12-07 10:55:00 +01:00
parent 0b860a58f6
commit c84416aec0
23 changed files with 43 additions and 43 deletions

View file

@ -59,7 +59,7 @@ class App.ManageKnowledgeBase extends App.ControllerTabs
@renderNonExistant() @renderNonExistant()
renderNonExistant: -> renderNonExistant: ->
@renderScreenError(detail: __('No Knowledge Base. Please create first Knowledge Base'), el: @$('.page-content')) @renderScreenError(detail: __('There is no Knowledge Base yet. Please create one.'), el: @$('.page-content'))
@headerSwitchInput.prop('checked', false) @headerSwitchInput.prop('checked', false)
@modal = new App.KnowledgeBaseNewModal( @modal = new App.KnowledgeBaseNewModal(

View file

@ -219,7 +219,7 @@ class App.TicketCreate extends App.Controller
@log 'debug', 'form hash changed', diff, data @log 'debug', 'form hash changed', diff, data
App.TaskManager.update(@taskKey, { 'state': data }) App.TaskManager.update(@taskKey, { 'state': data })
# check it task title in task need to be updated # check it task title in task needs to be updated
if @latestTitle isnt data.title if @latestTitle isnt data.title
@latestTitle = data.title @latestTitle = data.title
App.TaskManager.touch(@taskKey) App.TaskManager.touch(@taskKey)

View file

@ -9,7 +9,7 @@ class TicketCreateFormHanderSignature
if group && group.signature_id if group && group.signature_id
signature = App.Signature.find(group.signature_id) signature = App.Signature.find(group.signature_id)
# check if signature need to be added # check if signature needs to be added
type = ui.el.closest('.content').find('[name="formSenderType"]').val() type = ui.el.closest('.content').find('[name="formSenderType"]').val()
if signature && signature.body && type is 'email-out' if signature && signature.body && type is 'email-out'
signatureFinished = App.Utils.replaceTags(signature.body, { user: App.Session.get(), config: App.Config.all() }) signatureFinished = App.Utils.replaceTags(signature.body, { user: App.Session.get(), config: App.Config.all() })

View file

@ -12,7 +12,7 @@ class EmailReply extends App.Controller
href: '#' href: '#'
} }
# check if reply all need to be shown # check if reply all needs to be shown
recipients = [] recipients = []
if article.sender.name is 'Customer' if article.sender.name is 'Customer'
if article.from if article.from
@ -127,7 +127,7 @@ class EmailReply extends App.Controller
# get current body # get current body
body = ui.el.closest('.ticketZoom').find('.article-add [data-name="body"]').html() || '' body = ui.el.closest('.ticketZoom').find('.article-add [data-name="body"]').html() || ''
# check if quote need to be added via user selection of content # check if quote needs to be added via user selection of content
signaturePosition = 'bottom' signaturePosition = 'bottom'
if !@hasUserSelectedContent(ui) if !@hasUserSelectedContent(ui)

View file

@ -125,7 +125,7 @@ class ArticleViewItem extends App.ControllerObserver
else else
@el.removeClass('is-internal') @el.removeClass('is-internal')
# check if email link need to be updated # check if email link needs to be updated
links = clone(article.preferences.links) || [] links = clone(article.preferences.links) || []
if article.type.name is 'email' if article.type.name is 'email'
link = link =

View file

@ -163,7 +163,7 @@ class _i18nSingleton extends Spine.Module
@dirToSet = locale.dir @dirToSet = locale.dir
localeFound = true localeFound = true
# check if locale need to be changed # check if locale needs to be changed
return if localeToSet is @locale return if localeToSet is @locale
# set locale # set locale

View file

@ -36,7 +36,7 @@
<%- @T('Enter your email address and password from your %s account which should be used for the import.', 'Kayako') %> <%- @T('Enter your email address and password from your %s account which should be used for the import.', 'Kayako') %>
</p> </p>
<p> <p>
<%- @T('Attention: These will also your login password after the import is completed.') %> <%- @T('Attention: These will also be your login and password after the import is completed.') %>
</p> </p>
<div class="form-group"> <div class="form-group">
<label for="kayako-email"><%- @T('Email') %></label> <label for="kayako-email"><%- @T('Email') %></label>

View file

@ -73,7 +73,7 @@ module ApplicationController::HasUser
session[:ping] = Time.zone.now.iso8601 session[:ping] = Time.zone.now.iso8601
# check if remote ip need to be updated # check if remote ip needs to be updated
if session[:user_id] if session[:user_id]
if !session[:remote_ip] || session[:remote_ip] != request.remote_ip # rubocop:disable Style/SoleNestedConditional if !session[:remote_ip] || session[:remote_ip] != request.remote_ip # rubocop:disable Style/SoleNestedConditional
session[:remote_ip] = request.remote_ip session[:remote_ip] = request.remote_ip

View file

@ -311,7 +311,7 @@ curl http://localhost/api/v1/monitoring/amount_check?token=XXX&periode=1h
raise Exceptions::UnprocessableEntity, 'periode need to have s, m, h or d as last!' if !scale.match?(%r{^(s|m|h|d)$}) raise Exceptions::UnprocessableEntity, 'periode need to have s, m, h or d as last!' if !scale.match?(%r{^(s|m|h|d)$})
periode = params[:periode][0, params[:periode].length - 1] periode = params[:periode][0, params[:periode].length - 1]
raise Exceptions::UnprocessableEntity, 'periode need to be an integer!' if periode.to_i.zero? raise Exceptions::UnprocessableEntity, 'periode needs to be an integer!' if periode.to_i.zero?
case scale case scale
when 's' when 's'
@ -334,7 +334,7 @@ curl http://localhost/api/v1/monitoring/amount_check?token=XXX&periode=1h
state_param = false state_param = false
map.each do |row| map.each do |row|
next if params[row[:param]].blank? next if params[row[:param]].blank?
raise Exceptions::UnprocessableEntity, "#{row[:param]} need to be an integer!" if params[row[:param]].to_i.zero? raise Exceptions::UnprocessableEntity, "#{row[:param]} needs to be an integer!" if params[row[:param]].to_i.zero?
state_param = true state_param = true

View file

@ -7,7 +7,7 @@ class ReportsController < ApplicationController
def reporting_config def reporting_config
if !Report.enabled? if !Report.enabled?
render json: { render json: {
error: __('Elasticsearch need to be configured!'), error: __('Elasticsearch needs to be configured!'),
} }
return return
end end

View file

@ -180,7 +180,7 @@ add avatar by url
end end
end end
# check if avatar need to be updated # check if avatar needs to be updated
if data[:resize].present? && data[:resize][:content].present? if data[:resize].present? && data[:resize][:content].present?
record[:store_hash] = Digest::MD5.hexdigest(data[:resize][:content]) record[:store_hash] = Digest::MD5.hexdigest(data[:resize][:content])
if avatar_already_exists&.store_hash == record[:store_hash] if avatar_already_exists&.store_hash == record[:store_hash]

View file

@ -73,7 +73,7 @@ class Cti::Driver::Base
config_inbound = @config[:inbound] || {} config_inbound = @config[:inbound] || {}
block_caller_ids = config_inbound[:block_caller_ids] || [] block_caller_ids = config_inbound[:block_caller_ids] || []
# check if call need to be blocked # check if call needs to be blocked
block_caller_ids.each do |item| block_caller_ids.each do |item|
next if item[:caller_id] != @params['from'] next if item[:caller_id] != @params['from']

View file

@ -176,7 +176,7 @@ returns
return true if !will_save_change_to_attribute?('active') return true if !will_save_change_to_attribute?('active')
return true if active != false return true if active != false
return true if !with_permission?(['admin', 'admin.user']) return true if !with_permission?(['admin', 'admin.user'])
raise Exceptions::UnprocessableEntity, __('Minimum one user needs to have admin permissions.') if last_admin_check_admin_count < 1 raise Exceptions::UnprocessableEntity, __('At least one user needs to have admin permissions.') if last_admin_check_admin_count < 1
true true
end end
@ -184,7 +184,7 @@ returns
def last_admin_check_by_permission(permission) def last_admin_check_by_permission(permission)
return true if Setting.get('import_mode') return true if Setting.get('import_mode')
return true if permission.name != 'admin' && permission.name != 'admin.user' return true if permission.name != 'admin' && permission.name != 'admin.user'
raise Exceptions::UnprocessableEntity, __('Minimum one user needs to have admin permissions.') if last_admin_check_admin_count < 1 raise Exceptions::UnprocessableEntity, __('At least one user needs to have admin permissions.') if last_admin_check_admin_count < 1
true true
end end

View file

@ -207,7 +207,7 @@ returns
next next
end end
# check if warning need to be sent # check if warning needs to be sent
TransactionJob.perform_now( TransactionJob.perform_now(
object: 'Ticket', object: 'Ticket',
type: 'escalation_warning', type: 'escalation_warning',

View file

@ -1010,7 +1010,7 @@ try to find correct name
preferences[:notification_sound][:enabled] = false preferences[:notification_sound][:enabled] = false
end end
class_name = preferences[:notification_sound][:enabled].class.to_s class_name = preferences[:notification_sound][:enabled].class.to_s
raise Exceptions::UnprocessableEntity, "preferences.notification_sound.enabled need to be an boolean, but it was a #{class_name}" if class_name != 'TrueClass' && class_name != 'FalseClass' raise Exceptions::UnprocessableEntity, "preferences.notification_sound.enabled needs to be an boolean, but it was a #{class_name}" if class_name != 'TrueClass' && class_name != 'FalseClass'
true true
end end
@ -1021,7 +1021,7 @@ checks if the current user is the last one with admin permissions.
Raises Raises
raise 'Minimum one user need to have admin permissions' raise 'At least one user need to have admin permissions'
=end =end
@ -1029,7 +1029,7 @@ raise 'Minimum one user need to have admin permissions'
return true if !will_save_change_to_attribute?('active') return true if !will_save_change_to_attribute?('active')
return true if active != false return true if active != false
return true if !permissions?(['admin', 'admin.user']) return true if !permissions?(['admin', 'admin.user'])
raise Exceptions::UnprocessableEntity, __('Minimum one user needs to have admin permissions.') if last_admin_check_admin_count < 1 raise Exceptions::UnprocessableEntity, __('At least one user needs to have admin permissions.') if last_admin_check_admin_count < 1
true true
end end
@ -1037,7 +1037,7 @@ raise 'Minimum one user need to have admin permissions'
def last_admin_check_by_role(role) def last_admin_check_by_role(role)
return true if Setting.get('import_mode') return true if Setting.get('import_mode')
return true if !role.with_permission?(['admin', 'admin.user']) return true if !role.with_permission?(['admin', 'admin.user'])
raise Exceptions::UnprocessableEntity, __('Minimum one user needs to have admin permissions.') if last_admin_check_admin_count < 1 raise Exceptions::UnprocessableEntity, __('At least one user needs to have admin permissions.') if last_admin_check_admin_count < 1
true true
end end

View file

@ -92,7 +92,7 @@ en:
unknown: 'The request is missing a required parameter, includes an unsupported parameter value, or is otherwise malformed.' unknown: 'The request is missing a required parameter, includes an unsupported parameter value, or is otherwise malformed.'
missing_param: 'Missing required parameter: %{value}.' missing_param: 'Missing required parameter: %{value}.'
not_support_pkce: 'Invalid code_verifier parameter. Server does not support pkce.' not_support_pkce: 'Invalid code_verifier parameter. Server does not support pkce.'
request_not_authorized: 'Request need to be authorized. Required parameter for authorizing request is missing or invalid.' request_not_authorized: 'Request needs to be authorized. Required parameter for authorizing request is missing or invalid.'
invalid_redirect_uri: "The requested redirect uri is malformed or doesn't match client redirect URI." invalid_redirect_uri: "The requested redirect uri is malformed or doesn't match client redirect URI."
unauthorized_client: 'The client is not authorized to perform this request using this method.' unauthorized_client: 'The client is not authorized to perform this request using this method.'
access_denied: 'The resource owner or authorization server denied the request.' access_denied: 'The resource owner or authorization server denied the request.'
@ -115,11 +115,11 @@ en:
unsupported_grant_type: 'The authorization grant type is not supported by the authorization server.' unsupported_grant_type: 'The authorization grant type is not supported by the authorization server.'
invalid_token: invalid_token:
revoked: "The access token was revoked" revoked: 'The access token was revoked'
expired: "The access token expired" expired: 'The access token expired'
unknown: "The access token is invalid" unknown: 'The access token is invalid'
revoke: revoke:
unauthorized: "You are not authorized to revoke this token" unauthorized: 'You are not authorized to revoke this token'
flash: flash:
applications: applications:

View file

@ -937,6 +937,11 @@ msgstr ""
msgid "At least one object must be selected." msgid "At least one object must be selected."
msgstr "" msgstr ""
#: app/models/role.rb
#: app/models/user.rb
msgid "At least one user needs to have admin permissions."
msgstr ""
#: app/assets/javascripts/app/views/generic/attachments.jst.eco #: app/assets/javascripts/app/views/generic/attachments.jst.eco
#: app/assets/javascripts/app/views/layout_ref/communication_overview.jst.eco #: app/assets/javascripts/app/views/layout_ref/communication_overview.jst.eco
#: app/assets/javascripts/app/views/layout_ref/ticket_zoom.jst.eco #: app/assets/javascripts/app/views/layout_ref/ticket_zoom.jst.eco
@ -955,7 +960,7 @@ msgid "Attachments"
msgstr "" msgstr ""
#: app/assets/javascripts/app/views/import/kayako.jst.eco #: app/assets/javascripts/app/views/import/kayako.jst.eco
msgid "Attention: These will also your login password after the import is completed." msgid "Attention: These will also be your login and password after the import is completed."
msgstr "" msgstr ""
#: app/assets/javascripts/app/views/import/freshdesk.jst.eco #: app/assets/javascripts/app/views/import/freshdesk.jst.eco
@ -3346,7 +3351,7 @@ msgid "Elasticsearch is not reachable, probably because it's not running or even
msgstr "" msgstr ""
#: app/controllers/reports_controller.rb #: app/controllers/reports_controller.rb
msgid "Elasticsearch need to be configured!" msgid "Elasticsearch needs to be configured!"
msgstr "" msgstr ""
#: app/assets/javascripts/app/controllers/_channel/email.coffee #: app/assets/javascripts/app/controllers/_channel/email.coffee
@ -5788,11 +5793,6 @@ msgstr ""
msgid "Minimum of one permission is needed!" msgid "Minimum of one permission is needed!"
msgstr "" msgstr ""
#: app/models/role.rb
#: app/models/user.rb
msgid "Minimum one user needs to have admin permissions."
msgstr ""
#: app/assets/javascripts/app/views/generic/timer.jst.eco #: app/assets/javascripts/app/views/generic/timer.jst.eco
msgid "Minute" msgid "Minute"
msgstr "" msgstr ""
@ -6237,10 +6237,6 @@ msgstr ""
msgid "No Knowledge Base created" msgid "No Knowledge Base created"
msgstr "" msgstr ""
#: app/assets/javascripts/app/controllers/_manage/knowledge_base.coffee
msgid "No Knowledge Base. Please create first Knowledge Base"
msgstr ""
#: lib/external_credential/microsoft365.rb #: lib/external_credential/microsoft365.rb
msgid "No Microsoft365 app configured!" msgid "No Microsoft365 app configured!"
msgstr "" msgstr ""
@ -8920,6 +8916,10 @@ msgstr ""
msgid "There can be several reasons for the chat to not show up:" msgid "There can be several reasons for the chat to not show up:"
msgstr "" msgstr ""
#: app/assets/javascripts/app/controllers/_manage/knowledge_base.coffee
msgid "There is no Knowledge Base yet. Please create one."
msgstr ""
#: app/assets/javascripts/app/views/channel/chat.jst.eco #: app/assets/javascripts/app/views/channel/chat.jst.eco
msgid "There is no agent online." msgid "There is no agent online."
msgstr "" msgstr ""

View file

@ -325,7 +325,7 @@ returns
ticket = possible_tickets.find_each.find { |possible_ticket| possible_ticket.preferences[:channel_id] == channel.id } ticket = possible_tickets.find_each.find { |possible_ticket| possible_ticket.preferences[:channel_id] == channel.id }
if ticket if ticket
# check if title need to be updated # check if title needs to be updated
if ticket.title == '-' if ticket.title == '-'
ticket.title = title ticket.title = title
end end

View file

@ -38,7 +38,7 @@ RSpec.describe Ticket::Subject do
expect(ticket.subject_clean('')).to eq('') expect(ticket.subject_clean('')).to eq('')
end end
it 'cleanup subject with long string which need to be truncated by [...]' do it 'cleanup subject with long string which needs to be truncated by [...]' do
expect(ticket.subject_clean('123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890')).to eq('12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[...]') expect(ticket.subject_clean('123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890')).to eq('12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[...]')
end end

View file

@ -89,7 +89,7 @@ RSpec.describe 'Message Bird SMS', type: :request do
expect(ticket.state.name).to eq('new') expect(ticket.state.name).to eq('new')
expect(article.id).to eq(Ticket::Article.last.id) expect(article.id).to eq(Ticket::Article.last.id)
# new ticket need to be create # new ticket needs to be created
ticket.state = Ticket::State.find_by(name: 'closed') ticket.state = Ticket::State.find_by(name: 'closed')
ticket.save! ticket.save!

View file

@ -96,7 +96,7 @@ RSpec.describe 'Twilio SMS', type: :request do
expect(ticket.state.name).to eq('new') expect(ticket.state.name).to eq('new')
expect(article.id).to eq(Ticket::Article.last.id) expect(article.id).to eq(Ticket::Article.last.id)
# new ticket need to be create # new ticket needs to be created
ticket.state = Ticket::State.find_by(name: 'closed') ticket.state = Ticket::State.find_by(name: 'closed')
ticket.save! ticket.save!

View file

@ -201,7 +201,7 @@ Some Textäöü".encode('ISO-8859-1'),
result: { result: {
0 => { 0 => {
priority: '2 normal', priority: '2 normal',
title: '??? some subject 3', # it's ok, because subject need to be 7bit encoded title: '??? some subject 3', # it's ok, because subject needs to be 7bit encoded
}, },
1 => { 1 => {
body: 'Some Text???', # it's ok, because no content-type is given body: 'Some Text???', # it's ok, because no content-type is given

View file

@ -40,7 +40,7 @@ class ObjectCacheTest < ActiveSupport::TestCase
roles = Role.where(name: %w[Agent Admin]) roles = Role.where(name: %w[Agent Admin])
groups = Group.all.order(:id) groups = Group.all.order(:id)
# be sure that minimum one admin is available # be sure that at least one admin is available
User.create_or_update( User.create_or_update(
login: 'last_admin_check@example.org', login: 'last_admin_check@example.org',
firstname: 'last_admin_check', firstname: 'last_admin_check',