Maintenance: Improved source strings for new features.

This commit is contained in:
Martin Gruner 2022-03-01 13:02:50 +01:00
parent b6151cb0da
commit 9bccb2d2d2
9 changed files with 24 additions and 27 deletions

View file

@ -104,7 +104,7 @@ class App.KnowledgeBaseContentController extends App.Controller
new App.ControllerConfirm( new App.ControllerConfirm(
head: __('Content was changed since loading') head: __('Content was changed since loading')
message: __('Your changes may override someone else\'s changes. Are you sure to save?') message: __('Your changes may override someone else\'s changes. Do you really want to save?')
callback: => callback: =>
@parentController.coordinator.saveChanges(@object, paramsForSaving, @) @parentController.coordinator.saveChanges(@object, paramsForSaving, @)
) )

View file

@ -64,7 +64,7 @@ class App.KnowledgeBasePermissionsDialog extends App.ControllerModal
@data = data @data = data
@update() @update()
error: (xhr) => error: (xhr) =>
@showAlert(xhr.responseJSON?.error || __('Unable to load changes')) @showAlert(xhr.responseJSON?.error || __('Changes could not be loaded.'))
) )
toggleDisabled: (state) => toggleDisabled: (state) =>
@ -88,5 +88,5 @@ class App.KnowledgeBasePermissionsDialog extends App.ControllerModal
@close() @close()
error: (xhr) => error: (xhr) =>
@toggleDisabled(false) @toggleDisabled(false)
@showAlert(xhr.responseJSON?.error || __('Unable to save changes')) @showAlert(xhr.responseJSON?.error || __('Changes could not be saved.'))
) )

View file

@ -121,7 +121,7 @@ class App.TicketZoomAttributeBar extends App.Controller
user = App.User.find draft?.updated_by_id user = App.User.find draft?.updated_by_id
name = user?.displayName() name = user?.displayName()
content = App.i18n.translatePlain('Last change %s<br>by %s', timestamp, name) content = App.i18n.translatePlain('Last change %s %s by %s', timestamp, '<br>', name)
# needs linebreak to align vertically without title # needs linebreak to align vertically without title
'<br>' + content '<br>' + content

View file

@ -1419,7 +1419,7 @@ class App.Utils
imageCache.onload = -> imageCache.onload = ->
App.Utils._htmlImage2DataUrl(imageCache, params) App.Utils._htmlImage2DataUrl(imageCache, params)
imageCache.onerror = -> imageCache.onerror = ->
App.Log.notice('Utils', "Unable to load image from #{originalImage.src}") App.Log.notice('Utils', "Image could not be loaded from #{originalImage.src}")
params.fail(originalImage) if params.fail params.fail(originalImage) if params.fail
imageCache.alt = originalImage.alt imageCache.alt = originalImage.alt
imageCache.src = originalImage.src imageCache.src = originalImage.src

View file

@ -124,7 +124,7 @@ class App.TicketSharedDraftModal extends App.ControllerModal
small: true small: true
content: -> content: ->
App.i18n.translateContent('Are you sure to delete this draft?') App.i18n.translateContent('Do you really want to delete this draft?')
onSubmit: -> onSubmit: ->
@startLoading() @startLoading()

View file

@ -16,7 +16,7 @@
<span class="attributeBar-draft--saving hide"> <span class="attributeBar-draft--saving hide">
<%- @Icon('reload') %> <%- @Icon('reload') %>
<%- @T('Sharing draft...') %> <%- @T('Sharing draft') %>
</span> </span>
</div> </div>

View file

@ -85,7 +85,7 @@ class TicketsController < ApplicationController
shared_draft = Ticket::SharedDraftStart.find_by id: shared_draft_id shared_draft = Ticket::SharedDraftStart.find_by id: shared_draft_id
if shared_draft && (shared_draft.group_id.to_s != params[:group_id]&.to_s || !shared_draft.group.shared_drafts?) if shared_draft && (shared_draft.group_id.to_s != params[:group_id]&.to_s || !shared_draft.group.shared_drafts?)
raise Exceptions::UnprocessableEntity, __('Shared draft not eligible for this ticket') raise Exceptions::UnprocessableEntity, __('Shared draft cannot be selected for this ticket.')
end end
shared_draft&.destroy shared_draft&.destroy
@ -259,7 +259,7 @@ class TicketsController < ApplicationController
shared_draft = Ticket::SharedDraftZoom.find_by id: shared_draft_id shared_draft = Ticket::SharedDraftZoom.find_by id: shared_draft_id
if shared_draft && shared_draft.ticket != ticket if shared_draft && shared_draft.ticket != ticket
raise Exceptions::UnprocessableEntity, __('Shared draft not eligible for this ticket') raise Exceptions::UnprocessableEntity, __('Shared draft cannot be selected for this ticket.')
end end
shared_draft&.destroy shared_draft&.destroy

View file

