From b068d193d0a1e65824557cf1b2094fb5773a8185 Mon Sep 17 00:00:00 2001 From: 0ko <0ko@noreply.codeberg.org> Date: Fri, 29 Mar 2024 23:17:00 +0500 Subject: [PATCH] [I18N] Improve translatability of archived labels Allow any position and writing style of `(Archived)`. (cherry picked from commit cab47bbb0e0b656117df339c32ef2cae90b90dc5) --- modules/templates/util_render.go | 2 +- options/locale/locale_en-US.ini | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/templates/util_render.go b/modules/templates/util_render.go index d1c9b082fa..c167b32123 100644 --- a/modules/templates/util_render.go +++ b/modules/templates/util_render.go @@ -137,7 +137,7 @@ func RenderLabel(ctx context.Context, locale translation.Locale, label *issues_m if label.IsArchived() { archivedCSSClass = "archived-label" - description = fmt.Sprintf("(%s) %s", locale.TrString("archived"), description) + description = locale.TrString("repo.issues.archived_label_description", description) } if labelScope == "" { diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index e595f40269..3a871b2eb8 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1628,6 +1628,7 @@ issues.label_modify = Edit label issues.label_deletion = Delete label issues.label_deletion_desc = Deleting a label removes it from all issues. Continue? issues.label_deletion_success = The label has been deleted. +issues.archived_label_description = (Archived) %s issues.label.filter_sort.alphabetically = Alphabetically issues.label.filter_sort.reverse_alphabetically = Reverse alphabetically issues.label.filter_sort.by_size = Smallest size