Fix i18n issues reported on Crowdin (#13191)

Fix i18n issues reported on Crowdin (#13191)

  • Pluralize js.topics.bulk.dismiss_new_with_selected This fixes Crowdin

  • Pluralize js.topics.bulk.dismiss_read_with_selected This fixes Crowdin

  • Pluralize js.topics.bulk.dismiss_button_with_selected

  • Replaces concatenated string used by js.topic.suggest_create_topic This fixes Crowdin

  • Less confusing admin_js.admin.watched_words.test.modal_title This fixes Crowdin

  • Delete unused backup.location.* keys This fixes Crowdin

  • Replace “reviewable” with “reviewable items” This fixes Crowdin

  • Remove “ago” from emails.incoming.missing_attachment This fixes Crowdin

  • Remove “/Posts” from js.keyboard_shortcuts_help.application.dismiss_new_posts Because the shortcut doesn’t do anything to posts anymore. This fixes Crowdin

  • Pluralize user.cannot_delete_has_posts This fixes Crowdin

diff --git a/app/assets/javascripts/discourse/app/controllers/keyboard-shortcuts-help.js b/app/assets/javascripts/discourse/app/controllers/keyboard-shortcuts-help.js
index eaf6510..9d4425e 100644
--- a/app/assets/javascripts/discourse/app/controllers/keyboard-shortcuts-help.js
+++ b/app/assets/javascripts/discourse/app/controllers/keyboard-shortcuts-help.js
@@ -114,7 +114,7 @@ export default Controller.extend(ModalFunctionality, {
           keysDelimiter: PLUS,
         }),
         help: buildShortcut("application.help", { keys1: ["?"] }),
-        dismiss_new_posts: buildShortcut("application.dismiss_new_posts", {
+        dismiss_new: buildShortcut("application.dismiss_new", {
           keys1: ["x", "r"],
         }),
         dismiss_topics: buildShortcut("application.dismiss_topics", {
diff --git a/app/assets/javascripts/discourse/app/templates/discovery/topics.hbs b/app/assets/javascripts/discourse/app/templates/discovery/topics.hbs
index 3e9e8d3..df483cd 100644
--- a/app/assets/javascripts/discourse/app/templates/discovery/topics.hbs
+++ b/app/assets/javascripts/discourse/app/templates/discovery/topics.hbs
@@ -77,8 +77,7 @@ model=model showResetNew=showResetNew showDismissRead=showDismissRead resetNew=(
     {{#footer-message education=footerEducation message=footerMessage}}
       {{#if latest}}
         {{#if canCreateTopicOnCategory}}
-          {{i18n "topics.none.ready_to_create"}}
-          <a href {{action "createTopic"}}>{{i18n "topic.suggest_create_topic"}}</a>
+          {{discourse-linked-text action=(route-action "createTopic") text="topic.suggest_create_topic"}}
         {{/if}}
       {{else if top}}
         {{#link-to "discovery.categories"}}{{i18n "topic.browse_all_categories"}}{{/link-to}}, {{#link-to "discovery.latest"}}{{i18n "topic.view_latest_topics"}}{{/link-to}} {{i18n "or"}} {{i18n "filters.top.other_periods"}}
diff --git a/app/assets/javascripts/discourse/app/templates/mobile/discovery/topics.hbs b/app/assets/javascripts/discourse/app/templates/mobile/discovery/topics.hbs
index a751139..932a7df 100644
--- a/app/assets/javascripts/discourse/app/templates/mobile/discovery/topics.hbs
+++ b/app/assets/javascripts/discourse/app/templates/mobile/discovery/topics.hbs
@@ -38,7 +38,9 @@ model=model showResetNew=showResetNew showDismissRead=showDismissRead resetNew=(
 
     {{#footer-message education=footerEducation message=footerMessage}}
       {{#if latest}}
-        {{#if canCreateTopicOnCategory}}<a href {{action "createTopic"}}>{{i18n "topic.suggest_create_topic"}}</a>{{/if}}
+        {{#if canCreateTopicOnCategory}}
+          {{discourse-linked-text action=(route-action "createTopic") text="topic.suggest_create_topic"}}
+        {{/if}}
       {{else if top}}
         {{#link-to "discovery.categories"}}{{i18n "topic.browse_all_categories"}}{{/link-to}}, {{#link-to "discovery.latest"}}{{i18n "topic.view_latest_topics"}}{{/link-to}} {{i18n "or"}} {{i18n "filters.top.other_periods"}}
         {{top-period-buttons period=period action=(action "changePeriod")}}
diff --git a/app/assets/javascripts/discourse/app/templates/modal/keyboard-shortcuts-help.hbs b/app/assets/javascripts/discourse/app/templates/modal/keyboard-shortcuts-help.hbs
index 9d3b182..60edf99 100644
--- a/app/assets/javascripts/discourse/app/templates/modal/keyboard-shortcuts-help.hbs
+++ b/app/assets/javascripts/discourse/app/templates/modal/keyboard-shortcuts-help.hbs
@@ -40,7 +40,7 @@
         <li>{{html-safe shortcuts.application.show_incoming_updated_topics}}</li>
         <li>{{html-safe shortcuts.application.search}}</li>
         <li>{{html-safe shortcuts.application.help}}</li>
-        <li>{{html-safe shortcuts.application.dismiss_new_posts}}</li>
+        <li>{{html-safe shortcuts.application.dismiss_new}}</li>
         <li>{{html-safe shortcuts.application.dismiss_topics}}</li>
         <li>{{html-safe shortcuts.application.log_out}}</li>
       </ul>
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index 15c70a1..e25d4d9 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -420,7 +420,7 @@ class Admin::UsersController < Admin::AdminController
       rescue UserDestroyer::PostsExistError
         render json: {
           deleted: false,
-          message: I18n.t("user.cannot_delete_has_posts", username: user.username, post_count: user.posts.joins(:topic).count),
+          message: I18n.t("user.cannot_delete_has_posts", username: user.username, count: user.posts.joins(:topic).count),
         }, status: 403
       end
     end
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 8b3f560..a895310 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -2364,13 +2364,19 @@ en:
         delete: "Delete Topics"
         dismiss: "Dismiss"
         dismiss_read: "Dismiss all unread"
-        dismiss_read_with_selected: "Dismiss %{count} unread"
+        dismiss_read_with_selected:
+          one: "Dismiss %{count} unread"
+          other: "Dismiss %{count} unread"
         dismiss_button: "Dismiss…"
-        dismiss_button_with_selected: "Dismiss (%{count})…"
+        dismiss_button_with_selected:
+          one: "Dismiss (%{count})…"
+          other: "Dismiss (%{count})…"
         dismiss_tooltip: "Dismiss just new posts or stop tracking topics"
         also_dismiss_topics: "Stop tracking these topics so they never show up as unread for me again"
         dismiss_new: "Dismiss New"
-        dismiss_new_with_selected: "Dismiss New (%{count})"
+        dismiss_new_with_selected:
+          one: "Dismiss New (%{count})"
+          other: "Dismiss New (%{count})"
         toggle: "toggle bulk selection of topics"
         actions: "Bulk Actions"
         change_category: "Set Category"
@@ -2401,7 +2407,6 @@ en:
         new: "You have no new topics."
         read: "You haven't read any topics yet."
         posted: "You haven't posted in any topics yet."
-        ready_to_create: "Ready to "
         latest: "You're all caught up!"
         bookmarks: "You have no bookmarked topics yet."
         category: "There are no %{category} topics."
@@ -2511,7 +2516,7 @@ en:
       browse_all_tags: Browse all tags
 
       view_latest_topics: view latest topics
-      suggest_create_topic: start a new conversation?
+      suggest_create_topic: Ready to <a href>start a new conversation?</a>
       jump_reply_up: jump to earlier reply
       jump_reply_down: jump to later reply
       deleted: "The topic has been deleted"
@@ -3550,7 +3555,7 @@ en:
         show_incoming_updated_topics: "%{shortcut} Show updated topics"
         search: "%{shortcut} Search"
         help: "%{shortcut} Open keyboard help"
-        dismiss_new_posts: "%{shortcut} Dismiss New/Posts"
+        dismiss_new: "%{shortcut} Dismiss New"
         dismiss_topics: "%{shortcut} Dismiss Topics"
         log_out: "%{shortcut} Log Out"
       composing:
@@ -4790,7 +4795,7 @@ en:
           upload_successful: "Upload successful. Words have been added."
         test:
           button_label: "Test"
-          modal_title: "Test %{action} Watched Words"
+          modal_title: "%{action}: Test Watched Words"
           description: "Enter text below to check for matches with watched words"
           found_matches: "Found matches:"
           no_matches: "No matches found"
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index 4213fa9..f04a801 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -111,7 +111,7 @@ en:
       maximum_staged_user_per_email_reached: "Reached maximum number of staged users created per email."
       no_subject: "(no subject)"
       no_body: "(no body)"
-      missing_attachment: "(Attachment %{filename} is missing) ago."
+      missing_attachment: "(Attachment %{filename} is missing)"
       continuing_old_discussion:

[... diff too long, it was truncated ...]

GitHub sha: fa470cf6fe45f50a7d41e672a02d11983c40800b

1 Like

This commit appears in #13191 which was approved by martin. It was merged by gschlager.