From 31aa6e6516c746d834acfe71a94f1c11c27274bb Mon Sep 17 00:00:00 2001 From: Jyri-Petteri Paloposki Date: Wed, 6 Jan 2021 10:54:17 +0200 Subject: [PATCH] Make a few string and help page translatable. Fix the recurring todo dialog close button. --- .rubocop.yml | 3 +++ app/assets/javascripts/tracks.js.erb | 1 + app/helpers/application_helper.rb | 15 +++++++++------ app/views/integrations/help.html.erb | 12 ++++++------ config/locales/cs.yml | 16 ++++++++++++++++ config/locales/de.yml | 16 ++++++++++++++++ config/locales/en.yml | 16 ++++++++++++++++ config/locales/es.yml | 16 ++++++++++++++++ config/locales/fi.yml | 16 ++++++++++++++++ config/locales/fr.yml | 16 ++++++++++++++++ config/locales/he.yml | 16 ++++++++++++++++ config/locales/nl.yml | 16 ++++++++++++++++ config/locales/ru.yml | 16 ++++++++++++++++ 13 files changed, 163 insertions(+), 12 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 3c3b1278..8785daf6 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -13,3 +13,6 @@ Style/Documentation: Style/StringLiterals: EnforcedStyle: double_quotes + +Layout/AlignParameters: + EnforcedStyle: with_fixed_indentation diff --git a/app/assets/javascripts/tracks.js.erb b/app/assets/javascripts/tracks.js.erb index 1130b384..2461d496 100644 --- a/app/assets/javascripts/tracks.js.erb +++ b/app/assets/javascripts/tracks.js.erb @@ -841,6 +841,7 @@ var RecurringTodosPage = { RecurringTodosPage.reset_radio(); $('#recurring_daily').show(); }, + closeText: 'X', appendTo: "#content" }); diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a3a0d3d2..e0887bb1 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -54,28 +54,31 @@ module ApplicationHelper end def link_to_context(context, descriptor = sanitize(context.name)) - link_to(descriptor, context, :title => "View context: #{context.name}") + link_to(descriptor, context, :title => I18n.t("contexts.view_link", :name => context.name)) end def link_to_project(project, descriptor = sanitize(project.name)) - link_to(descriptor, project, :title => "View project: #{project.name}") + link_to(descriptor, project, :title => I18n.t("projects.view_link", :name => project.name)) end def link_to_edit_note(note, descriptor = sanitize(note.id.to_s)) link_to(descriptor, edit_note_path(note), - { :id => "link_edit_#{dom_id(note)}", :class => "note_edit_settings" }) + :id => "link_edit_#{dom_id(note)}", :class => "note_edit_settings") end def link_to_project_mobile(project, accesskey, descriptor = sanitize(project.name)) - link_to(descriptor, project_path(project, :format => 'm'), { :title => "View project: #{project.name}", :accesskey => accesskey }) + link_to(descriptor, project_path(project, :format => 'm'), + :title => I18n.t("projects.view_link", :name => project.name), :accesskey => accesskey) end def item_link_to_context(item) - link_to_context(item.context, prefs.verbose_action_descriptors ? "[#{item.context.name}]" : "[C]") + link_to_context(item.context, + prefs.verbose_action_descriptors ? "[#{item.context.name}]" : "[" + I18n.t("contexts.letter_abbreviation") + "]") end def item_link_to_project(item) - link_to_project(item.project, prefs.verbose_action_descriptors ? "[#{item.project.name}]" : "[P]") + link_to_project(item.project, + prefs.verbose_action_descriptors ? "[#{item.project.name}]" : "[" + I18n.t("projects.letter_abbreviation") + "]") end def render_flash diff --git a/app/views/integrations/help.html.erb b/app/views/integrations/help.html.erb index 7402f854..9c527bea 100644 --- a/app/views/integrations/help.html.erb +++ b/app/views/integrations/help.html.erb @@ -1,12 +1,12 @@ -

Help

+

<%= t('help.title') %>

-

You can find information on the usage in the User manual in the project GitHub wiki.