@ -837,10 +837,6 @@ msgstr ""
msgid "Archived at" msgid "Archived at"
msgstr "" msgstr ""
#: app/assets/javascripts/app/views/ticket_shared_draft_modal.coffee
msgid "Are you sure to delete this draft?"
msgstr ""
#: app/assets/javascripts/app/controllers/knowledge_base/content_controller.coffee #: app/assets/javascripts/app/controllers/knowledge_base/content_controller.coffee
msgid "Are you sure you want to reload? You have unsaved changes that will get lost" msgid "Are you sure you want to reload? You have unsaved changes that will get lost"
msgstr "" msgstr ""
@ -1510,6 +1506,11 @@ msgstr ""
msgid "Changes" msgid "Changes"
msgstr "" msgstr ""
#: app/assets/javascripts/app/controllers/knowledge_base/permissions_dialog.coffee
msgid "Changes could not be loaded."
msgstr ""
#: app/assets/javascripts/app/controllers/knowledge_base/permissions_dialog.coffee
#: app/assets/javascripts/app/views/knowledge_base/base_form.coffee #: app/assets/javascripts/app/views/knowledge_base/base_form.coffee
msgid "Changes could not be saved." msgid "Changes could not be saved."
msgstr "" msgstr ""
@ -3295,6 +3296,10 @@ msgstr ""
msgid "Do you really want to delete \"%s\"?" msgid "Do you really want to delete \"%s\"?"
msgstr "" msgstr ""
#: app/assets/javascripts/app/views/ticket_shared_draft_modal.coffee
msgid "Do you really want to delete this draft?"
msgstr ""
#: app/assets/javascripts/app/controllers/_application_controller/_modal_generic_destroy_confirm.coffee #: app/assets/javascripts/app/controllers/_application_controller/_modal_generic_destroy_confirm.coffee
#: app/assets/javascripts/app/controllers/tag.coffee #: app/assets/javascripts/app/controllers/tag.coffee
msgid "Do you really want to delete this object?" msgid "Do you really want to delete this object?"
@ -5186,7 +5191,7 @@ msgid "Invalid payload, need data:image in logo param"
msgstr "" msgstr ""
#: lib/knowledge_base/permissions_update.rb #: lib/knowledge_base/permissions_update.rb
msgid "Invalid permissions, do not lock out yourself" msgid "Invalid permissions, do not lock yourself out."
msgstr "" msgstr ""
#: app/models/concerns/checks_condition_validation.rb #: app/models/concerns/checks_condition_validation.rb
@ -5412,7 +5417,7 @@ msgid "Last Contact Customer At"
msgstr "" msgstr ""
#: app/assets/javascripts/app/controllers/ticket_zoom/attribute_bar.coffee #: app/assets/javascripts/app/controllers/ticket_zoom/attribute_bar.coffee
msgid "Last change %s<br>by %s" msgid "Last change %s %s by %s"
msgstr "" msgstr ""
#: app/assets/javascripts/app/models/ticket.coffee #: app/assets/javascripts/app/models/ticket.coffee
@ -8200,7 +8205,7 @@ msgid "Shared Drafts"
msgstr "" msgstr ""
#: app/controllers/tickets_controller.rb #: app/controllers/tickets_controller.rb
msgid "Shared draft not eligible for this ticket" msgid "Shared draft cannot be selected for this ticket."
msgstr "" msgstr ""
#: app/assets/javascripts/app/models/organization.coffee #: app/assets/javascripts/app/models/organization.coffee
@ -8209,7 +8214,7 @@ msgid "Shared organization"
msgstr "" msgstr ""
#: app/assets/javascripts/app/views/ticket_zoom/attribute_bar.jst.eco #: app/assets/javascripts/app/views/ticket_zoom/attribute_bar.jst.eco
msgid "Sharing draft..." msgid "Sharing draft"
msgstr "" msgstr ""
#: app/assets/javascripts/app/controllers/_profile/avatar.coffee #: app/assets/javascripts/app/controllers/_profile/avatar.coffee
@ -9639,14 +9644,6 @@ msgstr ""
msgid "URL (AJAX endpoint)" msgid "URL (AJAX endpoint)"
msgstr "" msgstr ""
#: app/assets/javascripts/app/controllers/knowledge_base/permissions_dialog.coffee
msgid "Unable to load changes"
msgstr ""
#: app/assets/javascripts/app/controllers/knowledge_base/permissions_dialog.coffee
msgid "Unable to save changes"
msgstr ""
#: app/controllers/first_steps_controller.rb #: app/controllers/first_steps_controller.rb
#: db/seeds/overviews.rb #: db/seeds/overviews.rb
msgid "Unassigned & Open Tickets" msgid "Unassigned & Open Tickets"
@ -10614,7 +10611,7 @@ msgid "Your callback URL"
msgstr "" msgstr ""
#: app/assets/javascripts/app/controllers/knowledge_base/content_controller.coffee #: app/assets/javascripts/app/controllers/knowledge_base/content_controller.coffee
msgid "Your changes may override someone else's changes. Are you sure to save?" msgid "Your changes may override someone else's changes. Do you really want to save?"
msgstr "" msgstr ""
#: app/assets/javascripts/app/views/integration/exchange_certificate_issue.jst.eco #: app/assets/javascripts/app/views/integration/exchange_certificate_issue.jst.eco

View file

@ -82,7 +82,7 @@ class KnowledgeBase
return if !@user return if !@user
return if KnowledgeBase::EffectivePermission.new(@user, @object).access_effective == 'editor' return if KnowledgeBase::EffectivePermission.new(@user, @object).access_effective == 'editor'
raise Exceptions::UnprocessableEntity, __('Invalid permissions, do not lock out yourself') raise Exceptions::UnprocessableEntity, __('Invalid permissions, do not lock yourself out.')
end end
def mark_permission_for_cleanup_if_needed(permission, parents) def mark_permission_for_cleanup_if_needed(permission, parents)