From debeedfe42b604912490e22cf01dd38436f39be4 Mon Sep 17 00:00:00 2001 From: 0ko <0ko@noreply.codeberg.org> Date: Sat, 9 Mar 2024 16:36:42 +0500 Subject: [PATCH 1/2] Add plural support for PR subtitles --- options/locale/locale_cs-CZ.ini | 4 ++-- options/locale/locale_de-DE.ini | 4 ++-- options/locale/locale_el-GR.ini | 4 ++-- options/locale/locale_en-US.ini | 6 ++++-- options/locale/locale_es-ES.ini | 4 ++-- options/locale/locale_fa-IR.ini | 4 ++-- options/locale/locale_fi-FI.ini | 4 ++-- options/locale/locale_fr-FR.ini | 4 ++-- options/locale/locale_hu-HU.ini | 4 ++-- options/locale/locale_id-ID.ini | 4 ++-- options/locale/locale_is-IS.ini | 2 +- options/locale/locale_it-IT.ini | 4 ++-- options/locale/locale_ja-JP.ini | 4 ++-- options/locale/locale_ko-KR.ini | 4 ++-- options/locale/locale_lv-LV.ini | 4 ++-- options/locale/locale_nl-NL.ini | 4 ++-- options/locale/locale_pl-PL.ini | 4 ++-- options/locale/locale_pt-BR.ini | 4 ++-- options/locale/locale_pt-PT.ini | 4 ++-- options/locale/locale_ru-RU.ini | 6 ++++-- options/locale/locale_si-LK.ini | 4 ++-- options/locale/locale_sv-SE.ini | 4 ++-- options/locale/locale_tr-TR.ini | 4 ++-- options/locale/locale_uk-UA.ini | 4 ++-- options/locale/locale_zh-CN.ini | 4 ++-- options/locale/locale_zh-HK.ini | 2 +- options/locale/locale_zh-TW.ini | 4 ++-- templates/repo/issue/view_title.tmpl | 8 ++++---- 28 files changed, 60 insertions(+), 56 deletions(-) diff --git a/options/locale/locale_cs-CZ.ini b/options/locale/locale_cs-CZ.ini index ada6ea4d11..cb984aad07 100644 --- a/options/locale/locale_cs-CZ.ini +++ b/options/locale/locale_cs-CZ.ini @@ -1772,8 +1772,8 @@ pulls.nothing_to_compare_have_tag=Vybraná větev/značka je stejná. pulls.nothing_to_compare_and_allow_empty_pr=Tyto větve jsou stejné. Tento požadavek na natažení bude prázdný. pulls.has_pull_request=`Požadavek na natažení mezi těmito větvemi již existuje: %[2]s#%[3]d` pulls.create=Vytvořit žádost o sloučení -pulls.title_desc=chce sloučit %[1]d commity z větve %[2]s do %[3]s -pulls.merged_title_desc=sloučil %[1]d commity z větve %[2]s do větve %[3]s před %[4]s +pulls.title_desc_few=chce sloučit %[1]d commity z větve %[2]s do %[3]s +pulls.merged_title_desc_few=sloučil %[1]d commity z větve %[2]s do větve %[3]s před %[4]s pulls.change_target_branch_at=`změnil/a cílovou větev z %s na %s %s` pulls.tab_conversation=Konverzace pulls.tab_commits=Commity diff --git a/options/locale/locale_de-DE.ini b/options/locale/locale_de-DE.ini index a054a9522c..983580598e 100644 --- a/options/locale/locale_de-DE.ini +++ b/options/locale/locale_de-DE.ini @@ -1764,8 +1764,8 @@ pulls.nothing_to_compare=Diese Branches sind identisch. Es muss kein Pull-Reques pulls.nothing_to_compare_and_allow_empty_pr=Diese Branches sind gleich. Der Pull-Request wird leer sein. pulls.has_pull_request=`Es existiert bereits ein Pull-Request zwischen diesen beiden Branches: %[2]s#%[3]d` pulls.create=Pull-Request erstellen -pulls.title_desc=möchte %[1]d Commits von %[2]s nach %[3]s mergen -pulls.merged_title_desc=hat %[1]d Commits von %[2]s nach %[3]s %[4]s zusammengeführt +pulls.title_desc_few=möchte %[1]d Commits von %[2]s nach %[3]s mergen +pulls.merged_title_desc_few=hat %[1]d Commits von %[2]s nach %[3]s %[4]s zusammengeführt pulls.change_target_branch_at=`hat den Zielbranch von %s nach %s %s geändert` pulls.tab_conversation=Diskussion pulls.tab_commits=Commits diff --git a/options/locale/locale_el-GR.ini b/options/locale/locale_el-GR.ini index ef9669f2b4..7d43c83cc3 100644 --- a/options/locale/locale_el-GR.ini +++ b/options/locale/locale_el-GR.ini @@ -1753,8 +1753,8 @@ pulls.nothing_to_compare=Αυτοί οι κλάδοι είναι όμοιοι. pulls.nothing_to_compare_and_allow_empty_pr=Αυτοί οι κλάδοι είναι ίσοι. Αυτό το PR θα είναι κενό. pulls.has_pull_request=`Υπάρχει ήδη pull request μεταξύ αυτών των κλάδων: %[2]s#%[3]d` pulls.create=Δημιουργία Pull Request -pulls.title_desc=θέλει να συγχωνεύσει %[1]d υποβολές από %[2]s σε %[3]s -pulls.merged_title_desc=συγχώνευσε %[1]d υποβολές από %[2]s σε %[3]s %[4]s +pulls.title_desc_few=θέλει να συγχωνεύσει %[1]d υποβολές από %[2]s σε %[3]s +pulls.merged_title_desc_few=συγχώνευσε %[1]d υποβολές από %[2]s σε %[3]s %[4]s pulls.change_target_branch_at=`άλλαξε τον κλάδο προορισμού από %s σε %s %s` pulls.tab_conversation=Συζήτηση pulls.tab_commits=Υποβολές diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 647c46b5a9..5233c737ba 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1788,8 +1788,10 @@ pulls.nothing_to_compare_have_tag = The selected branch/tag are equal. pulls.nothing_to_compare_and_allow_empty_pr = These branches are equal. This PR will be empty. pulls.has_pull_request = `A pull request between these branches already exists: %[2]s#%[3]d` pulls.create = Create pull request -pulls.title_desc = wants to merge %[1]d commits from %[2]s into %[3]s -pulls.merged_title_desc = merged %[1]d commits from %[2]s into %[3]s %[4]s +pulls.title_desc_one = wants to merge %[1]d commit from %[2]s into %[3]s +pulls.title_desc_few = wants to merge %[1]d commits from %[2]s into %[3]s +pulls.merged_title_desc_one = merged %[1]d commit from %[2]s into %[3]s %[4]s +pulls.merged_title_desc_few = merged %[1]d commits from %[2]s into %[3]s %[4]s pulls.change_target_branch_at = `changed target branch from %s to %s %s` pulls.tab_conversation = Conversation pulls.tab_commits = Commits diff --git a/options/locale/locale_es-ES.ini b/options/locale/locale_es-ES.ini index e366dc9773..0b4f0bef33 100644 --- a/options/locale/locale_es-ES.ini +++ b/options/locale/locale_es-ES.ini @@ -1734,8 +1734,8 @@ pulls.nothing_to_compare=Estas ramas son iguales. No hay necesidad para crear un pulls.nothing_to_compare_and_allow_empty_pr=Estas ramas son iguales. Este PR estará vacío. pulls.has_pull_request=`Ya existe un pull request entre estas ramas: %[2]s#%[3]d` pulls.create=Crear Pull Request -pulls.title_desc=desea fusionar %[1]d commits de %[2]s en %[3]s -pulls.merged_title_desc=fusionados %[1]d commits de %[2]s en %[3]s %[4]s +pulls.title_desc_few=desea fusionar %[1]d commits de %[2]s en %[3]s +pulls.merged_title_desc_few=fusionados %[1]d commits de %[2]s en %[3]s %[4]s pulls.change_target_branch_at=`cambió la rama objetivo de %s a %s %s` pulls.tab_conversation=Conversación pulls.tab_commits=Commits diff --git a/options/locale/locale_fa-IR.ini b/options/locale/locale_fa-IR.ini index d64923d556..598c1636dc 100644 --- a/options/locale/locale_fa-IR.ini +++ b/options/locale/locale_fa-IR.ini @@ -1326,8 +1326,8 @@ pulls.nothing_to_compare=این شاخه‎ها یکی هستند. نیازی ب pulls.nothing_to_compare_and_allow_empty_pr=این شاخه ها برابر هستند. این PR خالی خواهد بود. pulls.has_pull_request=`A درخواست pull بین این شاخه ها از قبل وجود دارد: %[2]s#%[3]d` pulls.create=ایجاد تقاضای واکشی -pulls.title_desc=قصد ادغام %[1]d تغییر را از %[2]s به %[3]s دارد -pulls.merged_title_desc=%[1]d کامیت ادغام شده از %[2]s به %[3]s %[4]s +pulls.title_desc_few=قصد ادغام %[1]d تغییر را از %[2]s به %[3]s دارد +pulls.merged_title_desc_few=%[1]d کامیت ادغام شده از %[2]s به %[3]s %[4]s pulls.change_target_branch_at=`هدف شاخه از %s به %s %s تغییر کرد` pulls.tab_conversation=گفتگو pulls.tab_commits=کامیت‌ها diff --git a/options/locale/locale_fi-FI.ini b/options/locale/locale_fi-FI.ini index 5302c62e1c..c6c64ad6ce 100644 --- a/options/locale/locale_fi-FI.ini +++ b/options/locale/locale_fi-FI.ini @@ -989,8 +989,8 @@ pulls.nothing_to_compare=Nämä haarat vastaavat toisiaan. Ei ole tarvetta luoda pulls.nothing_to_compare_and_allow_empty_pr=Nämä haarat vastaavat toisiaan. Vetopyyntö tulee olemaan tyhjä. pulls.has_pull_request=`Vetopyyntö haarojen välillä on jo olemassa: %[2]s#%[3]d` pulls.create=Luo Pull-pyyntö -pulls.title_desc=haluaa yhdistää %[1]d committia lähteestä %[2]s kohteeseen %[3]s -pulls.merged_title_desc=yhdistetty %[1]d committia lähteestä %[2]s kohteeseen %[3]s %[4]s +pulls.title_desc_few=haluaa yhdistää %[1]d committia lähteestä %[2]s kohteeseen %[3]s +pulls.merged_title_desc_few=yhdistetty %[1]d committia lähteestä %[2]s kohteeseen %[3]s %[4]s pulls.tab_conversation=Keskustelu pulls.tab_commits=Commitit pulls.tab_files=Muuttuneet tiedostot diff --git a/options/locale/locale_fr-FR.ini b/options/locale/locale_fr-FR.ini index b34b6e5d5b..36c849bd7b 100644 --- a/options/locale/locale_fr-FR.ini +++ b/options/locale/locale_fr-FR.ini @@ -1772,8 +1772,8 @@ pulls.nothing_to_compare=Ces branches sont identiques. Il n’y a pas besoin de pulls.nothing_to_compare_and_allow_empty_pr=Ces branches sont égales. Cette demande d'ajout sera vide. pulls.has_pull_request='Il existe déjà une demande d'ajout entre ces deux branches : %[2]s#%[3]d' pulls.create=Créer une demande d'ajout -pulls.title_desc=souhaite fusionner %[1]d révision(s) depuis %[2]s vers %[3]s -pulls.merged_title_desc=a fusionné %[1]d révision(s) à partir de %[2]s vers %[3]s %[4]s +pulls.title_desc_few=souhaite fusionner %[1]d révision(s) depuis %[2]s vers %[3]s +pulls.merged_title_desc_few=a fusionné %[1]d révision(s) à partir de %[2]s vers %[3]s %[4]s pulls.change_target_branch_at=`a remplacée la branche cible %s par %s %s.` pulls.tab_conversation=Discussion pulls.tab_commits=Révisions diff --git a/options/locale/locale_hu-HU.ini b/options/locale/locale_hu-HU.ini index b1d1714bfe..3764f6fa61 100644 --- a/options/locale/locale_hu-HU.ini +++ b/options/locale/locale_hu-HU.ini @@ -933,8 +933,8 @@ pulls.filter_branch=Ágra szűrés pulls.no_results=Nincs találat. pulls.nothing_to_compare=Ezek az ágak egyenlőek. Nincs szükség egyesítési kérésre. pulls.create=Egyesítési kérés létrehozása -pulls.title_desc=egyesíteni szeretné %[1]d változás(oka)t a(z) %[2]s-ból %[3]s-ba -pulls.merged_title_desc=egyesítve %[1]d változás(ok) a %[2]s-ból %[3]s-ba %[4]s +pulls.title_desc_few=egyesíteni szeretné %[1]d változás(oka)t a(z) %[2]s-ból %[3]s-ba +pulls.merged_title_desc_few=egyesítve %[1]d változás(ok) a %[2]s-ból %[3]s-ba %[4]s pulls.tab_conversation=Beszélgetés pulls.tab_commits=Commit-ok pulls.tab_files=Módosított fájlok diff --git a/options/locale/locale_id-ID.ini b/options/locale/locale_id-ID.ini index 65e01e69d0..574063bcaa 100644 --- a/options/locale/locale_id-ID.ini +++ b/options/locale/locale_id-ID.ini @@ -752,8 +752,8 @@ pulls.compare_changes=Permintaan Tarik Baru pulls.filter_branch=Penyaringan cabang pulls.no_results=Hasil tidak ditemukan. pulls.create=Buat Permintaan Tarik -pulls.title_desc=ingin menggabungkan komit %[1]d dari %[2]s menuju %[3]s -pulls.merged_title_desc=commit %[1]d telah digabungkan dari %[2]s menjadi %[3]s %[4]s +pulls.title_desc_few=ingin menggabungkan komit %[1]d dari %[2]s menuju %[3]s +pulls.merged_title_desc_few=commit %[1]d telah digabungkan dari %[2]s menjadi %[3]s %[4]s pulls.tab_conversation=Percakapan pulls.tab_commits=Melakukan pulls.reopen_to_merge=Tolong buka kembali permintaan tarik ini untuk melaksanakan penggabungan. diff --git a/options/locale/locale_is-IS.ini b/options/locale/locale_is-IS.ini index 555fddf54f..27b9a4b17c 100644 --- a/options/locale/locale_is-IS.ini +++ b/options/locale/locale_is-IS.ini @@ -889,7 +889,7 @@ pulls.new=Ný Sameiningarbeiðni pulls.view=Skoða Sameiningarbeiðni pulls.compare_changes=Ný Sameiningarbeiðni pulls.create=Skapa Sameiningarbeiðni -pulls.title_desc=vill sameina %[1]d framlög frá %[2]s í %[3]s +pulls.title_desc_few=vill sameina %[1]d framlög frá %[2]s í %[3]s pulls.tab_conversation=Umræða pulls.tab_commits=Framlög pulls.tab_files=Skráum Breytt diff --git a/options/locale/locale_it-IT.ini b/options/locale/locale_it-IT.ini index 662a6bae78..2d41edf59d 100644 --- a/options/locale/locale_it-IT.ini +++ b/options/locale/locale_it-IT.ini @@ -1628,8 +1628,8 @@ pulls.nothing_to_compare=Questi rami sono uguali. Non c'è alcuna necessità di pulls.nothing_to_compare_and_allow_empty_pr=Questi rami sono uguali. Questa PR sarà vuota. pulls.has_pull_request=`Una pull request tra questi rami esiste già: %[2]s#%[3]d` pulls.create=Crea richiesta di modifica -pulls.title_desc=vorrebbe unire %[1]d commit da %[2]s a %[3]s -pulls.merged_title_desc=ha unito %[1]d commit da %[2]s a %[3]s %[4]s +pulls.title_desc_few=vorrebbe unire %[1]d commit da %[2]s a %[3]s +pulls.merged_title_desc_few=ha unito %[1]d commit da %[2]s a %[3]s %[4]s pulls.change_target_branch_at=`cambiato il branch di destinazione da %s a %s %s` pulls.tab_conversation=Conversazione pulls.tab_commits=Commit diff --git a/options/locale/locale_ja-JP.ini b/options/locale/locale_ja-JP.ini index bb8db6e375..1aa00440d9 100644 --- a/options/locale/locale_ja-JP.ini +++ b/options/locale/locale_ja-JP.ini @@ -1760,8 +1760,8 @@ pulls.nothing_to_compare=同じブランチ同士のため、 プルリクエス pulls.nothing_to_compare_and_allow_empty_pr=これらのブランチは内容が同じです。 空のプルリクエストになります。 pulls.has_pull_request=`同じブランチのプルリクエストはすでに存在します: %[2]s#%[3]d` pulls.create=プルリクエストを作成 -pulls.title_desc=が %[2]s から %[3]s への %[1]d コミットのマージを希望しています -pulls.merged_title_desc=が %[1]d 個のコミットを %[2]s から %[3]s へマージ %[4]s +pulls.title_desc_few=が %[2]s から %[3]s への %[1]d コミットのマージを希望しています +pulls.merged_title_desc_few=が %[1]d 個のコミットを %[2]s から %[3]s へマージ %[4]s pulls.change_target_branch_at=`がターゲットブランチを %s から %s に変更 %s` pulls.tab_conversation=会話 pulls.tab_commits=コミット diff --git a/options/locale/locale_ko-KR.ini b/options/locale/locale_ko-KR.ini index 72f576b847..fa6df2d2a1 100644 --- a/options/locale/locale_ko-KR.ini +++ b/options/locale/locale_ko-KR.ini @@ -847,8 +847,8 @@ pulls.compare_compare=다음으로부터 풀 pulls.filter_branch=Filter Branch pulls.no_results=결과 없음 pulls.create=풀 리퀘스트 생성 -pulls.title_desc="%[2]s 에서 %[3]s 로 %[1]d commits 를 머지하려 합니다" -pulls.merged_title_desc=%[2]s 에서 %[3]s 로 %[1]d commits 를 머지했습니다 %[4]s +pulls.title_desc_few="%[2]s 에서 %[3]s 로 %[1]d commits 를 머지하려 합니다" +pulls.merged_title_desc_few=%[2]s 에서 %[3]s 로 %[1]d commits 를 머지했습니다 %[4]s pulls.tab_conversation=대화 pulls.tab_commits=커밋 pulls.tab_files=파일 변경됨 diff --git a/options/locale/locale_lv-LV.ini b/options/locale/locale_lv-LV.ini index 7fa8c21c25..ce8f05e4b5 100644 --- a/options/locale/locale_lv-LV.ini +++ b/options/locale/locale_lv-LV.ini @@ -1713,8 +1713,8 @@ pulls.nothing_to_compare=Nav ko salīdzināt, jo bāzes un salīdzināmie atzari pulls.nothing_to_compare_and_allow_empty_pr=Šie atzari ir vienādi. Izveidotais izmaiņu pieprasījums būs tukšs. pulls.has_pull_request=`Izmaiņu pieprasījums starp šiem atzariem jau eksistē: %[2]s#%[3]d` pulls.create=Izveidot izmaiņu pieprasījumu -pulls.title_desc=vēlas sapludināt %[1]d revīzijas no %[2]s uz %[3]s -pulls.merged_title_desc=sapludināja %[1]d revīzijas no %[2]s uz %[3]s %[4]s +pulls.title_desc_few=vēlas sapludināt %[1]d revīzijas no %[2]s uz %[3]s +pulls.merged_title_desc_few=sapludināja %[1]d revīzijas no %[2]s uz %[3]s %[4]s pulls.change_target_branch_at=`nomainīja mērķa atzaru no %s uz %s %s` pulls.tab_conversation=Saruna pulls.tab_commits=Revīzijas diff --git a/options/locale/locale_nl-NL.ini b/options/locale/locale_nl-NL.ini index 53674a1c59..95d370661d 100644 --- a/options/locale/locale_nl-NL.ini +++ b/options/locale/locale_nl-NL.ini @@ -1618,8 +1618,8 @@ pulls.nothing_to_compare=Deze branches zijn gelijk. Er is geen pull request nodi pulls.nothing_to_compare_and_allow_empty_pr=Deze branches zijn gelijk. Deze pull verzoek zal leeg zijn. pulls.has_pull_request=`Een pull-verzoek tussen deze branches bestaat al: %[2]s#%[3]d` pulls.create=Pull verzoek aanmaken -pulls.title_desc=wil %[1]d commits van %[2]s samenvoegen met %[3]s -pulls.merged_title_desc=heeft %[1]d commits samengevoegd van %[2]s naar %[3]s %[4]s +pulls.title_desc_few=wil %[1]d commits van %[2]s samenvoegen met %[3]s +pulls.merged_title_desc_few=heeft %[1]d commits samengevoegd van %[2]s naar %[3]s %[4]s pulls.change_target_branch_at='doelbranch aangepast van %s naar %s %s' pulls.tab_conversation=Discussie pulls.tab_commits=Commits diff --git a/options/locale/locale_pl-PL.ini b/options/locale/locale_pl-PL.ini index 354b3661b5..a254a912bd 100644 --- a/options/locale/locale_pl-PL.ini +++ b/options/locale/locale_pl-PL.ini @@ -1302,8 +1302,8 @@ pulls.no_results=Nie znaleziono wyników. pulls.nothing_to_compare=Te gałęzie są sobie równe. Nie ma potrzeby tworzyć Pull Requesta. pulls.nothing_to_compare_and_allow_empty_pr=Te gałęzie są równe. Ten PR będzie pusty. pulls.create=Utwórz Pull Request -pulls.title_desc=chce scalić %[1]d commity/ów z %[2]s do %[3]s -pulls.merged_title_desc=scala %[1]d commity/ów z %[2]s do %[3]s %[4]s +pulls.title_desc_few=chce scalić %[1]d commity/ów z %[2]s do %[3]s +pulls.merged_title_desc_few=scala %[1]d commity/ów z %[2]s do %[3]s %[4]s pulls.change_target_branch_at=`zmienia gałąź docelową z %s na %s %s` pulls.tab_conversation=Dyskusja pulls.tab_commits=Commity diff --git a/options/locale/locale_pt-BR.ini b/options/locale/locale_pt-BR.ini index d64117a0bc..ade7c6c704 100644 --- a/options/locale/locale_pt-BR.ini +++ b/options/locale/locale_pt-BR.ini @@ -1724,8 +1724,8 @@ pulls.nothing_to_compare=Estes branches são iguais. Não há nenhuma necessidad pulls.nothing_to_compare_and_allow_empty_pr=Estes branches são iguais. Este PR ficará vazio. pulls.has_pull_request=`Um pull request entre esses branches já existe: %[2]s#%[3]d` pulls.create=Criar pull request -pulls.title_desc=quer aplicar o merge de %[1]d commits de %[2]s em %[3]s -pulls.merged_title_desc=aplicou merge dos %[1]d commits de %[2]s em %[3]s %[4]s +pulls.title_desc_few=quer aplicar o merge de %[1]d commits de %[2]s em %[3]s +pulls.merged_title_desc_few=aplicou merge dos %[1]d commits de %[2]s em %[3]s %[4]s pulls.change_target_branch_at=`mudou o branch de destino de %s para %s %s` pulls.tab_conversation=Conversação pulls.tab_commits=Commits diff --git a/options/locale/locale_pt-PT.ini b/options/locale/locale_pt-PT.ini index 2024046634..3538ac9460 100644 --- a/options/locale/locale_pt-PT.ini +++ b/options/locale/locale_pt-PT.ini @@ -1722,8 +1722,8 @@ pulls.nothing_to_compare_have_tag=O ramo/etiqueta escolhidos são iguais. pulls.nothing_to_compare_and_allow_empty_pr=Estes ramos são iguais. Este pedido de integração ficará vazio. pulls.has_pull_request=`Já existe um pedido de integração entre estes ramos: %[2]s#%[3]d` pulls.create=Criar um pedido de integração -pulls.title_desc=quer integrar %[1]d cometimento(s) do ramo %[2]s no ramo %[3]s -pulls.merged_title_desc=integrou %[1]d cometimento(s) do ramo %[2]s no ramo %[3]s %[4]s +pulls.title_desc_few=quer integrar %[1]d cometimento(s) do ramo %[2]s no ramo %[3]s +pulls.merged_title_desc_few=integrou %[1]d cometimento(s) do ramo %[2]s no ramo %[3]s %[4]s pulls.change_target_branch_at=`mudou o ramo de destino de %s para %s %s` pulls.tab_conversation=Diálogo pulls.tab_commits=Cometimentos diff --git a/options/locale/locale_ru-RU.ini b/options/locale/locale_ru-RU.ini index 997f2bf8b1..e355d4c9c9 100644 --- a/options/locale/locale_ru-RU.ini +++ b/options/locale/locale_ru-RU.ini @@ -1741,8 +1741,10 @@ pulls.nothing_to_compare=Нечего сравнивать, родительск pulls.nothing_to_compare_and_allow_empty_pr=Ветки идентичны. Этот PR будет пустым. pulls.has_pull_request=`Запрос на слияние этих веток уже существует: %[2]s#%[3]d` pulls.create=Создать запрос на слияние -pulls.title_desc=хочет влить %[1]d коммит(ов) из %[2]s в %[3]s -pulls.merged_title_desc=слито %[1]d коммит(ов) из %[2]s в %[3]s %[4]s +pulls.title_desc_one=хочет влить %[1]d коммит из %[2]s в %[3]s +pulls.title_desc_few=хочет влить %[1]d коммит(ов) из %[2]s в %[3]s +pulls.merged_title_desc_one=слит %[1]d коммит из %[2]s в %[3]s %[4]s +pulls.merged_title_desc_few=слито %[1]d коммит(ов) из %[2]s в %[3]s %[4]s pulls.change_target_branch_at=`изменил(а) целевую ветку с %s на %s %s` pulls.tab_conversation=Обсуждение pulls.tab_commits=Коммиты diff --git a/options/locale/locale_si-LK.ini b/options/locale/locale_si-LK.ini index 164c37bab6..7cb1768d22 100644 --- a/options/locale/locale_si-LK.ini +++ b/options/locale/locale_si-LK.ini @@ -1269,8 +1269,8 @@ pulls.nothing_to_compare=මෙම ශාඛා සමාන වේ. අදි pulls.nothing_to_compare_and_allow_empty_pr=මෙම ශාඛා සමාන වේ. මෙම මහජන සම්බන්ධතා හිස් වනු ඇත. pulls.has_pull_request=`මෙම ශාඛා අතර අදින්න ඉල්ලීම දැනටමත් පවතී: %[2]s #%[3]d` pulls.create=අදින්න ඉල්ලීම නිර්මාණය -pulls.title_desc=%[1]d සිට %[2]s දක්වා %[3]s -pulls.merged_title_desc=මර්ජ්%[1]d සිට %[2]s දක්වා %[3]s %[4]s +pulls.title_desc_few=%[1]d සිට %[2]s දක්වා %[3]s +pulls.merged_title_desc_few=මර්ජ්%[1]d සිට %[2]s දක්වා %[3]s %[4]s pulls.change_target_branch_at=`ඉලක්කගත ශාඛාව %s සිට %s %sදක්වා වෙනස් කර ඇත` pulls.tab_conversation=සංවාදය pulls.tab_commits=විවරයන් diff --git a/options/locale/locale_sv-SE.ini b/options/locale/locale_sv-SE.ini index ae581ce919..38382a6f66 100644 --- a/options/locale/locale_sv-SE.ini +++ b/options/locale/locale_sv-SE.ini @@ -1088,8 +1088,8 @@ pulls.filter_branch=Filtrera gren pulls.no_results=Inga resultat hittades. pulls.nothing_to_compare=Dessa brancher är ekvivalenta. Det finns ingen anledning att skapa en pull-request. pulls.create=Skapa Pullförfrågan -pulls.title_desc=vill sammanfoga %[1]d incheckningar från s[2]s in i %[3]s -pulls.merged_title_desc=sammanfogade %[1]d incheckningar från %[2]s in i %[3]s %[4]s +pulls.title_desc_few=vill sammanfoga %[1]d incheckningar från s[2]s in i %[3]s +pulls.merged_title_desc_few=sammanfogade %[1]d incheckningar från %[2]s in i %[3]s %[4]s pulls.change_target_branch_at=`ändrade mål-branch från %s till %s%s` pulls.tab_conversation=Konversation pulls.tab_commits=Incheckningar diff --git a/options/locale/locale_tr-TR.ini b/options/locale/locale_tr-TR.ini index 9e74145620..74ef77eb19 100644 --- a/options/locale/locale_tr-TR.ini +++ b/options/locale/locale_tr-TR.ini @@ -1712,8 +1712,8 @@ pulls.nothing_to_compare=Bu dallar eşit. Değişiklik isteği oluşturmaya gere pulls.nothing_to_compare_and_allow_empty_pr=Bu dallar eşittir. Bu Dİ boş olacak. pulls.has_pull_request=`Bu dallar arasında zaten bir değişiklik isteği var: %[2]s#%[3]d` pulls.create=Değişiklik İsteği Oluştur -pulls.title_desc=%[2]s içindeki %[1]d işlemeyi %[3]s ile birleştirmek istiyor -pulls.merged_title_desc=%[4]s %[2]s içindeki %[1]d işlemeyi %[3]s ile birleştirdi +pulls.title_desc_few=%[2]s içindeki %[1]d işlemeyi %[3]s ile birleştirmek istiyor +pulls.merged_title_desc_few=%[4]s %[2]s içindeki %[1]d işlemeyi %[3]s ile birleştirdi pulls.change_target_branch_at='hedef dal %s adresinden %s%s adresine değiştirildi' pulls.tab_conversation=Sohbet pulls.tab_commits=İşleme diff --git a/options/locale/locale_uk-UA.ini b/options/locale/locale_uk-UA.ini index bcc29b7f23..0a79e54010 100644 --- a/options/locale/locale_uk-UA.ini +++ b/options/locale/locale_uk-UA.ini @@ -1385,8 +1385,8 @@ pulls.nothing_to_compare=Ці гілки однакові. Немає необх pulls.nothing_to_compare_and_allow_empty_pr=Одинакові гілки. Цей PR буде порожнім. pulls.has_pull_request=`Запит злиття для цих гілок вже існує: %[2]s#%[3]d` pulls.create=Створити запит на злиття -pulls.title_desc=хоче злити %[1]d комітів з %[2]s в %[3]s -pulls.merged_title_desc=злито %[1]d комітів з %[2]s до %[3]s %[4]s +pulls.title_desc_few=хоче злити %[1]d комітів з %[2]s в %[3]s +pulls.merged_title_desc_few=злито %[1]d комітів з %[2]s до %[3]s %[4]s pulls.change_target_branch_at=`змінена цільова гілка з %s на %s %s` pulls.tab_conversation=Обговорення pulls.tab_commits=Коміти diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 826e211ccd..bc768afc6f 100644 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -1771,8 +1771,8 @@ pulls.nothing_to_compare_have_tag=所选分支/标签相同。 pulls.nothing_to_compare_and_allow_empty_pr=这些分支是相等的,此合并请求将为空。 pulls.has_pull_request=这些分支之间的合并请求已存在: %[2]s#%[3]d pulls.create=创建合并请求 -pulls.title_desc=请求将 %[1]d 次代码提交从 %[2]s 合并至 %[3]s -pulls.merged_title_desc=于 %[4]s 将 %[1]d 次代码提交从 %[2]s合并至 %[3]s +pulls.title_desc_few=请求将 %[1]d 次代码提交从 %[2]s 合并至 %[3]s +pulls.merged_title_desc_few=于 %[4]s 将 %[1]d 次代码提交从 %[2]s合并至 %[3]s pulls.change_target_branch_at=将目标分支从 %s 更改为 %s %s pulls.tab_conversation=对话内容 pulls.tab_commits=代码提交 diff --git a/options/locale/locale_zh-HK.ini b/options/locale/locale_zh-HK.ini index 289a3e7b5d..5c1e234392 100644 --- a/options/locale/locale_zh-HK.ini +++ b/options/locale/locale_zh-HK.ini @@ -484,7 +484,7 @@ pulls.compare_changes=建立合併請求 pulls.filter_branch=過濾分支 pulls.no_results=未找到結果 pulls.create=建立合併請求 -pulls.merged_title_desc=於 %[4]s 將 %[1]d 次代碼提交從 %[2]s合併至 %[3]s +pulls.merged_title_desc_few=於 %[4]s 將 %[1]d 次代碼提交從 %[2]s合併至 %[3]s pulls.tab_conversation=對話內容 pulls.tab_commits=程式碼提交 pulls.reopen_to_merge=請重新開啟合併請求來完成合併操作。 diff --git a/options/locale/locale_zh-TW.ini b/options/locale/locale_zh-TW.ini index 45f6674ff8..5bfff77fd2 100644 --- a/options/locale/locale_zh-TW.ini +++ b/options/locale/locale_zh-TW.ini @@ -1592,8 +1592,8 @@ pulls.nothing_to_compare=這些分支的內容相同,無需建立合併請求 pulls.nothing_to_compare_and_allow_empty_pr=這些分支的內容相同,此合併請求將會是空白的。 pulls.has_pull_request=`已有介於這些分支間的合併請求:%[2]s#%[3]d` pulls.create=建立合併請求 -pulls.title_desc=請求將 %[1]d 次程式碼提交從 %[2]s 合併至 %[3]s -pulls.merged_title_desc=將 %[1]d 次提交從 %[2]s 合併至 %[3]s %[4]s +pulls.title_desc_few=請求將 %[1]d 次程式碼提交從 %[2]s 合併至 %[3]s +pulls.merged_title_desc_few=將 %[1]d 次提交從 %[2]s 合併至 %[3]s %[4]s pulls.change_target_branch_at=`將目標分支從 %s 更改為 %s %s` pulls.tab_conversation=對話內容 pulls.tab_commits=程式碼提交 diff --git a/templates/repo/issue/view_title.tmpl b/templates/repo/issue/view_title.tmpl index 339def894c..764a8b01ab 100644 --- a/templates/repo/issue/view_title.tmpl +++ b/templates/repo/issue/view_title.tmpl @@ -58,18 +58,18 @@ {{$mergedStr:= TimeSinceUnix .Issue.PullRequest.MergedUnix ctx.Locale}} {{if .Issue.OriginalAuthor}} {{.Issue.OriginalAuthor}} - {{ctx.Locale.Tr "repo.pulls.merged_title_desc" .NumCommits $headHref $baseHref $mergedStr}} + {{ctx.Locale.TrN .NumCommits "repo.pulls.merged_title_desc_one" "repo.pulls.merged_title_desc_few" .NumCommits $headHref $baseHref $mergedStr}} {{else}} {{.Issue.PullRequest.Merger.GetDisplayName}} - {{ctx.Locale.Tr "repo.pulls.merged_title_desc" .NumCommits $headHref $baseHref $mergedStr}} + {{ctx.Locale.TrN .NumCommits "repo.pulls.merged_title_desc_one" "repo.pulls.merged_title_desc_few" .NumCommits $headHref $baseHref $mergedStr}} {{end}} {{else}} {{if .Issue.OriginalAuthor}} - {{.Issue.OriginalAuthor}} {{ctx.Locale.Tr "repo.pulls.title_desc" .NumCommits $headHref $baseHref}} + {{.Issue.OriginalAuthor}} {{ctx.Locale.TrN .NumCommits "repo.pulls.title_desc_one" "repo.pulls.title_desc_few" .NumCommits $headHref $baseHref}} {{else}} {{.Issue.Poster.GetDisplayName}} - {{ctx.Locale.Tr "repo.pulls.title_desc" .NumCommits $headHref $baseHref}} + {{ctx.Locale.TrN .NumCommits "repo.pulls.title_desc_one" "repo.pulls.title_desc_few" .NumCommits $headHref $baseHref}} {{end}} {{if .MadeUsingAGit}} From 60a9df1908ad861e0be1b2659b5827cb7b2ee3b6 Mon Sep 17 00:00:00 2001 From: 0ko <0ko@noreply.codeberg.org> Date: Thu, 21 Mar 2024 18:18:36 +0500 Subject: [PATCH 2/2] Add test for pull summary --- tests/integration/pull_summary_test.go | 65 ++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 tests/integration/pull_summary_test.go diff --git a/tests/integration/pull_summary_test.go b/tests/integration/pull_summary_test.go new file mode 100644 index 0000000000..75c12720bf --- /dev/null +++ b/tests/integration/pull_summary_test.go @@ -0,0 +1,65 @@ +// Copyright 2024 The Forgejo Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package integration + +import ( + "net/http" + "net/url" + "path" + "strings" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestPullSummaryCommits(t *testing.T) { + onGiteaRun(t, func(t *testing.T, u *url.URL) { + testUser := "user2" + testRepo := "repo1" + branchOld := "master" + branchNew := "new-branch" + session := loginUser(t, testUser) + + // Create a branch with commit, open a PR and see if the summary is displayed correctly for 1 commit + testEditFileToNewBranch(t, session, testUser, testRepo, branchOld, branchNew, "README.md", "test of pull summary") + url := path.Join(testUser, testRepo, "compare", branchOld+"..."+branchNew) + req := NewRequestWithValues(t, "POST", url, + map[string]string{ + "_csrf": GetCSRF(t, session, url), + "title": "1st pull request to test summary", + }, + ) + session.MakeRequest(t, req, http.StatusOK) + testPullSummaryCommits(t, session, testUser, testRepo, "6", "wants to merge 1 commit") + + // Merge the PR and see if the summary is displayed correctly for 1 commit + testPullMerge(t, session, testUser, testRepo, "6", "merge", true) + testPullSummaryCommits(t, session, testUser, testRepo, "6", "merged 1 commit") + + // Create a branch with 2 commits, open a PR and see if the summary is displayed correctly for 2 commits + testEditFileToNewBranch(t, session, testUser, testRepo, branchOld, branchNew, "README.md", "test of pull summary (the 2nd)") + testEditFile(t, session, testUser, testRepo, branchNew, "README.md", "test of pull summary (the 3rd)") + req = NewRequestWithValues(t, "POST", url, + map[string]string{ + "_csrf": GetCSRF(t, session, url), + "title": "2nd pull request to test summary", + }, + ) + session.MakeRequest(t, req, http.StatusOK) + testPullSummaryCommits(t, session, testUser, testRepo, "7", "wants to merge 2 commits") + + // Merge the PR and see if the summary is displayed correctly for 2 commits + testPullMerge(t, session, testUser, testRepo, "7", "merge", true) + testPullSummaryCommits(t, session, testUser, testRepo, "7", "merged 2 commits") + }) +} + +func testPullSummaryCommits(t *testing.T, session *TestSession, user, repo, pullNum, expectedSummary string) { + t.Helper() + req := NewRequest(t, "GET", path.Join(user, repo, "pulls", pullNum)) + resp := session.MakeRequest(t, req, http.StatusOK) + doc := NewHTMLParser(t, resp.Body) + text := strings.TrimSpace(doc.doc.Find(".pull-desc").Text()) + assert.Contains(t, text, expectedSummary) +}