From 455d77f6d902280cad212b76751eb6a391a7d6e3 Mon Sep 17 00:00:00 2001 From: whereareiam Date: Sun, 15 Nov 2026 17:11:40 +0100 Subject: [PATCH] fix(lists): match GitHub's list meta lines and commit history rows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pull request and issue lists put the author's avatar and name before the event, as in "#8 · user opened yesterday", and count passed checks after it ("✓ 2/2"). Commit history names each day "Commits on Nov 14, 2026", words each row "committed" or "authored", counts its checks, shortens the hash to seven characters and browses with the code icon. The commit page shares the wording and the count. Six new phrases in all 31 languages; without the add-on Forgejo's wording stays. Co-Authored-By: Claude Opus 5.5 --- .../commit-groups/commit-groups.tmpl | 2 +- locales/bg.json | 8 ++++- locales/cs-CZ.json | 8 ++++- locales/da.json | 8 ++++- locales/de-DE.json | 8 ++++- locales/el-GR.json | 8 ++++- locales/en-US.json | 8 ++++- locales/eo.json | 8 ++++- locales/es-ES.json | 8 ++++- locales/fa-IR.json | 8 ++++- locales/fi-FI.json | 8 ++++- locales/fil.json | 8 ++++- locales/fr-FR.json | 8 ++++- locales/hu-HU.json | 8 ++++- locales/id-ID.json | 8 ++++- locales/it-IT.json | 8 ++++- locales/ja-JP.json | 8 ++++- locales/ko-KR.json | 8 ++++- locales/lv-LV.json | 8 ++++- locales/nds.json | 8 ++++- locales/nl-NL.json | 8 ++++- locales/pl-PL.json | 8 ++++- locales/pt-BR.json | 8 ++++- locales/pt-PT.json | 8 ++++- locales/ru-RU.json | 8 ++++- locales/sl.json | 8 ++++- locales/sv-SE.json | 8 ++++- locales/tr-TR.json | 8 ++++- locales/uk-UA.json | 8 ++++- locales/zh-CN.json | 8 ++++- locales/zh-HK.json | 8 ++++- locales/zh-TW.json | 8 ++++- styles/components/issues/issue_list.ts | 28 ++++++++++++++++- styles/templates/repo/commits_list.ts | 31 ++++++++++++++++++- templates/repo/commit_list_item.tmpl | 18 ++++++----- templates/repo/commit_page.tmpl | 8 +++-- templates/repo/commit_statuses.tmpl | 11 +++++-- templates/shared/issuelist.tmpl | 24 +++++++++----- 38 files changed, 316 insertions(+), 54 deletions(-) diff --git a/components/repository/commit-groups/commit-groups.tmpl b/components/repository/commit-groups/commit-groups.tmpl index 94f50985..49dc75dc 100644 --- a/components/repository/commit-groups/commit-groups.tmpl +++ b/components/repository/commit-groups/commit-groups.tmpl @@ -8,7 +8,7 @@ commit rows. Called with the page context. */}} {{if ne $previousDate ""}}{{end}} {{$previousDate = $date}}
-

{{svg "octicon-git-commit" 16}}{{DateUtils.AbsoluteLong $time}}

+

