FIX: Various translation string fixes (#13715)
Make small action post description a correct sentence. Replace true and false in site settings description with enabled and disabled.
This commit is contained in:
parent
8a0349a01f
commit
21cf1b78da
|
@ -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";
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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."
|
||||
|
|
Loading…
Reference in New Issue