From 39b8d02400de963c9a967bc510c5b0295656c9b8 Mon Sep 17 00:00:00 2001 From: Lucas Azevedo Date: Sat, 16 Jul 2022 00:16:22 -0300 Subject: [PATCH 1/3] Fix modified due date message --- templates/repo/issue/view_content/comments.tmpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 319ee33fae1f4..852c87f2f3f66 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -340,7 +340,8 @@ {{.Poster.GetDisplayName}} - {{$.locale.Tr "repo.issues.due_date_modified" (.Content | ParseDeadline) $createdStr | Safe}} + {{$parsedDeadline := .Content | ParseDeadline}} + {{$.locale.Tr "repo.issues.due_date_modified" (index $parsedDeadline 0) (index $parsedDeadline 1) $createdStr | Safe}} {{else if eq .Type 18}} From 8d4f7da4e0b3f38f1cc07fc233e233f7b3188a04 Mon Sep 17 00:00:00 2001 From: Lucas Azevedo Date: Sun, 17 Jul 2022 20:42:18 -0300 Subject: [PATCH 2/3] Make due_date_modified sound more natural Swap to/from in due_date_modified issue comment as it sounds more natural. Co-authored-by: delvh --- options/locale/locale_en-US.ini | 2 +- templates/repo/issue/view_content/comments.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 167d2cc1f20c6..7c01eb16ad234 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1420,7 +1420,7 @@ issues.due_date_form_remove = "Remove" issues.due_date_not_writer = "You need repository write access to update an issue's due date." issues.due_date_not_set = "No due date set." issues.due_date_added = "added the due date %s %s" -issues.due_date_modified = "modified the due date to %s from %s %s" +issues.due_date_modified = "modified the due date from %s to %s %s" issues.due_date_remove = "removed the due date %s %s" issues.due_date_overdue = "Overdue" issues.due_date_invalid = "The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'." diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 852c87f2f3f66..9f2e3d256a593 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -341,7 +341,7 @@ {{.Poster.GetDisplayName}} {{$parsedDeadline := .Content | ParseDeadline}} - {{$.locale.Tr "repo.issues.due_date_modified" (index $parsedDeadline 0) (index $parsedDeadline 1) $createdStr | Safe}} + {{$.locale.Tr "repo.issues.due_date_modified" (index $parsedDeadline 1) (index $parsedDeadline 0) $createdStr | Safe}} {{else if eq .Type 18}} From 804af08157db545b84c48fbc914dab1a27986d9e Mon Sep 17 00:00:00 2001 From: Lucas Azevedo Date: Mon, 18 Jul 2022 22:45:24 -0300 Subject: [PATCH 3/3] Use indexed formatting verbs in due_date_modified --- options/locale/locale_en-US.ini | 2 +- templates/repo/issue/view_content/comments.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 7c01eb16ad234..566a7bd167671 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1420,7 +1420,7 @@ issues.due_date_form_remove = "Remove" issues.due_date_not_writer = "You need repository write access to update an issue's due date." issues.due_date_not_set = "No due date set." issues.due_date_added = "added the due date %s %s" -issues.due_date_modified = "modified the due date from %s to %s %s" +issues.due_date_modified = "modified the due date from %[2]s to %[1]s %[3]s" issues.due_date_remove = "removed the due date %s %s" issues.due_date_overdue = "Overdue" issues.due_date_invalid = "The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'." diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 9f2e3d256a593..852c87f2f3f66 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -341,7 +341,7 @@ {{.Poster.GetDisplayName}} {{$parsedDeadline := .Content | ParseDeadline}} - {{$.locale.Tr "repo.issues.due_date_modified" (index $parsedDeadline 1) (index $parsedDeadline 0) $createdStr | Safe}} + {{$.locale.Tr "repo.issues.due_date_modified" (index $parsedDeadline 0) (index $parsedDeadline 1) $createdStr | Safe}} {{else if eq .Type 18}}