Fix i18n issues reported on Crowdin (#10925)

Fix i18n issues reported on Crowdin (#10925)

diff --git a/app/assets/javascripts/discourse/app/components/composer-editor.js b/app/assets/javascripts/discourse/app/components/composer-editor.js
index b58eeed..c25dab1 100644
--- a/app/assets/javascripts/discourse/app/components/composer-editor.js
+++ b/app/assets/javascripts/discourse/app/components/composer-editor.js
@@ -651,7 +651,9 @@ export default Component.extend({
       // Limit the number of simultaneous uploads
       if (max > 0 && data.files.length > max) {
         bootbox.alert(
-          I18n.t("post.errors.too_many_dragged_and_dropped_files", { max })
+          I18n.t("post.errors.too_many_dragged_and_dropped_files", {
+            count: max,
+          })
         );
         return false;
       }
diff --git a/app/assets/javascripts/discourse/app/components/global-notice.js b/app/assets/javascripts/discourse/app/components/global-notice.js
index 9eb7abd..00fdb98 100644
--- a/app/assets/javascripts/discourse/app/components/global-notice.js
+++ b/app/assets/javascripts/discourse/app/components/global-notice.js
@@ -120,7 +120,7 @@ export default Component.extend({
           notices.push(
             Notice.create({
               text: I18n.t("bootstrap_mode_enabled", {
-                min_users: this.siteSettings.bootstrap_mode_min_users,
+                count: this.siteSettings.bootstrap_mode_min_users,
               }),
               id: "alert-bootstrap-mode",
             })
diff --git a/app/assets/javascripts/discourse/app/controllers/composer.js b/app/assets/javascripts/discourse/app/controllers/composer.js
index 5e6ecde..20df538 100644
--- a/app/assets/javascripts/discourse/app/controllers/composer.js
+++ b/app/assets/javascripts/discourse/app/controllers/composer.js
@@ -584,7 +584,7 @@ export default Controller.extend({
           if (group.max_mentions < group.user_count) {
             body = I18n.t("composer.group_mentioned_limit", {
               group: `@${group.name}`,
-              max: group.max_mentions,
+              count: group.max_mentions,
               group_link: groupLink,
             });
           } else if (group.user_count > 0) {
diff --git a/app/assets/javascripts/discourse/app/controllers/feature-topic.js b/app/assets/javascripts/discourse/app/controllers/feature-topic.js
index 8bf3bb9..4b5325e 100644
--- a/app/assets/javascripts/discourse/app/controllers/feature-topic.js
+++ b/app/assets/javascripts/discourse/app/controllers/feature-topic.js
@@ -133,17 +133,20 @@ export default Controller.extend(ModalFunctionality, {
     this.send("closeModal");
   },
 
-  _confirmBeforePinning(count, name, action) {
+  _confirmBeforePinningGlobally() {
+    const count = this.pinnedGloballyCount;
     if (count < 4) {
-      this._forwardAction(action);
+      this._forwardAction("pinGlobally");
     } else {
       this.send("hideModal");
       bootbox.confirm(
-        I18n.t("topic.feature_topic.confirm_" + name, { count }),
+        I18n.t("topic.feature_topic.confirm_pin_globally", { count }),
         I18n.t("no_value"),
         I18n.t("yes_value"),
         (confirmed) =>
-          confirmed ? this._forwardAction(action) : this.send("reopenModal")
+          confirmed
+            ? this._forwardAction("pinGlobally")
+            : this.send("reopenModal")
       );
     }
   },
@@ -161,11 +164,7 @@ export default Controller.extend(ModalFunctionality, {
       if (this.pinGloballyDisabled) {
         this.set("pinGloballyTipShownAt", Date.now());
       } else {
-        this._confirmBeforePinning(
-          this.pinnedGloballyCount,
-          "pin_globally",
-          "pinGlobally"
-        );
+        this._confirmBeforePinningGlobally();
       }
     },
 
diff --git a/app/assets/javascripts/discourse/app/mixins/upload.js b/app/assets/javascripts/discourse/app/mixins/upload.js
index 9bf7597..1298f49 100644
--- a/app/assets/javascripts/discourse/app/mixins/upload.js
+++ b/app/assets/javascripts/discourse/app/mixins/upload.js
@@ -73,7 +73,7 @@ export default Mixin.create({
       if (maxFiles > 0 && data.files.length > maxFiles) {
         bootbox.alert(
           I18n.t("post.errors.too_many_dragged_and_dropped_files", {
-            max: maxFiles,
+            count: maxFiles,
           })
         );
         return false;
diff --git a/app/assets/javascripts/discourse/app/templates/preferences/account.hbs b/app/assets/javascripts/discourse/app/templates/preferences/account.hbs
index ed38031..182a11d 100644
--- a/app/assets/javascripts/discourse/app/templates/preferences/account.hbs
+++ b/app/assets/javascripts/discourse/app/templates/preferences/account.hbs
@@ -221,14 +221,13 @@
                                   showToken=(action "showToken")}}
           {{/unless}}
           <div class="auth-token-first">
-            <span class="auth-token-device">{{token.device}}</span> &ndash; <span title="{{i18n "user.auth_tokens.ip"}}: {{token.client_ip}}">{{token.location}}</span>
+            {{html-safe (i18n "user.auth_tokens.device_location" device=token.device ip=token.client_ip location=token.location)}}
           </div>
           <div class="auth-token-second">
-            {{token.browser}} |
             {{#if token.is_active}}
-              <span class="active">{{i18n "user.auth_tokens.active"}}</span>
+              {{html-safe (i18n "user.auth_tokens.browser_active" browser=token.browser)}}
             {{else}}
-              {{format-date token.seen_at}}
+              {{html-safe (i18n "user.auth_tokens.browser_last_seen" browser=token.browser date=(format-date token.seen_at))}}
             {{/if}}
           </div>
         </div>
diff --git a/app/assets/javascripts/discourse/tests/fixtures/site-fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/site-fixtures.js
index 2cd86c8..c4ea4fd 100644
--- a/app/assets/javascripts/discourse/tests/fixtures/site-fixtures.js
+++ b/app/assets/javascripts/discourse/tests/fixtures/site-fixtures.js
@@ -420,7 +420,6 @@ export default {
           name: "Bookmark",
           description: "Bookmark this post",
           short_description: "Bookmark this post",
-          long_form: "bookmarked this post",
           is_flag: false,
           icon: null,
           id: 1,
@@ -431,7 +430,6 @@ export default {
           name: "Like",
           description: "Like this post",
           short_description: "Like this post",
-          long_form: "liked this",
           is_flag: false,
           icon: "heart",
           id: 2,
@@ -443,7 +441,6 @@ export default {
           description:
             "This post is radically off-topic in the current topic, and should probably be moved. If this is a topic, perhaps it does not belong here.",
           short_description: "Not relevant to the discussion",
-          long_form: "flagged this as off-topic",
           is_flag: true,
           icon: null,
           id: 3,
@@ -456,7 +453,6 @@ export default {
             'This post contains content that a reasonable person would consider offensive, abusive, or a violation of <a href="/guidelines">our community guidelines</a>.',
           short_description:
             'A violation of <a href="/guidelines">our community guidelines</a>',
-          long_form: "flagged this as inappropriate",
           is_flag: true,
           icon: null,
           id: 4,
@@ -467,7 +463,6 @@ export default {
           name: "Vote",
           description: "Vote for this post",
           short_description: "Vote for this post",
-          long_form: "voted for this post",
           is_flag: false,
           icon: null,
           id: 5,
@@ -479,7 +474,6 @@ export default {
           description:
             "This post is an advertisement. It is not useful or relevant to the current topic, but promotional in nature.",
           short_description: "This is an advertisement",
-          long_form: "flagged this as spam",
           is_flag: true,
           icon: null,
           id: 8,
@@ -492,7 +486,6 @@ export default {

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

GitHub sha: 7adf71a2

1 Like

This commit appears in #10925 which was approved by eviltrout. It was merged by gschlager.