Maintenance: Improved translatable source strings.

This commit is contained in:
Martin Gruner 2022-01-06 20:37:47 +01:00
parent 1218912494
commit 2a86a454c5
9 changed files with 65 additions and 65 deletions

View file

@ -95,7 +95,7 @@ class App.TicketMerge extends App.ControllerModal
# notify UI # notify UI
@notify @notify
type: 'success' type: 'success'
msg: App.i18n.translateContent('Ticket %s merged!', data.source_ticket['number']) msg: App.i18n.translateContent('Ticket %s merged.', data.source_ticket['number'])
timeout: 4000 timeout: 4000
App.TaskManager.remove("Ticket-#{data.source_ticket['id']}") App.TaskManager.remove("Ticket-#{data.source_ticket['id']}")

View file

@ -300,7 +300,7 @@ class App.TicketZoomArticleNew extends App.Controller
buttonCancel: __('Cancel') buttonCancel: __('Cancel')
buttonCancelClass: 'btn--danger' buttonCancelClass: 'btn--danger'
buttonSubmit: false buttonSubmit: false
message: __('Please fill also some text in!') message: __('Please enter a text.')
shown: true shown: true
small: true small: true
container: @el.closest('.content') container: @el.closest('.content')

View file

@ -28,14 +28,14 @@ class ChannelsTwitterController < ApplicationController
@channel = channel @channel = channel
end end
raise Exceptions::UnprocessableEntity, "No such channel for user id '#{params[:for_user_id]}'!" if !@channel raise Exceptions::UnprocessableEntity, "Could not find channel for user id '#{params[:for_user_id]}'!" if !@channel
true true
end end
def hmac_signature_by_app(content) def hmac_signature_by_app(content)
external_credential = ExternalCredential.find_by(name: 'twitter') external_credential = ExternalCredential.find_by(name: 'twitter')
raise Exceptions::UnprocessableEntity, __('No such external_credential \'twitter\'!') if !external_credential raise Exceptions::UnprocessableEntity, __("Could not find external_credential 'twitter'!") if !external_credential
hmac_signature_gen(external_credential.credentials[:consumer_secret], content) hmac_signature_gen(external_credential.credentials[:consumer_secret], content)
end end
@ -51,9 +51,9 @@ class ChannelsTwitterController < ApplicationController
if !external_credential && ExternalCredential.exists?(name: 'twitter') if !external_credential && ExternalCredential.exists?(name: 'twitter')
external_credential = ExternalCredential.find_by(name: 'twitter').credentials external_credential = ExternalCredential.find_by(name: 'twitter').credentials
end end
raise Exceptions::UnprocessableEntity, __('No external_credential in cache!') if external_credential.blank? raise Exceptions::UnprocessableEntity, __('Could not find external_credential in cache!') if external_credential.blank?
raise Exceptions::UnprocessableEntity, __('No external_credential[:consumer_secret] in cache!') if external_credential[:consumer_secret].blank? raise Exceptions::UnprocessableEntity, __('Could not find external_credential[:consumer_secret] in cache!') if external_credential[:consumer_secret].blank?
raise Exceptions::UnprocessableEntity, __('No crc_token in verify payload from twitter!') if params['crc_token'].blank? raise Exceptions::UnprocessableEntity, __("Required parameter 'crc_token' missing in verify payload from twitter!") if params['crc_token'].blank?
render json: { render json: {
response_token: hmac_signature_gen(external_credential[:consumer_secret], params['crc_token']) response_token: hmac_signature_gen(external_credential[:consumer_secret], params['crc_token'])

View file

@ -31,7 +31,7 @@ class LinksController < ApplicationController
end end
if !object if !object
render json: { error: __('No such object!') }, status: :unprocessable_entity render json: { error: __('Could not find object!') }, status: :unprocessable_entity
return return
end end

View file

@ -64,7 +64,7 @@ class ReportsController < ApplicationController
if !params[:downloadBackendSelected] if !params[:downloadBackendSelected]
render json: { render json: {
error: __('No such downloadBackendSelected param'), error: __("Required parameter 'downloadBackendSelected' is missing."),
}, status: :unprocessable_entity }, status: :unprocessable_entity
return return
end end
@ -126,7 +126,7 @@ class ReportsController < ApplicationController
def params_all def params_all
profile = nil profile = nil
if !params[:profiles] && !params[:profile_id] if !params[:profiles] && !params[:profile_id]
raise Exceptions::UnprocessableEntity, __('No such profiles param') raise Exceptions::UnprocessableEntity, __("Required parameter 'profile' is missing.")
end end
if params[:profile_id] if params[:profile_id]
@ -139,12 +139,12 @@ class ReportsController < ApplicationController
end end
end end
if !profile if !profile
raise Exceptions::UnprocessableEntity, __('No such active profile') raise Exceptions::UnprocessableEntity, __('Could not find active reporting profile.')
end end
local_config = Report.config local_config = Report.config
if !local_config || !local_config[:metric] || !local_config[:metric][params[:metric].to_sym] if !local_config || !local_config[:metric] || !local_config[:metric][params[:metric].to_sym]
raise Exceptions::UnprocessableEntity, "No such metric #{params[:metric]}" raise Exceptions::UnprocessableEntity, "Could not find metric #{params[:metric]}"
end end
metric = local_config[:metric][params[:metric].to_sym] metric = local_config[:metric][params[:metric].to_sym]

View file

@ -372,7 +372,7 @@ class TicketsController < ApplicationController
if !target_ticket if !target_ticket
render json: { render json: {
result: 'failed', result: 'failed',
message: __('No such target ticket number!'), message: __('Could not find target ticket number!'),
} }
return return
end end
@ -383,7 +383,7 @@ class TicketsController < ApplicationController
if !source_ticket if !source_ticket
render json: { render json: {
result: 'failed', result: 'failed',
message: __('No such source ticket!'), message: __('Could not find source ticket!'),
} }
return return
end end

View file

@ -2017,6 +2017,38 @@ msgstr ""
msgid "Core Workflows are actions or constraints on selections in forms. Depending on an action, it is possible to hide or restrict fields or to change the obligation to fill them in." msgid "Core Workflows are actions or constraints on selections in forms. Depending on an action, it is possible to hide or restrict fields or to change the obligation to fill them in."
msgstr "" msgstr ""
#: app/controllers/reports_controller.rb
msgid "Could not find active reporting profile."
msgstr ""
#: app/controllers/channels_twitter_controller.rb
msgid "Could not find external_credential 'twitter'!"
msgstr ""
#: app/controllers/channels_twitter_controller.rb
msgid "Could not find external_credential in cache!"
msgstr ""
#: app/controllers/channels_twitter_controller.rb
msgid "Could not find external_credential[:consumer_secret] in cache!"
msgstr ""
#: app/controllers/links_controller.rb
msgid "Could not find object!"
msgstr ""
#: app/controllers/tickets_controller.rb
msgid "Could not find source ticket!"
msgstr ""
#: app/controllers/tickets_controller.rb
msgid "Could not find target ticket number!"
msgstr ""
#: lib/static_assets.rb
msgid "Could not read raw logo!"
msgstr ""
#: app/assets/javascripts/app/views/knowledge_base/new_modal.coffee #: app/assets/javascripts/app/views/knowledge_base/new_modal.coffee
msgid "Couldn't create Knowledge Base" msgid "Couldn't create Knowledge Base"
msgstr "" msgstr ""
@ -6303,10 +6335,6 @@ msgstr ""
msgid "No content to show" msgid "No content to show"
msgstr "" msgstr ""
#: app/controllers/channels_twitter_controller.rb
msgid "No crc_token in verify payload from twitter!"
msgstr ""
#: app/controllers/users_controller.rb #: app/controllers/users_controller.rb
msgid "No email!" msgid "No email!"
msgstr "" msgstr ""
@ -6315,14 +6343,6 @@ msgstr ""
msgid "No entries found in selected folder(s)." msgid "No entries found in selected folder(s)."
msgstr "" msgstr ""
#: app/controllers/channels_twitter_controller.rb
msgid "No external_credential in cache!"
msgstr ""
#: app/controllers/channels_twitter_controller.rb
msgid "No external_credential[:consumer_secret] in cache!"
msgstr ""
#: lib/external_credential/facebook.rb #: lib/external_credential/facebook.rb
msgid "No facebook app configured!" msgid "No facebook app configured!"
msgstr "" msgstr ""
@ -6409,38 +6429,6 @@ msgstr ""
msgid "No source data submitted!" msgid "No source data submitted!"
msgstr "" msgstr ""
#: app/controllers/reports_controller.rb
msgid "No such active profile"
msgstr ""
#: app/controllers/reports_controller.rb
msgid "No such downloadBackendSelected param"
msgstr ""
#: app/controllers/channels_twitter_controller.rb
msgid "No such external_credential 'twitter'!"
msgstr ""
#: app/controllers/links_controller.rb
msgid "No such object!"
msgstr ""
#: app/controllers/reports_controller.rb
msgid "No such profiles param"
msgstr ""
#: lib/static_assets.rb
msgid "No such raw logo!"
msgstr ""
#: app/controllers/tickets_controller.rb
msgid "No such source ticket!"
msgstr ""
#: app/controllers/tickets_controller.rb
msgid "No such target ticket number!"
msgstr ""
#: app/assets/javascripts/app/views/widget/template.jst.eco #: app/assets/javascripts/app/views/widget/template.jst.eco
msgid "No template created yet." msgid "No template created yet."
msgstr "" msgstr ""
@ -7154,6 +7142,10 @@ msgstr ""
msgid "Please enable execution_time feature to use it (currently only allowed for triggers and schedulers)" msgid "Please enable execution_time feature to use it (currently only allowed for triggers and schedulers)"
msgstr "" msgstr ""
#: app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee
msgid "Please enter a text."
msgstr ""
#: app/models/knowledge_base.rb #: app/models/knowledge_base.rb
msgid "Please enter valid path or domain" msgid "Please enter valid path or domain"
msgstr "" msgstr ""
@ -7166,10 +7158,6 @@ msgstr ""
msgid "Please execute database changes only in a maintenance time-slot." msgid "Please execute database changes only in a maintenance time-slot."
msgstr "" msgstr ""
#: app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee
msgid "Please fill also some text in!"
msgstr ""
#: app/assets/javascripts/app/controllers/knowledge_base/public_menu_form_item.coffee #: app/assets/javascripts/app/controllers/knowledge_base/public_menu_form_item.coffee
msgid "Please fill in all fields" msgid "Please fill in all fields"
msgstr "" msgstr ""
@ -7560,6 +7548,18 @@ msgstr ""
msgid "Requesting the Grant" msgid "Requesting the Grant"
msgstr "" msgstr ""
#: app/controllers/channels_twitter_controller.rb
msgid "Required parameter 'crc_token' missing in verify payload from twitter!"
msgstr ""
#: app/controllers/reports_controller.rb
msgid "Required parameter 'downloadBackendSelected' is missing."
msgstr ""
#: app/controllers/reports_controller.rb
msgid "Required parameter 'profile' is missing."
msgstr ""
#: app/assets/javascripts/app/views/channel/chat.jst.eco #: app/assets/javascripts/app/views/channel/chat.jst.eco
#: app/assets/javascripts/app/views/channel/form.jst.eco #: app/assets/javascripts/app/views/channel/form.jst.eco
msgid "Requirements" msgid "Requirements"
@ -9057,7 +9057,7 @@ msgid "Ticket %s created!"
msgstr "" msgstr ""
#: app/assets/javascripts/app/controllers/agent_ticket_merge.coffee #: app/assets/javascripts/app/controllers/agent_ticket_merge.coffee
msgid "Ticket %s merged!" msgid "Ticket %s merged."
msgstr "" msgstr ""
#: app/models/report.rb #: app/models/report.rb

View file

@ -74,7 +74,7 @@ returns
return Store.find(list[0]) return Store.find(list[0])
end end
raise __('No such raw logo!') raise __('Could not read raw logo!')
end end
=begin =begin

View file

@ -2031,7 +2031,7 @@ RSpec.describe 'Ticket', type: :request do
expect(response).to have_http_status(:ok) expect(response).to have_http_status(:ok)
expect(json_response).to be_a_kind_of(Hash) expect(json_response).to be_a_kind_of(Hash)
expect(json_response['result']).to eq('failed') expect(json_response['result']).to eq('failed')
expect(json_response['message']).to eq('No such target ticket number!') expect(json_response['message']).to eq('Could not find target ticket number!')
put "/api/v1/ticket_merge/#{ticket3.id}/#{ticket1.number}", params: {}, as: :json put "/api/v1/ticket_merge/#{ticket3.id}/#{ticket1.number}", params: {}, as: :json
expect(response).to have_http_status(:forbidden) expect(response).to have_http_status(:forbidden)