Skip to content

Commit

Permalink
Maintenance: Mark missing strings for translation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgruner committed Jul 11, 2024
1 parent 520285b commit 876ecc3
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ class App.KnowledgeBaseAddForm extends App.ControllerModal
for key, value of params
@[key] = value

@head = @object.objectActionName()
@head = switch @object.constructor
when App.KnowledgeBaseAnswer
__('New Answer')
when App.KnowledgeBaseCategory
__('New Category')

super(params)

buttonSubmit: __('Create')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,12 @@ class App.KnowledgeBaseContentController extends App.Controller

# add delay to give it time to rerender before showing prompt
App.Delay.set => @rerenderIfConfirmed()

header: ->
switch @object.constructor
when App.KnowledgeBase
__('Edit Knowledge Base')
when App.KnowledgeBaseAnswer
__('Edit Answer')
when App.KnowledgeBaseCategory
__('Edit Category')
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class App.KnowledgeBasePermissionsDialog extends App.ControllerModal
head: 'Permissions'
includeForm: true
buttonSubmit: true
accessLevels: { editor: 'Editor', reader: 'Reader', none: 'None' }
accessLevels: { editor: __('Editor'), reader: __('Reader'), none: __('None') }

cellBackgroundClicked: (e) ->
return if e.target != e.currentTarget
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ InstanceMethods =
params['translations_attributes'] = [translation_params]
params

objectActionName: ->
action = if @isNew() then 'New' else 'Edit'
"#{action} #{@objectName()}"

removeTranslations: (options = {}) ->
for translation in @translations()
translation.remove(options)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="main flex vertical end">
<div class="page-header">
<div class="page-header-title">
<h2><%- @T(@object.objectActionName()) %></h2>
<h2><%- @T(@header()) %></h2>
<% if @object.constructor.canBePublished?(): %>
<%- @V('knowledge_base/content_can_be_published_header_suffix', object: @object) %>
<% end %>
Expand Down
31 changes: 30 additions & 1 deletion i18n/zammad.pot
Original file line number Diff line number Diff line change
Expand Up @@ -3222,7 +3222,7 @@ msgstr ""

#: app/assets/javascripts/app/controllers/_dashboard/first_steps_clues.coffee:19
#: app/assets/javascripts/app/controllers/_profile/token_access.coffee:81
#: app/assets/javascripts/app/controllers/knowledge_base/add_form.coffee:9
#: app/assets/javascripts/app/controllers/knowledge_base/add_form.coffee:14
#: app/assets/javascripts/app/models/group.coffee:45
#: app/assets/javascripts/app/views/agent_ticket_create.jst.eco:56
#: app/assets/javascripts/app/views/agent_user_create.jst.eco:13
Expand Down Expand Up @@ -5001,13 +5001,25 @@ msgstr ""
msgid "Edit"
msgstr ""

#: app/assets/javascripts/app/controllers/knowledge_base/content_controller.coffee:173
msgid "Edit Answer"
msgstr ""

#: app/assets/javascripts/app/controllers/knowledge_base/content_controller.coffee:175
msgid "Edit Category"
msgstr ""

#: app/assets/javascripts/app/controllers/agent_ticket_create/sidebar_customer.coffee:16
#: app/assets/javascripts/app/controllers/ticket_zoom/sidebar_customer.coffee:26
#: app/frontend/apps/desktop/pages/ticket/components/TicketSidebar/TicketSidebarCustomerContent.vue:34
#: app/frontend/apps/mobile/pages/ticket/views/TicketInformation/TicketInformationCustomer.vue:95
msgid "Edit Customer"
msgstr ""

#: app/assets/javascripts/app/controllers/knowledge_base/content_controller.coffee:171
msgid "Edit Knowledge Base"
msgstr ""

#: app/assets/javascripts/app/controllers/agent_ticket_create/sidebar_organization.coffee:21
#: app/assets/javascripts/app/controllers/ticket_zoom/sidebar_organization.coffee:11
#: app/frontend/apps/desktop/pages/ticket/components/TicketSidebar/TicketSidebarOrganizationContent.vue:39
Expand Down Expand Up @@ -5040,6 +5052,10 @@ msgstr ""
msgid "Editing on Desktop"
msgstr ""

#: app/assets/javascripts/app/controllers/knowledge_base/permissions_dialog.coffee:9
msgid "Editor"
msgstr ""

#: db/seeds/settings.rb:3533
msgid "Elasticsearch Attachment Extensions"
msgstr ""
Expand Down Expand Up @@ -8971,6 +8987,10 @@ msgstr ""
msgid "New Activity Type"
msgstr ""

#: app/assets/javascripts/app/controllers/knowledge_base/add_form.coffee:8
msgid "New Answer"
msgstr ""

#: app/assets/javascripts/app/views/api.jst.eco:52
msgid "New Application"
msgstr ""
Expand All @@ -8983,6 +9003,10 @@ msgstr ""
msgid "New Calendar"
msgstr ""

#: app/assets/javascripts/app/controllers/knowledge_base/add_form.coffee:10
msgid "New Category"
msgstr ""

#: app/assets/javascripts/app/views/data_privacy/index.jst.eco:8
msgid "New Deletion Task"
msgstr ""
Expand Down Expand Up @@ -9391,6 +9415,7 @@ msgstr ""
msgid "No, thanks"
msgstr ""

#: app/assets/javascripts/app/controllers/knowledge_base/permissions_dialog.coffee:9
#: app/assets/javascripts/app/controllers/ticket_zoom/time_unit.coffee:55
#: app/assets/javascripts/app/views/data_privacy/tasks.jst.eco:65
#: app/graphql/gql/types/ticket_type.rb:98
Expand Down Expand Up @@ -10828,6 +10853,10 @@ msgstr ""
msgid "Read"
msgstr ""

#: app/assets/javascripts/app/controllers/knowledge_base/permissions_dialog.coffee:9
msgid "Reader"
msgstr ""

#: app/assets/javascripts/app/views/report/time_range_picker.jst.eco:6
msgid "Real-time"
msgstr ""
Expand Down

0 comments on commit 876ecc3

Please sign in to comment.