{{svg "octicon-git-commit" 16}}{{template "theme/phrase" dict "Key" "commits.on_date" "Date" (DateUtils.AbsoluteShort $time) "Fallback" (DateUtils.AbsoluteLong $time)}}

    {{end}} {{template "repo/commit_list_item" dict "Commit" . "Page" $}} diff --git a/locales/bg.json b/locales/bg.json index 2d64ea3c..462ec5e2 100644 --- a/locales/bg.json +++ b/locales/bg.json @@ -139,5 +139,11 @@ "home.feed.load_older": "Зареждане на по-стара активност", "issues.filter.all_states": "Всички състояния", "projects.create_issue_in": "Създаване на задача в хранилище", - "projects.open_in_new_tab": "Отваряне в нов раздел" + "projects.open_in_new_tab": "Отваряне в нов раздел", + "issues.list.opened": "{author} отвори {time}", + "issues.list.closed": "от {author}, затворено {time}", + "issues.list.merged": "от {author}, слято {time}", + "commits.committed": "подаде {time}", + "commits.authored": "създаде {time}", + "commits.on_date": "Подавания от {date}" } diff --git a/locales/cs-CZ.json b/locales/cs-CZ.json index 0a553d44..62b3d38d 100644 --- a/locales/cs-CZ.json +++ b/locales/cs-CZ.json @@ -149,5 +149,11 @@ "home.feed.load_older": "Načíst starší aktivitu", "issues.filter.all_states": "Všechny stavy", "projects.create_issue_in": "Vytvořit úkol v repozitáři", - "projects.open_in_new_tab": "Otevřít na nové kartě" + "projects.open_in_new_tab": "Otevřít na nové kartě", + "issues.list.opened": "{author} otevřel(a) {time}", + "issues.list.closed": "od {author}, uzavřeno {time}", + "issues.list.merged": "od {author}, sloučeno {time}", + "commits.committed": "odeslal(a) {time}", + "commits.authored": "vytvořil(a) {time}", + "commits.on_date": "Revize z {date}" } diff --git a/locales/da.json b/locales/da.json index c881ff8f..e977bd28 100644 --- a/locales/da.json +++ b/locales/da.json @@ -139,5 +139,11 @@ "home.feed.load_older": "Indlæs ældre aktivitet", "issues.filter.all_states": "Alle tilstande", "projects.create_issue_in": "Opret problem i depot", - "projects.open_in_new_tab": "Åbn i ny fane" + "projects.open_in_new_tab": "Åbn i ny fane", + "issues.list.opened": "{author} oprettede {time}", + "issues.list.closed": "af {author} blev lukket {time}", + "issues.list.merged": "af {author} blev flettet {time}", + "commits.committed": "committede {time}", + "commits.authored": "forfattede {time}", + "commits.on_date": "Commits den {date}" } diff --git a/locales/de-DE.json b/locales/de-DE.json index 970b18f7..6b98a2bd 100644 --- a/locales/de-DE.json +++ b/locales/de-DE.json @@ -139,5 +139,11 @@ "home.feed.load_older": "Ältere Aktivitäten laden", "issues.filter.all_states": "Alle Status", "projects.create_issue_in": "Issue in Repository erstellen", - "projects.open_in_new_tab": "In neuem Tab öffnen" + "projects.open_in_new_tab": "In neuem Tab öffnen", + "issues.list.opened": "{author} hat {time} eröffnet", + "issues.list.closed": "von {author} wurde {time} geschlossen", + "issues.list.merged": "von {author} wurde {time} zusammengeführt", + "commits.committed": "hat {time} committet", + "commits.authored": "hat {time} verfasst", + "commits.on_date": "Commits am {date}" } diff --git a/locales/el-GR.json b/locales/el-GR.json index 7c5079a9..ba09df8c 100644 --- a/locales/el-GR.json +++ b/locales/el-GR.json @@ -139,5 +139,11 @@ "home.feed.load_older": "Φόρτωση παλαιότερης δραστηριότητας", "issues.filter.all_states": "Όλες οι καταστάσεις", "projects.create_issue_in": "Δημιουργία ζητήματος σε αποθετήριο", - "projects.open_in_new_tab": "Άνοιγμα σε νέα καρτέλα" + "projects.open_in_new_tab": "Άνοιγμα σε νέα καρτέλα", + "issues.list.opened": "{author} άνοιξε {time}", + "issues.list.closed": "από {author} έκλεισε {time}", + "issues.list.merged": "από {author} συγχωνεύτηκε {time}", + "commits.committed": "υπέβαλε {time}", + "commits.authored": "συνέταξε {time}", + "commits.on_date": "Υποβολές στις {date}" } diff --git a/locales/en-US.json b/locales/en-US.json index da01b488..bc5df114 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -139,5 +139,11 @@ "home.feed.load_older": "Load older activity", "issues.filter.all_states": "All states", "projects.create_issue_in": "Create issue in repository", - "projects.open_in_new_tab": "Open in new tab" + "projects.open_in_new_tab": "Open in new tab", + "issues.list.opened": "{author} opened {time}", + "issues.list.closed": "by {author} was closed {time}", + "issues.list.merged": "by {author} was merged {time}", + "commits.committed": "committed {time}", + "commits.authored": "authored {time}", + "commits.on_date": "Commits on {date}" } diff --git a/locales/eo.json b/locales/eo.json index 692bdebc..c6d8e757 100644 --- a/locales/eo.json +++ b/locales/eo.json @@ -139,5 +139,11 @@ "home.feed.load_older": "Ŝargi pli malnovan aktivecon", "issues.filter.all_states": "Ĉiuj statoj", "projects.create_issue_in": "Krei eraron en deponejo", - "projects.open_in_new_tab": "Malfermi en nova langeto" + "projects.open_in_new_tab": "Malfermi en nova langeto", + "issues.list.opened": "{author} malfermis {time}", + "issues.list.closed": "de {author} estis fermita {time}", + "issues.list.merged": "de {author} estis kunfandita {time}", + "commits.committed": "enmetis {time}", + "commits.authored": "aŭtoris {time}", + "commits.on_date": "Enmetoj je {date}" } diff --git a/locales/es-ES.json b/locales/es-ES.json index 53f7366a..2acbc8fe 100644 --- a/locales/es-ES.json +++ b/locales/es-ES.json @@ -139,5 +139,11 @@ "home.feed.load_older": "Cargar actividad anterior", "issues.filter.all_states": "Todos los estados", "projects.create_issue_in": "Crear incidencia en el repositorio", - "projects.open_in_new_tab": "Abrir en una pestaña nueva" + "projects.open_in_new_tab": "Abrir en una pestaña nueva", + "issues.list.opened": "{author} abrió {time}", + "issues.list.closed": "de {author} se cerró {time}", + "issues.list.merged": "de {author} se fusionó {time}", + "commits.committed": "hizo commit {time}", + "commits.authored": "creó {time}", + "commits.on_date": "Commits del {date}" } diff --git a/locales/fa-IR.json b/locales/fa-IR.json index 48a45489..b3b7b54a 100644 --- a/locales/fa-IR.json +++ b/locales/fa-IR.json @@ -139,5 +139,11 @@ "home.feed.load_older": "بارگذاری فعالیت‌های قدیمی‌تر", "issues.filter.all_states": "همه وضعیت‌ها", "projects.create_issue_in": "ایجاد مسئله در مخزن", - "projects.open_in_new_tab": "باز کردن در زبانه جدید" + "projects.open_in_new_tab": "باز کردن در زبانه جدید", + "issues.list.opened": "{author} {time} باز کرد", + "issues.list.closed": "توسط {author} {time} بسته شد", + "issues.list.merged": "توسط {author} {time} ادغام شد", + "commits.committed": "{time} کامیت کرد", + "commits.authored": "{time} نوشت", + "commits.on_date": "کامیت‌های {date}" } diff --git a/locales/fi-FI.json b/locales/fi-FI.json index 88fe3389..3c52a7a2 100644 --- a/locales/fi-FI.json +++ b/locales/fi-FI.json @@ -139,5 +139,11 @@ "home.feed.load_older": "Lataa vanhempaa toimintaa", "issues.filter.all_states": "Kaikki tilat", "projects.create_issue_in": "Luo tiketti repoon", - "projects.open_in_new_tab": "Avaa uudessa välilehdessä" + "projects.open_in_new_tab": "Avaa uudessa välilehdessä", + "issues.list.opened": "{author} avasi {time}", + "issues.list.closed": "käyttäjältä {author} suljettiin {time}", + "issues.list.merged": "käyttäjältä {author} yhdistettiin {time}", + "commits.committed": "kommitoi {time}", + "commits.authored": "kirjoitti {time}", + "commits.on_date": "Kommitit {date}" } diff --git a/locales/fil.json b/locales/fil.json index ec540cea..87f1963c 100644 --- a/locales/fil.json +++ b/locales/fil.json @@ -139,5 +139,11 @@ "home.feed.load_older": "I-load ang mas lumang aktibidad", "issues.filter.all_states": "Lahat ng estado", "projects.create_issue_in": "Gumawa ng isyu sa repository", - "projects.open_in_new_tab": "Buksan sa bagong tab" + "projects.open_in_new_tab": "Buksan sa bagong tab", + "issues.list.opened": "Binuksan ni {author} {time}", + "issues.list.closed": "ni {author} ay isinara {time}", + "issues.list.merged": "ni {author} ay isinali {time}", + "commits.committed": "nag-commit {time}", + "commits.authored": "isinulat {time}", + "commits.on_date": "Mga commit noong {date}" } diff --git a/locales/fr-FR.json b/locales/fr-FR.json index 11988cb1..12b0897a 100644 --- a/locales/fr-FR.json +++ b/locales/fr-FR.json @@ -139,5 +139,11 @@ "home.feed.load_older": "Charger l’activité plus ancienne", "issues.filter.all_states": "Tous les états", "projects.create_issue_in": "Créer un ticket dans le dépôt", - "projects.open_in_new_tab": "Ouvrir dans un nouvel onglet" + "projects.open_in_new_tab": "Ouvrir dans un nouvel onglet", + "issues.list.opened": "{author} a ouvert {time}", + "issues.list.closed": "par {author} a été fermée {time}", + "issues.list.merged": "par {author} a été fusionnée {time}", + "commits.committed": "a validé {time}", + "commits.authored": "a rédigé {time}", + "commits.on_date": "Révisions du {date}" } diff --git a/locales/hu-HU.json b/locales/hu-HU.json index c6c59869..c8e875b5 100644 --- a/locales/hu-HU.json +++ b/locales/hu-HU.json @@ -139,5 +139,11 @@ "home.feed.load_older": "Régebbi tevékenység betöltése", "issues.filter.all_states": "Minden állapot", "projects.create_issue_in": "Hibajegy létrehozása a tárolóban", - "projects.open_in_new_tab": "Megnyitás új lapon" + "projects.open_in_new_tab": "Megnyitás új lapon", + "issues.list.opened": "{author} megnyitotta {time}", + "issues.list.closed": "{author} által, lezárva {time}", + "issues.list.merged": "{author} által, egyesítve {time}", + "commits.committed": "commitolta {time}", + "commits.authored": "írta {time}", + "commits.on_date": "Commitok: {date}" } diff --git a/locales/id-ID.json b/locales/id-ID.json index 26307566..0eafb3ff 100644 --- a/locales/id-ID.json +++ b/locales/id-ID.json @@ -129,5 +129,11 @@ "home.feed.load_older": "Muat aktivitas lama", "issues.filter.all_states": "Semua status", "projects.create_issue_in": "Buat isu di repositori", - "projects.open_in_new_tab": "Buka di tab baru" + "projects.open_in_new_tab": "Buka di tab baru", + "issues.list.opened": "{author} membuka {time}", + "issues.list.closed": "oleh {author} ditutup {time}", + "issues.list.merged": "oleh {author} digabungkan {time}", + "commits.committed": "melakukan komit {time}", + "commits.authored": "menulis {time}", + "commits.on_date": "Komit pada {date}" } diff --git a/locales/it-IT.json b/locales/it-IT.json index 5b9f96a3..8b6e5990 100644 --- a/locales/it-IT.json +++ b/locales/it-IT.json @@ -139,5 +139,11 @@ "home.feed.load_older": "Carica attività precedenti", "issues.filter.all_states": "Tutti gli stati", "projects.create_issue_in": "Crea segnalazione nel repository", - "projects.open_in_new_tab": "Apri in una nuova scheda" + "projects.open_in_new_tab": "Apri in una nuova scheda", + "issues.list.opened": "{author} ha aperto {time}", + "issues.list.closed": "di {author} è stata chiusa {time}", + "issues.list.merged": "di {author} è stata fusa {time}", + "commits.committed": "ha fatto commit {time}", + "commits.authored": "ha scritto {time}", + "commits.on_date": "Commit del {date}" } diff --git a/locales/ja-JP.json b/locales/ja-JP.json index 73bb0cd5..b78e6ff3 100644 --- a/locales/ja-JP.json +++ b/locales/ja-JP.json @@ -129,5 +129,11 @@ "home.feed.load_older": "以前のアクティビティを読み込む", "issues.filter.all_states": "すべての状態", "projects.create_issue_in": "リポジトリにイシューを作成", - "projects.open_in_new_tab": "新しいタブで開く" + "projects.open_in_new_tab": "新しいタブで開く", + "issues.list.opened": "{author} が {time} にオープン", + "issues.list.closed": "{author} が作成、{time} にクローズ", + "issues.list.merged": "{author} が作成、{time} にマージ", + "commits.committed": "{time} にコミット", + "commits.authored": "{time} に作成", + "commits.on_date": "{date} のコミット" } diff --git a/locales/ko-KR.json b/locales/ko-KR.json index 33d6de83..9e196c87 100644 --- a/locales/ko-KR.json +++ b/locales/ko-KR.json @@ -129,5 +129,11 @@ "home.feed.load_older": "이전 활동 불러오기", "issues.filter.all_states": "모든 상태", "projects.create_issue_in": "저장소에 이슈 만들기", - "projects.open_in_new_tab": "새 탭에서 열기" + "projects.open_in_new_tab": "새 탭에서 열기", + "issues.list.opened": "{author} 님이 {time} 열었습니다", + "issues.list.closed": "{author} 님이 작성, {time} 닫힘", + "issues.list.merged": "{author} 님이 작성, {time} 병합됨", + "commits.committed": "{time} 커밋했습니다", + "commits.authored": "{time} 작성했습니다", + "commits.on_date": "{date}의 커밋" } diff --git a/locales/lv-LV.json b/locales/lv-LV.json index 183a987b..b50e4019 100644 --- a/locales/lv-LV.json +++ b/locales/lv-LV.json @@ -149,5 +149,11 @@ "home.feed.load_older": "Ielādēt senākas darbības", "issues.filter.all_states": "Visi stāvokļi", "projects.create_issue_in": "Izveidot pieteikumu glabātavā", - "projects.open_in_new_tab": "Atvērt jaunā cilnē" + "projects.open_in_new_tab": "Atvērt jaunā cilnē", + "issues.list.opened": "{author} atvēra {time}", + "issues.list.closed": "no {author} tika aizvērts {time}", + "issues.list.merged": "no {author} tika apvienots {time}", + "commits.committed": "iesūtīja {time}", + "commits.authored": "izveidoja {time}", + "commits.on_date": "Iesūtījumi {date}" } diff --git a/locales/nds.json b/locales/nds.json index a44dedd5..387ee19f 100644 --- a/locales/nds.json +++ b/locales/nds.json @@ -139,5 +139,11 @@ "home.feed.load_older": "Ollere Aktivität laden", "issues.filter.all_states": "All Standen", "projects.create_issue_in": "Gefall in Repositorium maken", - "projects.open_in_new_tab": "In nejem Tab opmaken" + "projects.open_in_new_tab": "In nejem Tab opmaken", + "issues.list.opened": "{author} hett {time} opmaakt", + "issues.list.closed": "vun {author} wurr {time} tomaakt", + "issues.list.merged": "vun {author} wurr {time} tosamenföhrt", + "commits.committed": "hett {time} committet", + "commits.authored": "hett {time} schreven", + "commits.on_date": "Commits an'n {date}" } diff --git a/locales/nl-NL.json b/locales/nl-NL.json index ebca2838..4b874739 100644 --- a/locales/nl-NL.json +++ b/locales/nl-NL.json @@ -139,5 +139,11 @@ "home.feed.load_older": "Oudere activiteit laden", "issues.filter.all_states": "Alle statussen", "projects.create_issue_in": "Issue aanmaken in repository", - "projects.open_in_new_tab": "Openen in nieuw tabblad" + "projects.open_in_new_tab": "Openen in nieuw tabblad", + "issues.list.opened": "{author} opende {time}", + "issues.list.closed": "door {author} werd {time} gesloten", + "issues.list.merged": "door {author} werd {time} samengevoegd", + "commits.committed": "committe {time}", + "commits.authored": "schreef {time}", + "commits.on_date": "Commits op {date}" } diff --git a/locales/pl-PL.json b/locales/pl-PL.json index a0d99528..2b15b376 100644 --- a/locales/pl-PL.json +++ b/locales/pl-PL.json @@ -149,5 +149,11 @@ "home.feed.load_older": "Wczytaj starszą aktywność", "issues.filter.all_states": "Wszystkie stany", "projects.create_issue_in": "Utwórz zgłoszenie w repozytorium", - "projects.open_in_new_tab": "Otwórz w nowej karcie" + "projects.open_in_new_tab": "Otwórz w nowej karcie", + "issues.list.opened": "{author} otworzył(a) {time}", + "issues.list.closed": "przez {author}, zamknięty {time}", + "issues.list.merged": "przez {author}, scalony {time}", + "commits.committed": "zatwierdził(a) {time}", + "commits.authored": "utworzył(a) {time}", + "commits.on_date": "Commity z {date}" } diff --git a/locales/pt-BR.json b/locales/pt-BR.json index 5eea0ef9..13b6d234 100644 --- a/locales/pt-BR.json +++ b/locales/pt-BR.json @@ -139,5 +139,11 @@ "home.feed.load_older": "Carregar atividades anteriores", "issues.filter.all_states": "Todos os estados", "projects.create_issue_in": "Criar issue no repositório", - "projects.open_in_new_tab": "Abrir em uma nova aba" + "projects.open_in_new_tab": "Abrir em uma nova aba", + "issues.list.opened": "{author} abriu {time}", + "issues.list.closed": "por {author} foi fechado {time}", + "issues.list.merged": "por {author} teve o merge aplicado {time}", + "commits.committed": "fez commit {time}", + "commits.authored": "criou {time}", + "commits.on_date": "Commits em {date}" } diff --git a/locales/pt-PT.json b/locales/pt-PT.json index 533bde1b..01fbb786 100644 --- a/locales/pt-PT.json +++ b/locales/pt-PT.json @@ -139,5 +139,11 @@ "home.feed.load_older": "Carregar atividade mais antiga", "issues.filter.all_states": "Todos os estados", "projects.create_issue_in": "Criar questão no repositório", - "projects.open_in_new_tab": "Abrir num novo separador" + "projects.open_in_new_tab": "Abrir num novo separador", + "issues.list.opened": "{author} abriu {time}", + "issues.list.closed": "por {author} foi fechado {time}", + "issues.list.merged": "por {author} foi integrado {time}", + "commits.committed": "cometeu {time}", + "commits.authored": "criou {time}", + "commits.on_date": "Cometimentos em {date}" } diff --git a/locales/ru-RU.json b/locales/ru-RU.json index 5c667adb..77586473 100644 --- a/locales/ru-RU.json +++ b/locales/ru-RU.json @@ -149,5 +149,11 @@ "home.feed.load_older": "Загрузить более раннюю активность", "issues.filter.all_states": "Все состояния", "projects.create_issue_in": "Создать задачу в репозитории", - "projects.open_in_new_tab": "Открыть в новой вкладке" + "projects.open_in_new_tab": "Открыть в новой вкладке", + "issues.list.opened": "{author} открыл(а) {time}", + "issues.list.closed": "от {author}, закрыт {time}", + "issues.list.merged": "от {author}, слит {time}", + "commits.committed": "закоммитил(а) {time}", + "commits.authored": "создал(а) {time}", + "commits.on_date": "Коммиты за {date}" } diff --git a/locales/sl.json b/locales/sl.json index 49c985c2..db1d13fa 100644 --- a/locales/sl.json +++ b/locales/sl.json @@ -159,5 +159,11 @@ "home.feed.load_older": "Naloži starejšo dejavnost", "issues.filter.all_states": "Vsa stanja", "projects.create_issue_in": "Ustvari zadevo v repozitoriju", - "projects.open_in_new_tab": "Odpri v novem zavihku" + "projects.open_in_new_tab": "Odpri v novem zavihku", + "issues.list.opened": "{author} je odprl(a) {time}", + "issues.list.closed": "od {author}, zaprto {time}", + "issues.list.merged": "od {author}, združeno {time}", + "commits.committed": "je uveljavil(a) {time}", + "commits.authored": "je ustvaril(a) {time}", + "commits.on_date": "Uveljavitve dne {date}" } diff --git a/locales/sv-SE.json b/locales/sv-SE.json index 06b50a99..9f3fe3b3 100644 --- a/locales/sv-SE.json +++ b/locales/sv-SE.json @@ -139,5 +139,11 @@ "home.feed.load_older": "Läs in äldre aktivitet", "issues.filter.all_states": "Alla tillstånd", "projects.create_issue_in": "Skapa ärende i kodförråd", - "projects.open_in_new_tab": "Öppna i ny flik" + "projects.open_in_new_tab": "Öppna i ny flik", + "issues.list.opened": "{author} öppnade {time}", + "issues.list.closed": "av {author} stängdes {time}", + "issues.list.merged": "av {author} slogs samman {time}", + "commits.committed": "committade {time}", + "commits.authored": "skrev {time}", + "commits.on_date": "Commits den {date}" } diff --git a/locales/tr-TR.json b/locales/tr-TR.json index 6bb428e1..35f1fd9c 100644 --- a/locales/tr-TR.json +++ b/locales/tr-TR.json @@ -139,5 +139,11 @@ "home.feed.load_older": "Daha eski etkinlikleri yükle", "issues.filter.all_states": "Tüm durumlar", "projects.create_issue_in": "Depoda konu oluştur", - "projects.open_in_new_tab": "Yeni sekmede aç" + "projects.open_in_new_tab": "Yeni sekmede aç", + "issues.list.opened": "{author} {time} açtı", + "issues.list.closed": "{author} tarafından, {time} kapatıldı", + "issues.list.merged": "{author} tarafından, {time} birleştirildi", + "commits.committed": "{time} işledi", + "commits.authored": "{time} yazdı", + "commits.on_date": "{date} tarihli işlemeler" } diff --git a/locales/uk-UA.json b/locales/uk-UA.json index 9462bd69..e026cb61 100644 --- a/locales/uk-UA.json +++ b/locales/uk-UA.json @@ -149,5 +149,11 @@ "home.feed.load_older": "Завантажити давнішу активність", "issues.filter.all_states": "Усі стани", "projects.create_issue_in": "Створити задачу в репозиторії", - "projects.open_in_new_tab": "Відкрити в новій вкладці" + "projects.open_in_new_tab": "Відкрити в новій вкладці", + "issues.list.opened": "{author} відкрив(ла) {time}", + "issues.list.closed": "від {author}, закрито {time}", + "issues.list.merged": "від {author}, злито {time}", + "commits.committed": "закомітив(ла) {time}", + "commits.authored": "створив(ла) {time}", + "commits.on_date": "Коміти за {date}" } diff --git a/locales/zh-CN.json b/locales/zh-CN.json index 7924e139..85473bdd 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -129,5 +129,11 @@ "home.feed.load_older": "加载更早的动态", "issues.filter.all_states": "所有状态", "projects.create_issue_in": "在仓库中创建工单", - "projects.open_in_new_tab": "在新标签页中打开" + "projects.open_in_new_tab": "在新标签页中打开", + "issues.list.opened": "{author} 于 {time} 创建", + "issues.list.closed": "由 {author} 创建,于 {time} 关闭", + "issues.list.merged": "由 {author} 创建,于 {time} 合并", + "commits.committed": "于 {time} 提交", + "commits.authored": "于 {time} 编写", + "commits.on_date": "{date} 的提交" } diff --git a/locales/zh-HK.json b/locales/zh-HK.json index b90975a7..127a2039 100644 --- a/locales/zh-HK.json +++ b/locales/zh-HK.json @@ -129,5 +129,11 @@ "home.feed.load_older": "載入較早嘅動態", "issues.filter.all_states": "所有狀態", "projects.create_issue_in": "喺儲存庫建立問題", - "projects.open_in_new_tab": "喺新分頁開啟" + "projects.open_in_new_tab": "喺新分頁開啟", + "issues.list.opened": "{author} 於 {time} 建立", + "issues.list.closed": "由 {author} 建立,於 {time} 關閉", + "issues.list.merged": "由 {author} 建立,於 {time} 合併", + "commits.committed": "於 {time} 提交", + "commits.authored": "於 {time} 撰寫", + "commits.on_date": "{date} 的提交" } diff --git a/locales/zh-TW.json b/locales/zh-TW.json index 467b85a8..acb7aa11 100644 --- a/locales/zh-TW.json +++ b/locales/zh-TW.json @@ -129,5 +129,11 @@ "home.feed.load_older": "載入較早的動態", "issues.filter.all_states": "所有狀態", "projects.create_issue_in": "在儲存庫建立問題", - "projects.open_in_new_tab": "在新分頁開啟" + "projects.open_in_new_tab": "在新分頁開啟", + "issues.list.opened": "{author} 於 {time} 建立", + "issues.list.closed": "由 {author} 建立,於 {time} 關閉", + "issues.list.merged": "由 {author} 建立,於 {time} 合併", + "commits.committed": "於 {time} 提交", + "commits.authored": "於 {time} 撰寫", + "commits.on_date": "{date} 的提交" } diff --git a/styles/components/issues/issue_list.ts b/styles/components/issues/issue_list.ts index 94695043..7d633b22 100644 --- a/styles/components/issues/issue_list.ts +++ b/styles/components/issues/issue_list.ts @@ -278,4 +278,30 @@ const titleLabels = css` } `; -export default cssCombine(issueList, issueListMobile, issuePins, issueRows, repositoryRows, titleLabels); +// GitHub's meta line: "#8 · [avatar] user opened yesterday · ✓ 2/2", the checks counted after the event. +const metaLine = css` + #issue-list .issue-meta { + & .index::after { + content: " ·"; + } + & .issue-meta-event .author { + display: inline-flex; + align-items: center; + gap: 4px; + color: inherit; + vertical-align: top; + } + & .issue-meta-event .author img.ui.avatar { + width: 16px; + height: 16px; + margin: 0; + border-radius: 9999px; + } + & .issue-meta-checks::before { + content: "·"; + margin-right: 4px; + } + } +`; + +export default cssCombine(issueList, issueListMobile, issuePins, issueRows, repositoryRows, titleLabels, metaLine); diff --git a/styles/templates/repo/commits_list.ts b/styles/templates/repo/commits_list.ts index 6436ae1d..92d84063 100644 --- a/styles/templates/repo/commits_list.ts +++ b/styles/templates/repo/commits_list.ts @@ -135,4 +135,33 @@ const commitsList = css` } `; -export default cssCombine(commitsList); +// The tally of passed checks that follows a check icon wherever GitHub counts them: lists, history and a commit. +const commitStatusCount = css` + [data-tippy="commit-statuses"]:has(> .commit-status-count) { + display: inline-flex; + align-items: center; + gap: 4px; + color: ${themeVars.color.text.light.num1}; + } + .commit-status-count { + font-size: 12px; + white-space: nowrap; + } +`; + +// GitHub's checks after the time: "· ✓ 2 / 2". +const commitChecks = css` + .gitea-github-theme-commit .commit-checks { + display: inline-flex; + align-items: center; + gap: 4px; + &::before { + content: "·"; + } + & .commit-status-count-slash { + margin: 0 4px; + } + } +`; + +export default cssCombine(commitsList, commitStatusCount, commitChecks); diff --git a/templates/repo/commit_list_item.tmpl b/templates/repo/commit_list_item.tmpl index 7d826a52..753f9aa8 100644 --- a/templates/repo/commit_list_item.tmpl +++ b/templates/repo/commit_list_item.tmpl @@ -1,7 +1,8 @@ {{/* Shared commit row for repository history and pull-request date groups. */}} {{$page := .Page}}{{$commit := .Commit}}{{$commitID := $commit.ID.String}} {{$commitRepoLink := $page.RepoLink}}{{if $page.CommitRepoLink}}{{$commitRepoLink = $page.CommitRepoLink}}{{end}} -{{$shortHash := ""}}{{if $page.PageIsPullCommits}}{{$shortHash = printf "%.7s" $commitID}}{{end}} +{{/* GitHub shortens a commit to seven characters everywhere. */}} +{{$shortHash := printf "%.7s" $commitID}}
  • {{if $page.PageIsWiki}} @@ -38,12 +39,13 @@ {{ctx.AvatarUtils.AvatarByEmail $commit.Author.Email $commit.Author.Name 20}} {{$userName}} {{end}} - {{if $commit.Committer}} - {{DateUtils.TimeSince $commit.Committer.When}} - {{else}} - {{DateUtils.TimeSince $commit.Author.When}} - {{end}} - {{template "repo/commit_statuses" dict "Status" $commit.Status "Statuses" $commit.Statuses}} + {{/* GitHub: "user committed 2 weeks ago", or "authored" when someone else committed it. */}} + {{$when := $commit.Author.When}}{{if $commit.Committer}}{{$when = $commit.Committer.When}}{{end}} + {{$timeKey := "commits.committed"}} + {{if and $commit.Committer (or (ne $commit.Committer.Name $commit.Author.Name) (ne $commit.Committer.Email $commit.Author.Email))}}{{$timeKey = "commits.authored"}}{{end}} + {{$timeSince := DateUtils.TimeSince $when}} + {{template "theme/phrase" dict "Key" $timeKey "Time" $timeSince "Fallback" $timeSince}} + {{if $commit.Statuses}}{{template "repo/commit_statuses" dict "Status" $commit.Status "Statuses" $commit.Statuses "Count" true}}{{end}}
    {{if $page.CommitTagsMap}} @@ -71,7 +73,7 @@ {{end}} {{if $page.PageIsPullCommits}}{{svg "octicon-code"}}{{else}}{{svg "octicon-file-code"}}{{end}} + >{{svg "octicon-code"}} {{end}}
  • diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl index 36d28a4d..56fc8364 100644 --- a/templates/repo/commit_page.tmpl +++ b/templates/repo/commit_page.tmpl @@ -128,7 +128,10 @@ {{else}} {{.Commit.Author.Name}} {{end}} - {{DateUtils.TimeSince .Commit.Author.When}} + {{/* GitHub: "user committed 2 weeks ago", or "authored" when someone else committed it. */}} + {{$authoredAt := DateUtils.TimeSince .Commit.Author.When}} + {{$timeKey := "commits.committed"}}{{if or (ne .Commit.Committer.Name .Commit.Author.Name) (ne .Commit.Committer.Email .Commit.Author.Email)}}{{$timeKey = "commits.authored"}}{{end}} + {{template "theme/phrase" dict "Key" $timeKey "Time" $authoredAt "Fallback" $authoredAt}} {{if or (ne .Commit.Committer.Name .Commit.Author.Name) (ne .Commit.Committer.Email .Commit.Author.Email)}} · {{ctx.Locale.Tr "repo.diff.committed_by"}} @@ -138,7 +141,8 @@ {{.Commit.Committer.Name}} {{end}} {{end}} - {{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses}} + {{if .CommitStatuses}}·{{end}} + {{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses "Count" true}} {{if and .Commit.Signature .Verification.Verified}} · diff --git a/templates/repo/commit_statuses.tmpl b/templates/repo/commit_statuses.tmpl index 75ece564..4dfdd996 100644 --- a/templates/repo/commit_statuses.tmpl +++ b/templates/repo/commit_statuses.tmpl @@ -1,4 +1,11 @@ +{{/* With Count, GitHub's tally of passed checks follows the icon, as in "2/2". */}} {{if .Statuses}} + {{$count := ""}} + {{if .Count}} + {{$passed := 0}} + {{range .Statuses}}{{if or (eq .State "success") (eq .State "skipped")}}{{$passed = Eval $passed "+" 1}}{{end}}{{end}} + {{$count = HTMLFormat `%d/%d` $passed (len .Statuses)}} + {{end}} {{if and (eq (len .Statuses) 1) .Status.TargetURL}} {{$label := ""}} {{if .StatusLabel}} @@ -6,11 +13,11 @@ {{if eq .Status.State "pending"}}{{$label = ctx.Locale.Tr "repo.pulls.status_checking"}}{{else if eq .Status.State "success"}}{{$label = ctx.Locale.Tr "repo.pulls.status_checks_success"}}{{else if eq .Status.State "warning"}}{{$label = ctx.Locale.Tr "repo.pulls.status_checks_warning"}}{{else if eq .Status.State "failure"}}{{$label = ctx.Locale.Tr "repo.pulls.status_checks_failure"}}{{else if eq .Status.State "error"}}{{$label = ctx.Locale.Tr "repo.pulls.status_checks_error"}}{{end}} {{end}} - {{template "repo/commit_status" .Status}} + {{template "repo/commit_status" .Status}}{{$count}} {{else}} - {{template "repo/commit_status" .Status}} + {{template "repo/commit_status" .Status}}{{$count}} {{end}}
    diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl index 9e7d4b41..9e06ca65 100644 --- a/templates/shared/issuelist.tmpl +++ b/templates/shared/issuelist.tmpl @@ -14,11 +14,6 @@
    {{RenderRefIssueTitle $.Context .Title}} - {{if .IsPull}} - {{if (index $.CommitStatuses .PullRequest.ID)}} - {{template "repo/commit_statuses" dict "Status" (index $.CommitLastStatus .PullRequest.ID) "Statuses" (index $.CommitStatuses .PullRequest.ID)}} - {{end}} - {{end}} {{range .Labels}} {{template "components/repository/label/label" .}} @@ -62,14 +57,27 @@ {{- end -}} {{$timeStr := DateUtils.TimeSince .GetLastEventTimestamp}} + {{$forgejoEvent := ""}}{{$author := ""}} {{if .OriginalAuthor}} - {{ctx.Locale.Tr .GetLastEventLabelFake $timeStr .OriginalAuthor}} + {{$forgejoEvent = ctx.Locale.Tr .GetLastEventLabelFake $timeStr .OriginalAuthor}} + {{$author = HTMLFormat `%s` .OriginalAuthor}} {{else if gt .Poster.ID 0}} - {{ctx.Locale.Tr .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.GetDisplayName}} + {{$forgejoEvent = ctx.Locale.Tr .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.GetDisplayName}} + {{$author = HTMLFormat `%s%s` .Poster.HomeLink (ctx.AvatarUtils.Avatar .Poster 16) .Poster.GetDisplayName}} {{else}} - {{ctx.Locale.Tr .GetLastEventLabelFake $timeStr .Poster.GetDisplayName}} + {{$forgejoEvent = ctx.Locale.Tr .GetLastEventLabelFake $timeStr .Poster.GetDisplayName}} + {{$author = HTMLFormat `%s` .Poster.GetDisplayName}} {{end}} + {{/* GitHub: "#8 · [avatar] user opened yesterday", "#5 · by user was closed 2 weeks ago". */}} + {{$eventKey := "issues.list.opened"}} + {{if and .IsPull .PullRequest.HasMerged}}{{$eventKey = "issues.list.merged"}}{{else if .IsClosed}}{{$eventKey = "issues.list.closed"}}{{end}} + {{template "theme/phrase" dict "Key" $eventKey "Author" $author "Time" $timeStr "Fallback" $forgejoEvent}} + {{if .IsPull}} + {{if (index $.CommitStatuses .PullRequest.ID)}} + {{template "repo/commit_statuses" dict "Status" (index $.CommitLastStatus .PullRequest.ID) "Statuses" (index $.CommitStatuses .PullRequest.ID) "Count" true}} + {{end}} + {{end}} {{if .IsPull}} {{svg "gitea-double-chevron-right" 12}}