From 84b071a039c33beb1e8711316decda60f53de7de Mon Sep 17 00:00:00 2001 From: Martin Gruner Date: Tue, 18 Jan 2022 07:17:00 +0100 Subject: [PATCH] Closes: #3918 - Improved translatable source strings. --- .../controllers/agent_ticket_create.coffee | 4 +-- .../views/time_accounting/by_ticket.jst.eco | 6 ++--- .../knowledge_base_breadcrumb_helper.rb | 2 +- app/models/object_manager/object.rb | 2 +- app/views/mailer/test_ticket/it.html.erb | 4 +-- i18n/zammad.pot | 26 ++++--------------- spec/system/keyboard_shortcuts_spec.rb | 4 +-- .../profile/preferences_language_spec.rb | 4 +-- .../agent_navigation_and_title_test.rb | 12 ++++----- 9 files changed, 24 insertions(+), 40 deletions(-) diff --git a/app/assets/javascripts/app/controllers/agent_ticket_create.coffee b/app/assets/javascripts/app/controllers/agent_ticket_create.coffee index 9f3177bab..d064c9479 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_create.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_create.coffee @@ -107,12 +107,12 @@ class App.TicketCreate extends App.Controller 'phone-in': sender: 'Customer' article: 'phone' - title: __('Call Inbound') + title: __('Inbound Call') screen: 'create_phone_in' 'phone-out': sender: 'Agent' article: 'phone' - title: __('Call Outbound') + title: __('Outbound Call') screen: 'create_phone_out' 'email-out': sender: 'Agent' diff --git a/app/assets/javascripts/app/views/time_accounting/by_ticket.jst.eco b/app/assets/javascripts/app/views/time_accounting/by_ticket.jst.eco index 802dd1c93..71a9d0ae3 100644 --- a/app/assets/javascripts/app/views/time_accounting/by_ticket.jst.eco +++ b/app/assets/javascripts/app/views/time_accounting/by_ticket.jst.eco @@ -13,8 +13,8 @@ <%- @T('Agent') %> <%- @T('Time Units') %> <%- @T('Time Units Total') %> - <%- @T('Created at') %> - <%- @T('Closed at') %> + <%- @T('Created At') %> + <%- @T('Closed At') %> <% for row in @rows: %> @@ -32,4 +32,4 @@ -<% end %> \ No newline at end of file +<% end %> diff --git a/app/helpers/knowledge_base_breadcrumb_helper.rb b/app/helpers/knowledge_base_breadcrumb_helper.rb index 297d952a8..1c8aeaf8c 100644 --- a/app/helpers/knowledge_base_breadcrumb_helper.rb +++ b/app/helpers/knowledge_base_breadcrumb_helper.rb @@ -21,7 +21,7 @@ module KnowledgeBaseBreadcrumbHelper objects = calculate_breadcrumb_to_category(object&.parent) last = if alternative.present? && alternative.translations.any? - Translation.translate(system_locale_via_uri&.locale, 'Alternative translations') + Translation.translate(system_locale_via_uri&.locale, 'Alternative Translations') else object end diff --git a/app/models/object_manager/object.rb b/app/models/object_manager/object.rb index af8447ac8..8c8af5063 100644 --- a/app/models/object_manager/object.rb +++ b/app/models/object_manager/object.rb @@ -17,7 +17,7 @@ get user based list of used object attributes returns: [ - { name: 'api_key', display: __('API KEY'), tag: 'input', null: true, edit: true, maxlength: 32 }, + { name: 'api_key', display: __('API Key'), tag: 'input', null: true, edit: true, maxlength: 32 }, { name: 'api_ip_regexp', display: __('API IP RegExp'), tag: 'input', null: true, edit: true }, { name: 'api_ip_max', display: __('API IP Max'), tag: 'input', null: true, edit: true }, ] diff --git a/app/views/mailer/test_ticket/it.html.erb b/app/views/mailer/test_ticket/it.html.erb index a90ef716c..0adbb4b82 100644 --- a/app/views/mailer/test_ticket/it.html.erb +++ b/app/views/mailer/test_ticket/it.html.erb @@ -1,8 +1,8 @@ Ticket di prova! -
Cear #{agent.firstname},
,. +
Caro #{agent.firstname},
,.
-
Questo è un test ticket. Sono un cliente e ho bisogno di aiuto! :)
+
Questo è un ticket di prova. Sono un cliente e ho bisogno di aiuto! :)

#{customer.fullname}

