A platform for community discussion. Free, open, simple.
FIX: Various translation string fixes (#13715)
Bianca Nenciu21cf1b78daf5
diff --git a/app/assets/javascripts/discourse/app/lib/formatter.js b/app/assets/javascripts/discourse/app/lib/formatter.jsindex 850da256253..22b1b7f5e5b 100644--- a/app/assets/javascripts/discourse/app/lib/formatter.js+++ b/app/assets/javascripts/discourse/app/lib/formatter.js@@ -108,6 +108,10 @@ function wrapAgo(dateStr) {return I18n.t("dates.wrap_ago", { date: dateStr });}+function wrapOn(dateStr) {+ return I18n.t("dates.wrap_on", { date: dateStr });+}+export function durationTiny(distance, ageOpts) {if (typeof distance !== "number") {return "—";@@ -288,6 +292,9 @@ function relativeAgeMedium(date, options) {displayDate = I18n.t("now");} else if (distance > fiveDaysAgo) {displayDate = smartShortDate(date, shortDate);+ if (options.wrapOn) {+ displayDate = wrapOn(displayDate);+ }} else {displayDate = relativeAgeMediumSpan(distance, leaveAgo);}@@ -318,6 +325,11 @@ export function relativeAge(date, options) {date,Object.assign(options, { format: "medium", leaveAgo: true }));+ } else if (format === "medium-with-ago-and-on") {+ return relativeAgeMedium(+ date,+ Object.assign(options, { format: "medium", leaveAgo: true, wrapOn: true })+ );}return "UNKNOWN FORMAT";diff --git a/app/assets/javascripts/discourse/app/widgets/post-small-action.js b/app/assets/javascripts/discourse/app/widgets/post-small-action.jsindex be5066e3d8b..76075500193 100644--- a/app/assets/javascripts/discourse/app/widgets/post-small-action.js+++ b/app/assets/javascripts/discourse/app/widgets/post-small-action.js@@ -10,7 +10,9 @@ import { userPath } from "discourse/lib/url";export function actionDescriptionHtml(actionCode, createdAt, username) {const dt = new Date(createdAt);- const when = autoUpdatingRelativeAge(dt, { format: "medium-with-ago" });+ const when = autoUpdatingRelativeAge(dt, {+ format: "medium-with-ago-and-on",+ });let who = "";if (username) {diff --git a/config/locales/client.en.yml b/config/locales/client.en.ymlindex 1b5c96f7fab..ff09213a1ce 100644--- a/config/locales/client.en.yml+++ b/config/locales/client.en.yml@@ -53,6 +53,7 @@ en:long_date_with_year_with_linebreak: "MMM D, 'YY <br/>LT"wrap_ago: "%{date} ago"+ wrap_on: "on %{date}"tiny:half_a_minute: "< 1m"diff --git a/config/locales/server.en.yml b/config/locales/server.en.ymlindex df4db6add7e..e8a0a751ce1 100644--- a/config/locales/server.en.yml+++ b/config/locales/server.en.yml@@ -1492,7 +1492,7 @@ en:category_search_priority_high_weight: "Weight applied to ranking for high category search priority."allow_uncategorized_topics: "Allow topics to be created without a category. WARNING: If there are any uncategorized topics, you must recategorize them before turning this off."allow_duplicate_topic_titles: "Allow topics with identical, duplicate titles."- allow_duplicate_topic_titles_category: "Allow topics with identical, duplicate titles if the category is different. allow_duplicate_topic_titles must be false."+ allow_duplicate_topic_titles_category: "Allow topics with identical, duplicate titles if the category is different. allow_duplicate_topic_titles must be disabled."unique_posts_mins: "How many minutes before a user can make a post with the same content again"educate_until_posts: "When the user starts typing their first (n) new posts, show the pop-up new user education panel in the composer."title: "The name of this site, as used in the title tag."@@ -1735,7 +1735,7 @@ en:discord_trusted_guilds: 'Only allow members of these Discord guilds to log in via Discord. Use the numeric ID for the guild. For more information, check the instructions <a href="https://meta.discourse.org/t/configuring-discord-login-for-discourse/127129">here</a>. Leave blank to allow any guild.'enable_backups: "Allow administrators to create backups of the forum"- allow_restore: "Allow restore, which can replace ALL site data! Leave false unless you plan to restore a backup"+ allow_restore: "Allow restore, which can replace ALL site data! Leave disabled unless you plan to restore a backup"maximum_backups: "The maximum amount of backups to keep on disk. Older backups are automatically deleted"automatic_backups_enabled: "Run automatic backups as defined in backup frequency"backup_frequency: "The number of days between backups."