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
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
App.TaskManager.remove("Ticket-#{data.source_ticket['id']}")

View file

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

View file

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

View file

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

View file

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

View file

@ -372,7 +372,7 @@ class TicketsController < ApplicationController
if !target_ticket
render json: {
result: 'failed',
message: __('No such target ticket number!'),
message: __('Could not find target ticket number!'),
}
return
end
@ -383,7 +383,7 @@ class TicketsController < ApplicationController
if !source_ticket
render json: {
result: 'failed',
message: __('No such source ticket!'),
message: __('Could not find source ticket!'),
}
return
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."
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
msgid "Couldn't create Knowledge Base"
msgstr ""
@ -6303,10 +6335,6 @@ msgstr ""
msgid "No content to show"
msgstr ""
#: app/controllers/channels_twitter_controller.rb
msgid "No crc_token in verify payload from twitter!"
msgstr ""
#: app/controllers/users_controller.rb
msgid "No email!"
msgstr ""
@ -6315,14 +6343,6 @@ msgstr ""
msgid "No entries found in selected folder(s)."
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
msgid "No facebook app configured!"
msgstr ""
@ -6409,38 +6429,6 @@ msgstr ""
msgid "No source data submitted!"
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
msgid "No template created yet."
msgstr ""
@ -7154,6 +7142,10 @@ msgstr ""
msgid "Please enable execution_time feature to use it (currently only allowed for triggers and schedulers)"
msgstr ""
#: app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee
msgid "Please enter a text."
msgstr ""
#: app/models/knowledge_base.rb
msgid "Please enter valid path or domain"
msgstr ""
@ -7166,10 +7158,6 @@ msgstr ""
msgid "Please execute database changes only in a maintenance time-slot."
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
msgid "Please fill in all fields"
msgstr ""
@ -7560,6 +7548,18 @@ msgstr ""
msgid "Requesting the Grant"
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/form.jst.eco
msgid "Requirements"
@ -9057,7 +9057,7 @@ msgid "Ticket %s created!"
msgstr ""
#: app/assets/javascripts/app/controllers/agent_ticket_merge.coffee
msgid "Ticket %s merged!"
msgid "Ticket %s merged."
msgstr ""
#: app/models/report.rb

View file

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

View file

@ -2031,7 +2031,7 @@ RSpec.describe 'Ticket', type: :request do
expect(response).to have_http_status(:ok)
expect(json_response).to be_a_kind_of(Hash)
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
expect(response).to have_http_status(:forbidden)