+

<%= raw t('help.usage', :manual_link => '' + t('help.manual_link_text') + '') %>

-

If you encounter a bug or have a feature request, please report it in the issue queue.

+

<%= raw t('help.bugs', :issue_link => '' + t('help.issue_link_text') + '') %>

-

We gladly welcome all contributions to Tracks. Check the project website for further information. You can also come discuss with the community:

+

<%= raw t('help.contribute', :contribute_link => '' + t('help.contribute_link_text') + '') %>

diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 7231f9fe..99810a25 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -174,6 +174,7 @@ cs: hide_form: Schovat formulář hide_form_title: Schovat formulář last_completed_in_context: v tomto kontextu (posledních %{number}) + letter_abbreviation: C new_context_post: "' bude také vytvořen. Opravdu?" new_context_pre: Nový kontext ' no_contexts_: 'No contexts ' @@ -187,6 +188,7 @@ cs: status_hidden: kontext je skrytý todos_append: v této souvislosti update_status_message: Název kontextu byl změněn + view_link: 'View context: %{name}' visible_contexts: Viditelné kontexty data: import_destination_invalid: Invalid import destination @@ -355,6 +357,18 @@ cs: update: Обновить %{model} integrations: opensearch_description: Prohledat Tracks + help: + title: Help + usage: 'You can find information on the usage in the %{manual_link} in the project GitHub wiki.' + manual_link_text: User manual + bugs: 'If you encounter a bug or have a feature request, please report it in the %{issue_link}.' + issue_link_text: issue queue + contribute: 'We gladly welcome all contributions to Tracks. Check the %{contribute_link} for further information. You can also come discuss with the community:' + contribute_link_text: project website + mailing_list_link_text: Mailing list + irc_bullet: '%{irc_link} (also available in %{matrix_link})' + irc_link_text: 'IRC channel #Tracks@FreeNode' + matrix_link_text: Matrix layouts: mobile_navigation: calendar: Calendar @@ -579,6 +593,7 @@ cs: hide_form_title: Schovat formulář založení projektu is_active: je aktivní last_completed_in_project: "(last %{number})" + letter_abbreviation: P list_completed_projects: TRACKS::Hotové projekty list_projects: TRACKS::Projekty list_reviews: TRACKS::Revize @@ -601,6 +616,7 @@ cs: status_project_name_changed: Jméno projektu bylo změněno this_project: Tento projekt to_new_project_page: přejít k novému projektu + view_link: 'View project: %{name}' was_marked_complete: byl označen jako hotový was_marked_hidden: byl označen jako skrytý with_default_context: s výchozím kontextem '%{context_name}' diff --git a/config/locales/de.yml b/config/locales/de.yml index f0a800f6..785ca755 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -176,6 +176,7 @@ de: hide_form: Formular verstecken hide_form_title: Formular für neuen Kontext verstecken last_completed_in_context: in diesem Kontext (letzte %{number}) + letter_abbreviation: C new_context_post: "' wird ebenfalls angelegt. Fortfahren?" new_context_pre: Der neue Kontext ' no_contexts_: 'No contexts ' @@ -189,6 +190,7 @@ de: status_hidden: Kontext ist versteckt todos_append: in diesem Kontext update_status_message: Kontextname wurde geändert + view_link: 'View context: %{name}' visible_contexts: Sichtbare Kontexte data: import_destination_invalid: Invalid import destination @@ -361,6 +363,18 @@ de: update: Обновить %{model} integrations: opensearch_description: In Tracks suchen + help: + title: Help + usage: 'You can find information on the usage in the %{manual_link} in the project GitHub wiki.' + manual_link_text: User manual + bugs: 'If you encounter a bug or have a feature request, please report it in the %{issue_link}.' + issue_link_text: issue queue + contribute: 'We gladly welcome all contributions to Tracks. Check the %{contribute_link} for further information. You can also come discuss with the community:' + contribute_link_text: project website + mailing_list_link_text: Mailing list + irc_bullet: '%{irc_link} (also available in %{matrix_link})' + irc_link_text: 'IRC channel #Tracks@FreeNode' + matrix_link_text: Matrix layouts: mobile_navigation: calendar: Kalender @@ -595,6 +609,7 @@ de: hide_form_title: Formular verstecken is_active: ist aktiv last_completed_in_project: "(last %{number})" + letter_abbreviation: P list_completed_projects: TRACKS::Liste erledigter Projekte list_projects: TRACKS::Projektliste list_reviews: TRACKS::Rückblick @@ -617,6 +632,7 @@ de: status_project_name_changed: Projektname geändert this_project: Dieses Projekt to_new_project_page: Zu neuem Projekt weiterleiten + view_link: 'View project: %{name}' was_marked_complete: wurde als erledigt markiert was_marked_hidden: wurde als verborgen markiert with_default_context: mit dem Standard-Kontext '%{context_name}' diff --git a/config/locales/en.yml b/config/locales/en.yml index 15a6abd5..a890eb35 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -178,6 +178,7 @@ en: hide_form: Hide form hide_form_title: Hide new context form last_completed_in_context: "(last %{number})" + letter_abbreviation: C new_context_post: "' will be also created. Are you sure?" new_context_pre: New context ' no_contexts_: 'No contexts ' @@ -191,6 +192,7 @@ en: status_hidden: Context is hidden todos_append: in this context update_status_message: Name of context was changed + view_link: 'View context: %{name}' visible_contexts: Visible contexts data: import_destination_invalid: Invalid import destination @@ -365,6 +367,18 @@ en: update: Update %{model} integrations: opensearch_description: Search in Tracks + help: + title: Help + usage: 'You can find information on the usage in the %{manual_link} in the project GitHub wiki.' + manual_link_text: User manual + bugs: 'If you encounter a bug or have a feature request, please report it in the %{issue_link}.' + issue_link_text: issue queue + contribute: 'We gladly welcome all contributions to Tracks. Check the %{contribute_link} for further information. You can also come discuss with the community:' + contribute_link_text: project website + mailing_list_link_text: Mailing list + irc_bullet: '%{irc_link} (also available in %{matrix_link})' + irc_link_text: 'IRC channel #Tracks@FreeNode' + matrix_link_text: Matrix layouts: mobile_navigation: calendar: Calendar @@ -596,6 +610,7 @@ en: hide_form_title: Hide new project form is_active: is active last_completed_in_project: "(last %{number})" + letter_abbreviation: P list_completed_projects: TRACKS::List Completed Projects list_projects: TRACKS::List Projects list_reviews: TRACKS::Review @@ -618,6 +633,7 @@ en: status_project_name_changed: Name of project was changed this_project: This project to_new_project_page: Take me to the new project page + view_link: 'View project: %{name}' was_marked_complete: has been marked as completed was_marked_hidden: has been marked as hidden with_default_context: with a default context of '%{context_name}' diff --git a/config/locales/es.yml b/config/locales/es.yml index 4c409c38..91e4102a 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -174,6 +174,7 @@ es: hide_form: Esconder formulario hide_form_title: Ocultar el formulario nuevo contexto last_completed_in_context: en este contexto (últimos %{number}) + letter_abbreviation: C new_context_post: "' También se ha creado. ¿Está seguro?" new_context_pre: Nuevo contexto ' no_contexts_: 'No contexts ' @@ -187,6 +188,7 @@ es: status_hidden: Contexto se oculta todos_append: en este contexto update_status_message: Nombre de contexto ha cambiado + view_link: 'View context: %{name}' visible_contexts: Contextos visible data: import_destination_invalid: Invalid import destination @@ -352,6 +354,18 @@ es: update: Обновить %{model} integrations: opensearch_description: Buscar en las Tracks + help: + title: Help + usage: 'You can find information on the usage in the %{manual_link} in the project GitHub wiki.' + manual_link_text: User manual + bugs: 'If you encounter a bug or have a feature request, please report it in the %{issue_link}.' + issue_link_text: issue queue + contribute: 'We gladly welcome all contributions to Tracks. Check the %{contribute_link} for further information. You can also come discuss with the community:' + contribute_link_text: project website + mailing_list_link_text: Mailing list + irc_bullet: '%{irc_link} (also available in %{matrix_link})' + irc_link_text: 'IRC channel #Tracks@FreeNode' + matrix_link_text: Matrix layouts: mobile_navigation: calendar: Calendar @@ -576,6 +590,7 @@ es: hide_form_title: Hide new project form is_active: está activo last_completed_in_project: "(last %{number})" + letter_abbreviation: P list_completed_projects: 'TRACKS:: Lista de Proyectos Realizados' list_projects: TRACKS::Lista de Proyectos list_reviews: TRACKS::Revisión @@ -598,6 +613,7 @@ es: status_project_name_changed: Name of project was changed this_project: Este proyecto to_new_project_page: Take me to the new project page + view_link: 'View project: %{name}' was_marked_complete: has been marked as completed was_marked_hidden: has been marked as hidden with_default_context: with a default context of '%{context_name}' diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 4a4c9f8e..a7f3e5e0 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -176,6 +176,7 @@ fi: hide_form: Piilota lomake hide_form_title: Piilota asiayhteyden lisäyslomake last_completed_in_context: "(last %{number})" + letter_abbreviation: C new_context_post: "' will be also created. Are you sure?" new_context_pre: New context ' no_contexts_: 'No contexts ' @@ -189,6 +190,7 @@ fi: status_hidden: Context is hidden todos_append: in this context update_status_message: Name of context was changed + view_link: 'View context: %{name}' visible_contexts: Näkyvät asiayhteydet data: import_destination_invalid: Invalid import destination @@ -362,6 +364,18 @@ fi: update: Обновить %{model} integrations: opensearch_description: Search in Tracks + help: + title: Help + usage: 'You can find information on the usage in the %{manual_link} in the project GitHub wiki.' + manual_link_text: User manual + bugs: 'If you encounter a bug or have a feature request, please report it in the %{issue_link}.' + issue_link_text: issue queue + contribute: 'We gladly welcome all contributions to Tracks. Check the %{contribute_link} for further information. You can also come discuss with the community:' + contribute_link_text: project website + mailing_list_link_text: Mailing list + irc_bullet: '%{irc_link} (also available in %{matrix_link})' + irc_link_text: 'IRC channel #Tracks@FreeNode' + matrix_link_text: Matrix layouts: mobile_navigation: calendar: Calendar @@ -593,6 +607,7 @@ fi: hide_form_title: Hide new project form is_active: is active last_completed_in_project: "(last %{number})" + letter_abbreviation: P list_completed_projects: TRACKS::List Completed Projects list_projects: TRACKS::List Projects list_reviews: TRACKS::Review @@ -615,6 +630,7 @@ fi: status_project_name_changed: Name of project was changed this_project: This project to_new_project_page: Take me to the new project page + view_link: 'View project: %{name}' was_marked_complete: has been marked as completed was_marked_hidden: has been marked as hidden with_default_context: with a default context of '%{context_name}' diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 0b27d9d8..85162ff5 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -177,6 +177,7 @@ fr: hide_form: Cacher le formulaire hide_form_title: Cacher le formulaire nouveau contexte last_completed_in_context: dans ce contexte (dernier %{number}) + letter_abbreviation: C new_context_post: "?» sera aussi créé. Êtes-vous sûr ?" new_context_pre: Nouveau contexte ' no_contexts_: 'Aucun contexte ' @@ -190,6 +191,7 @@ fr: status_hidden: Le Contexte est caché todos_append: dans ce contexte update_status_message: Le nom du contexte a été modifié + view_link: 'View context: %{name}' visible_contexts: Contextes visibles data: import_destination_invalid: Destination d'importation non valide @@ -360,6 +362,18 @@ fr: update: Mettre à jour %{model} integrations: opensearch_description: Rechercher dans Tracks + help: + title: Help + usage: 'You can find information on the usage in the %{manual_link} in the project GitHub wiki.' + manual_link_text: User manual + bugs: 'If you encounter a bug or have a feature request, please report it in the %{issue_link}.' + issue_link_text: issue queue + contribute: 'We gladly welcome all contributions to Tracks. Check the %{contribute_link} for further information. You can also come discuss with the community:' + contribute_link_text: project website + mailing_list_link_text: Mailing list + irc_bullet: '%{irc_link} (also available in %{matrix_link})' + irc_link_text: 'IRC channel #Tracks@FreeNode' + matrix_link_text: Matrix layouts: mobile_navigation: calendar: Calendrier @@ -592,6 +606,7 @@ fr: hide_form_title: Cacher le formulaire nouveau projet is_active: est actif last_completed_in_project: "(dernier %{number})" + letter_abbreviation: P list_completed_projects: TRACKS::Liste des projets achevés list_projects: TRACKS::Liste des projets list_reviews: TRACKS::Revue @@ -614,6 +629,7 @@ fr: status_project_name_changed: Le nom du projet a été modifié this_project: Ce projet to_new_project_page: Aller à la page du nouveau projet + view_link: 'View project: %{name}' was_marked_complete: est complété was_marked_hidden: est caché with_default_context: avec '%{context_name}' comme contexte par défaut diff --git a/config/locales/he.yml b/config/locales/he.yml index b54f3378..00894c13 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -174,6 +174,7 @@ he: hide_form: הסתרת טופס hide_form_title: הסתרת טופס הקשר חדש last_completed_in_context: בהקשר זה (אחרונות %{number}) + letter_abbreviation: C new_context_post: "' יווצרו בנוסף. האם להמשיך?" new_context_pre: הקשר חדש ' no_contexts_: 'No contexts ' @@ -187,6 +188,7 @@ he: status_hidden: ההקשר מוסתר todos_append: בהקשר זה update_status_message: שונה שם ההקשר + view_link: 'View context: %{name}' visible_contexts: הקשרים גלויים data: import_destination_invalid: Invalid import destination @@ -312,6 +314,18 @@ he: update: Обновить %{model} integrations: opensearch_description: חיפוש במסלולים + help: + title: Help + usage: 'You can find information on the usage in the %{manual_link} in the project GitHub wiki.' + manual_link_text: User manual + bugs: 'If you encounter a bug or have a feature request, please report it in the %{issue_link}.' + issue_link_text: issue queue + contribute: 'We gladly welcome all contributions to Tracks. Check the %{contribute_link} for further information. You can also come discuss with the community:' + contribute_link_text: project website + mailing_list_link_text: Mailing list + irc_bullet: '%{irc_link} (also available in %{matrix_link})' + irc_link_text: 'IRC channel #Tracks@FreeNode' + matrix_link_text: Matrix layouts: mobile_navigation: calendar: Calendar @@ -534,6 +548,7 @@ he: hide_form_title: הסתרת טופס פרוייקט חדש is_active: פעיל last_completed_in_project: "(last %{number})" + letter_abbreviation: P list_completed_projects: מסלולים::רשימת הפרוייקטים שהולשמו list_projects: מסלולים::רשימת פרוייקטים list_reviews: מסלולים::סקירה @@ -556,6 +571,7 @@ he: status_project_name_changed: שם הפרוייקט שונה this_project: פרוייקט זה to_new_project_page: עבור לעמוד הפרוייקט החדש + view_link: 'View project: %{name}' was_marked_complete: סומן כבוצע was_marked_hidden: סומן כמוסתר with_default_context: עם הקשר בירת מחדל '%{context_name}' diff --git a/config/locales/nl.yml b/config/locales/nl.yml index c92aca00..cbdb6ac2 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -174,6 +174,7 @@ nl: hide_form: Verberg formulier hide_form_title: Verberg formulier voor nieuwe context last_completed_in_context: in deze context (laatste %{number}) + letter_abbreviation: C new_context_post: "' zal ook gemaakt worden. Weet u dit zeker?" new_context_pre: Nieuwe context ' no_contexts_: 'No contexts ' @@ -187,6 +188,7 @@ nl: status_hidden: Context is verborgen todos_append: in deze context update_status_message: Naam van de context was veranderd + view_link: 'View context: %{name}' visible_contexts: Zichtbare contexten data: import_destination_invalid: Verkeerde bestemming voor import @@ -355,6 +357,18 @@ nl: update: Bijwerken %{model} integrations: opensearch_description: Zoek in Tracks + help: + title: Help + usage: 'You can find information on the usage in the %{manual_link} in the project GitHub wiki.' + manual_link_text: User manual + bugs: 'If you encounter a bug or have a feature request, please report it in the %{issue_link}.' + issue_link_text: issue queue + contribute: 'We gladly welcome all contributions to Tracks. Check the %{contribute_link} for further information. You can also come discuss with the community:' + contribute_link_text: project website + mailing_list_link_text: Mailing list + irc_bullet: '%{irc_link} (also available in %{matrix_link})' + irc_link_text: 'IRC channel #Tracks@FreeNode' + matrix_link_text: Matrix layouts: mobile_navigation: calendar: Calendar @@ -579,6 +593,7 @@ nl: hide_form_title: Verberg nieuw project formulier is_active: is actief last_completed_in_project: "(laatste %{number})" + letter_abbreviation: P list_completed_projects: TRACKS::Toon afgeronde projecten list_projects: 'TRACKS:: Overzicht van projecten' list_reviews: TRACKS::Evaluatie @@ -601,6 +616,7 @@ nl: status_project_name_changed: Naam van het project werd gewijzigd this_project: Dit project to_new_project_page: Ga naar de nieuwe projectpagina + view_link: 'View project: %{name}' was_marked_complete: is gemarkeerd als voltooid was_marked_hidden: is gemarkeerd als verborgen with_default_context: met een standaard context '%{context_name}' diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 816c99f4..e2620ce3 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -177,6 +177,7 @@ ru: hide_form: Скрыть форму hide_form_title: Скрыть форму нового контекста last_completed_in_context: "(осталось %{number})" + letter_abbreviation: C new_context_post: "' будет также создан. Вы уверены?" new_context_pre: Новый контекст ' no_contexts_: 'No contexts ' @@ -190,6 +191,7 @@ ru: status_hidden: Контекст скрыт todos_append: в этом контексте update_status_message: Имя контекста было изменено + view_link: 'View context: %{name}' visible_contexts: Видимые контексты data: import_destination_invalid: Неверный путь назначения для импорта @@ -369,6 +371,18 @@ ru: update: Обновить %{model} integrations: opensearch_description: Искать в Tracks + help: + title: Help + usage: 'You can find information on the usage in the %{manual_link} in the project GitHub wiki.' + manual_link_text: User manual + bugs: 'If you encounter a bug or have a feature request, please report it in the %{issue_link}.' + issue_link_text: issue queue + contribute: 'We gladly welcome all contributions to Tracks. Check the %{contribute_link} for further information. You can also come discuss with the community:' + contribute_link_text: project website + mailing_list_link_text: Mailing list + irc_bullet: '%{irc_link} (also available in %{matrix_link})' + irc_link_text: 'IRC channel #Tracks@FreeNode' + matrix_link_text: Matrix layouts: mobile_navigation: calendar: Calendar @@ -593,6 +607,7 @@ ru: hide_form_title: Скрыть форму нового проекта is_active: активен last_completed_in_project: "(последние %{number})" + letter_abbreviation: P list_completed_projects: TRACKS::Список выполненных проектов list_projects: TRACKS::Список проектов list_reviews: TRACKS::Обзор @@ -615,6 +630,7 @@ ru: status_project_name_changed: Имя проекта изменено this_project: Этот проект to_new_project_page: Перейти на страницу нового проекта + view_link: 'View project: %{name}' was_marked_complete: помечен как выполненный was_marked_hidden: помечен как скрытый with_default_context: с контекстом по-умолчанию '%{context_name}'