diff --git a/i18n/zammad.pot b/i18n/zammad.pot index b5b9155b0..363ec8b7c 100644 --- a/i18n/zammad.pot +++ b/i18n/zammad.pot @@ -350,11 +350,8 @@ msgstr "" msgid "API IP RegExp" msgstr "" -#: app/models/object_manager/object.rb -msgid "API KEY" -msgstr "" - #: app/assets/javascripts/app/controllers/_integration/clearbit.coffee +#: app/models/object_manager/object.rb msgid "API Key" msgstr "" @@ -721,6 +718,7 @@ msgstr "" msgid "Alternative FQDN for callbacks if you operate Zammad in internal network." msgstr "" +#: app/helpers/knowledge_base_breadcrumb_helper.rb #: app/helpers/knowledge_base_public_page_title_helper.rb msgid "Alternative Translations" msgstr "" @@ -729,10 +727,6 @@ msgstr "" msgid "Alternative name" msgstr "" -#: app/helpers/knowledge_base_breadcrumb_helper.rb -msgid "Alternative translations" -msgstr "" - #: app/assets/javascripts/app/views/generic/object_import/index.jst.eco msgid "Alternatively, you can use the Zammad API to import data." msgstr "" @@ -1304,14 +1298,6 @@ msgstr "" msgid "Calendars" msgstr "" -#: app/assets/javascripts/app/controllers/agent_ticket_create.coffee -msgid "Call Inbound" -msgstr "" - -#: app/assets/javascripts/app/controllers/agent_ticket_create.coffee -msgid "Call Outbound" -msgstr "" - #: app/assets/javascripts/app/controllers/cti.coffee msgid "Call from %s for %s" msgstr "" @@ -1759,6 +1745,7 @@ msgstr "" msgid "Closed" msgstr "" +#: app/assets/javascripts/app/views/time_accounting/by_ticket.jst.eco #: lib/excel_sheet/ticket.rb msgid "Closed At" msgstr "" @@ -1768,10 +1755,6 @@ msgstr "" msgid "Closed Tickets" msgstr "" -#: app/assets/javascripts/app/views/time_accounting/by_ticket.jst.eco -msgid "Closed at" -msgstr "" - #: db/seeds/schedulers.rb msgid "Closed chat sessions where participients are offline." msgstr "" @@ -2186,6 +2169,7 @@ msgstr "" msgid "Created" msgstr "" +#: app/assets/javascripts/app/views/time_accounting/by_ticket.jst.eco #: lib/excel_sheet/ticket.rb msgid "Created At" msgstr "" @@ -2195,7 +2179,6 @@ msgstr "" #: app/assets/javascripts/app/models/ticket.coffee #: app/assets/javascripts/app/models/user.coffee #: app/assets/javascripts/app/views/customer_chat/chat_window.jst.eco -#: app/assets/javascripts/app/views/time_accounting/by_ticket.jst.eco #: app/assets/javascripts/app/views/widget/http_log.jst.eco #: app/assets/javascripts/app/views/widget/http_log_show.jst.eco msgid "Created at" @@ -4864,6 +4847,7 @@ msgstr "" msgid "Inbound" msgstr "" +#: app/assets/javascripts/app/controllers/agent_ticket_create.coffee #: app/assets/javascripts/app/views/navigation/menu_cti_ringing.jst.eco msgid "Inbound Call" msgstr "" diff --git a/spec/system/keyboard_shortcuts_spec.rb b/spec/system/keyboard_shortcuts_spec.rb index 935e3f7c6..a8ad41d20 100644 --- a/spec/system/keyboard_shortcuts_spec.rb +++ b/spec/system/keyboard_shortcuts_spec.rb @@ -147,7 +147,7 @@ RSpec.describe 'Keyboard Shortcuts', type: :system do it 'show the next tab' do within :active_content, 'form.ticket-create' do - expect(page).to have_title 'Call Inbound' + expect(page).to have_title 'Inbound Call' end end end @@ -157,7 +157,7 @@ RSpec.describe 'Keyboard Shortcuts', type: :system do it 'shows the previous tab' do within :active_content, 'form.ticket-create' do - expect(page).to have_title 'Call Outbound' + expect(page).to have_title 'Outbound Call' end end end diff --git a/spec/system/profile/preferences_language_spec.rb b/spec/system/profile/preferences_language_spec.rb index 30c971097..b629fc8cb 100644 --- a/spec/system/profile/preferences_language_spec.rb +++ b/spec/system/profile/preferences_language_spec.rb @@ -115,7 +115,7 @@ RSpec.describe 'Profile > Language', type: :system do let(:path) { 'ticket/create' } let(:title) { 'preferences lang check #1' } let(:customer) { 'nicole' } - let(:translated_content) { "Call Inbound: #{title}" } + let(:translated_content) { "Inbound Call: #{title}" } translated_element = '.newTicket .ticket-create' @@ -206,7 +206,7 @@ RSpec.describe 'Profile > Language', type: :system do let(:path) { 'ticket/create' } let(:title) { 'preferences lang check #1' } let(:customer) { 'nicole' } - let(:translated_content) { "Anruf eingehend: #{title}" } + let(:translated_content) { "Eingehender Anruf: #{title}" } translated_element = '.newTicket .ticket-create' diff --git a/test/browser/agent_navigation_and_title_test.rb b/test/browser/agent_navigation_and_title_test.rb index ee87bfdeb..e1feb2d6b 100644 --- a/test/browser/agent_navigation_and_title_test.rb +++ b/test/browser/agent_navigation_and_title_test.rb @@ -49,30 +49,30 @@ class AgentNavigationAndTitleTest < TestCase do_not_submit: true, ) sleep 4 - verify_title(value: 'Call Inbound') + verify_title(value: 'Inbound Call') verify_task( data: { - title: 'Call Inbound: ticket create #1', + title: 'Inbound Call: ticket create #1', } ) exists_not(css: '#navigation .js-menu .is-active') execute(js: 'App.Event.trigger("ui:rerender")') sleep 1 - verify_title(value: 'Call Inbound') + verify_title(value: 'Inbound Call') verify_task( data: { - title: 'Call Inbound: ticket create #1', + title: 'Inbound Call: ticket create #1', } ) exists_not(css: '#navigation .js-menu .is-active') reload sleep 2 - verify_title(value: 'Call Inbound') + verify_title(value: 'Inbound Call') verify_task( data: { - title: 'Call Inbound: ticket create #1', + title: 'Inbound Call: ticket create #1', } ) exists_not(css: '#navigation .js-menu .is-active')