From 1a1441baf5a917c6a456ed2bccfcabf15b673bb1 Mon Sep 17 00:00:00 2001 From: Mateusz Grotek Date: Thu, 5 Dec 2024 13:39:33 +0000 Subject: [PATCH] Restrict "and" translation to certain languages --- config/locales/ar.yml | 2 +- config/locales/az.yml | 2 +- config/locales/be.yml | 2 +- config/locales/bg.yml | 2 +- config/locales/bn.yml | 2 +- config/locales/cs.yml | 2 +- config/locales/cy.yml | 2 +- config/locales/da.yml | 2 +- config/locales/dr.yml | 2 +- config/locales/el.yml | 2 +- config/locales/et.yml | 2 +- config/locales/fa.yml | 2 +- config/locales/fi.yml | 2 +- config/locales/gd.yml | 2 +- config/locales/gu.yml | 2 +- config/locales/he.yml | 2 +- config/locales/hi.yml | 2 +- config/locales/hr.yml | 2 +- config/locales/hu.yml | 2 +- config/locales/hy.yml | 2 +- config/locales/id.yml | 2 +- config/locales/is.yml | 2 +- config/locales/it.yml | 2 +- config/locales/ja.yml | 2 +- config/locales/ka.yml | 2 +- config/locales/kk.yml | 2 +- config/locales/ko.yml | 2 +- config/locales/lt.yml | 2 +- config/locales/lv.yml | 2 +- config/locales/ms.yml | 2 +- config/locales/mt.yml | 2 +- config/locales/nl.yml | 2 +- config/locales/no.yml | 2 +- config/locales/pa-pk.yml | 2 +- config/locales/pa.yml | 2 +- config/locales/ps.yml | 2 +- config/locales/pt.yml | 2 +- config/locales/ro.yml | 2 +- config/locales/ru.yml | 2 +- config/locales/si.yml | 2 +- config/locales/sk.yml | 2 +- config/locales/sl.yml | 2 +- config/locales/so.yml | 2 +- config/locales/sq.yml | 2 +- config/locales/sr.yml | 2 +- config/locales/sv.yml | 2 +- config/locales/sw.yml | 2 +- config/locales/ta.yml | 2 +- config/locales/th.yml | 2 +- config/locales/tk.yml | 2 +- config/locales/tr.yml | 2 +- config/locales/uk.yml | 2 +- config/locales/ur.yml | 2 +- config/locales/uz.yml | 2 +- config/locales/vi.yml | 2 +- config/locales/zh-hk.yml | 2 +- config/locales/zh-tw.yml | 2 +- config/locales/zh.yml | 2 +- spec/components/metadata_spec.rb | 16 ++++++++++++++++ 59 files changed, 74 insertions(+), 58 deletions(-) diff --git a/config/locales/ar.yml b/config/locales/ar.yml index 1cd242fb68..d256e86b0b 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -137,7 +137,7 @@ ar: navigation_search_subheading: search_text: metadata: - and: و + and: from: من history: المحفوظات last_updated: التحديث الأخير diff --git a/config/locales/az.yml b/config/locales/az.yml index 5e6f532a58..41ebadd774 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -134,7 +134,7 @@ az: navigation_search_subheading: search_text: metadata: - and: və + and: from: "...dan (dən)" history: Tarix last_updated: Son yenilənmə diff --git a/config/locales/be.yml b/config/locales/be.yml index d2d5b6870b..4ae6eb9ec0 100644 --- a/config/locales/be.yml +++ b/config/locales/be.yml @@ -140,7 +140,7 @@ be: navigation_search_subheading: search_text: metadata: - and: і + and: from: З history: Гiсторыя last_updated: Апошняе абнаўленне diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 21c84db62f..8a108d7933 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -138,7 +138,7 @@ bg: navigation_search_subheading: search_text: metadata: - and: и + and: from: От history: История last_updated: Последно актуализирани diff --git a/config/locales/bn.yml b/config/locales/bn.yml index e56c7d7816..82ee0aa438 100644 --- a/config/locales/bn.yml +++ b/config/locales/bn.yml @@ -135,7 +135,7 @@ bn: navigation_search_subheading: search_text: metadata: - and: এবং + and: from: থেকে history: ইতিহাস last_updated: সর্বশেষ আপডেট করা হয়েছে diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 23d5c66414..40f8b20620 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -139,7 +139,7 @@ cs: navigation_search_subheading: search_text: metadata: - and: a + and: from: 'Komu I:' history: Historie last_updated: 'Poslední aktualizace:' diff --git a/config/locales/cy.yml b/config/locales/cy.yml index 1b63a1cc89..a5e6a6cb76 100644 --- a/config/locales/cy.yml +++ b/config/locales/cy.yml @@ -138,7 +138,7 @@ cy: navigation_search_subheading: search_text: metadata: - and: a + and: from: Gan history: Hanes last_updated: Diweddarwyd ddiwethaf diff --git a/config/locales/da.yml b/config/locales/da.yml index 7569c0704d..0926a8392e 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -135,7 +135,7 @@ da: navigation_search_subheading: search_text: metadata: - and: og + and: from: Fra history: Historie last_updated: Sidst opdateret diff --git a/config/locales/dr.yml b/config/locales/dr.yml index da01823d86..0d3856061a 100644 --- a/config/locales/dr.yml +++ b/config/locales/dr.yml @@ -136,7 +136,7 @@ dr: navigation_search_subheading: search_text: metadata: - and: و + and: from: از history: پیشینهء جستجو last_updated: آخرین آپدیت diff --git a/config/locales/el.yml b/config/locales/el.yml index 74282fca58..dd6019ca89 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -134,7 +134,7 @@ el: navigation_search_subheading: search_text: metadata: - and: και + and: from: Από history: Ιστορικό last_updated: Τελευταία ενημέρωση diff --git a/config/locales/et.yml b/config/locales/et.yml index d60132ea11..3f7904d286 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -137,7 +137,7 @@ et: navigation_search_subheading: search_text: metadata: - and: ja + and: from: Alates history: Ajalugu last_updated: Viimati värskendatud diff --git a/config/locales/fa.yml b/config/locales/fa.yml index d23897b012..bcb754647d 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -133,7 +133,7 @@ fa: navigation_search_subheading: search_text: metadata: - and: و + and: from: از history: تاریخچه last_updated: آخرین بروزرسانی diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 1125d65041..0c68504070 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -136,7 +136,7 @@ fi: navigation_search_subheading: search_text: metadata: - and: ja + and: from: Alkaen history: Historia last_updated: Viimeksi päivitetty diff --git a/config/locales/gd.yml b/config/locales/gd.yml index fa80f5dd35..fec02fcf92 100644 --- a/config/locales/gd.yml +++ b/config/locales/gd.yml @@ -136,7 +136,7 @@ gd: navigation_search_subheading: search_text: metadata: - and: agus + and: from: De history: Stairiúil last_updated: Nuashonrú deireanach diff --git a/config/locales/gu.yml b/config/locales/gu.yml index 7684f584b7..a7b7f56f07 100644 --- a/config/locales/gu.yml +++ b/config/locales/gu.yml @@ -134,7 +134,7 @@ gu: navigation_search_subheading: search_text: metadata: - and: અને + and: from: થી history: હિસ્ટરી last_updated: છેલ્લે અપડેટ કરવામાં આવ્યું diff --git a/config/locales/he.yml b/config/locales/he.yml index 6735b7aabf..5853491375 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -134,7 +134,7 @@ he: navigation_search_subheading: search_text: metadata: - and: ו + and: from: מ- history: היסטוריה last_updated: עדכון אחרון diff --git a/config/locales/hi.yml b/config/locales/hi.yml index 67fe81773f..7a8ed49371 100644 --- a/config/locales/hi.yml +++ b/config/locales/hi.yml @@ -134,7 +134,7 @@ hi: navigation_search_subheading: search_text: metadata: - and: और + and: from: से history: इतिहास last_updated: आखरी अपडेट diff --git a/config/locales/hr.yml b/config/locales/hr.yml index 47101f1445..e7971313f2 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -135,7 +135,7 @@ hr: navigation_search_subheading: search_text: metadata: - and: i + and: from: Iz history: Istorija last_updated: Posljednji put ažurirano diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 6d021430e8..f385436f49 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -137,7 +137,7 @@ hu: navigation_search_subheading: search_text: metadata: - and: és + and: from: Feladó history: Előzmények last_updated: Utolsó frissítés diff --git a/config/locales/hy.yml b/config/locales/hy.yml index ba182e0a1f..27f4ddacb5 100644 --- a/config/locales/hy.yml +++ b/config/locales/hy.yml @@ -138,7 +138,7 @@ hy: navigation_search_subheading: search_text: metadata: - and: և + and: from: Ումից՝ history: Պատմություն last_updated: Վերջին անգամ թարմացվել է diff --git a/config/locales/id.yml b/config/locales/id.yml index 3711cbb9ad..e7ed79da1b 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -134,7 +134,7 @@ id: navigation_search_subheading: search_text: metadata: - and: dan + and: from: Dari history: Riwayat last_updated: Terakhir diperbarui diff --git a/config/locales/is.yml b/config/locales/is.yml index 3dc8272eed..addf04f07a 100644 --- a/config/locales/is.yml +++ b/config/locales/is.yml @@ -134,7 +134,7 @@ is: navigation_search_subheading: search_text: metadata: - and: og + and: from: Frá history: Saga last_updated: Síðast uppfært diff --git a/config/locales/it.yml b/config/locales/it.yml index 58b3a41da3..33514b9ae9 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -134,7 +134,7 @@ it: navigation_search_subheading: search_text: metadata: - and: e + and: from: Da history: Cronologia last_updated: Ultimo aggiornamento diff --git a/config/locales/ja.yml b/config/locales/ja.yml index cdd76e7678..de98f85877 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -130,7 +130,7 @@ ja: navigation_search_subheading: search_text: metadata: - and: および + and: from: から history: 歴史 last_updated: 最終更新 diff --git a/config/locales/ka.yml b/config/locales/ka.yml index c898dd396b..bd8fe522fe 100644 --- a/config/locales/ka.yml +++ b/config/locales/ka.yml @@ -137,7 +137,7 @@ ka: navigation_search_subheading: search_text: metadata: - and: და + and: from: დან history: ისტორია last_updated: ბოლო განახლება diff --git a/config/locales/kk.yml b/config/locales/kk.yml index 4525ac0933..63eec21b8e 100644 --- a/config/locales/kk.yml +++ b/config/locales/kk.yml @@ -134,7 +134,7 @@ kk: navigation_search_subheading: search_text: metadata: - and: және + and: from: Кімнен history: Журнал last_updated: Соңғы рет жаңартылды diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 47a0ccfe1b..cae52a674c 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -129,7 +129,7 @@ ko: navigation_search_subheading: search_text: metadata: - and: 그리고 + and: from: history: last_updated: diff --git a/config/locales/lt.yml b/config/locales/lt.yml index 2f7fd76cbb..cdedb86d62 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -139,7 +139,7 @@ lt: navigation_search_subheading: search_text: metadata: - and: ir + and: from: Nuo history: Istorija last_updated: Paskutinį kartą naujinta diff --git a/config/locales/lv.yml b/config/locales/lv.yml index 501a8e519d..43d0c888e6 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -138,7 +138,7 @@ lv: navigation_search_subheading: search_text: metadata: - and: un + and: from: 'No' history: Vēsture last_updated: Pēdējoreiz atjaunināts diff --git a/config/locales/ms.yml b/config/locales/ms.yml index 44a234870a..100d01cf02 100644 --- a/config/locales/ms.yml +++ b/config/locales/ms.yml @@ -133,7 +133,7 @@ ms: navigation_search_subheading: search_text: metadata: - and: dan + and: from: Daripada history: Sejarah last_updated: Kali terakhir dikemas kini diff --git a/config/locales/mt.yml b/config/locales/mt.yml index 7eaa3329dc..5fed8d2b03 100644 --- a/config/locales/mt.yml +++ b/config/locales/mt.yml @@ -136,7 +136,7 @@ mt: navigation_search_subheading: search_text: metadata: - and: u + and: from: Minn history: Storja last_updated: Aġġornat l-aħħar diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 8c539d45c8..c0ee246bc4 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -134,7 +134,7 @@ nl: navigation_search_subheading: search_text: metadata: - and: en + and: from: Van history: Geschiedenis last_updated: Laatst bijgewerkt diff --git a/config/locales/no.yml b/config/locales/no.yml index 4f26aac4b4..269da6799c 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -134,7 +134,7 @@ navigation_search_subheading: search_text: metadata: - and: og + and: from: Fra history: Historie last_updated: Sist oppdatert diff --git a/config/locales/pa-pk.yml b/config/locales/pa-pk.yml index 1c9cdebab9..54ed349e3c 100644 --- a/config/locales/pa-pk.yml +++ b/config/locales/pa-pk.yml @@ -130,7 +130,7 @@ pa-pk: navigation_search_subheading: search_text: metadata: - and: ہور + and: from: ایتھوں history: پچھلا کم last_updated: آخری دفعہ کدوں نویں گل دسی سی diff --git a/config/locales/pa.yml b/config/locales/pa.yml index 3156e44089..7b43d1e2f5 100644 --- a/config/locales/pa.yml +++ b/config/locales/pa.yml @@ -134,7 +134,7 @@ pa: navigation_search_subheading: search_text: metadata: - and: ਅਤੇ + and: from: ਤੋਂ history: ਇਤਿਹਾਸ last_updated: ਪਿਛਲੀ ਵਾਰ ਅਪਡੇਟ ਕੀਤਾ ਗਿਆ diff --git a/config/locales/ps.yml b/config/locales/ps.yml index 178fc4b86d..a9c82be466 100644 --- a/config/locales/ps.yml +++ b/config/locales/ps.yml @@ -131,7 +131,7 @@ ps: navigation_search_subheading: search_text: metadata: - and: او + and: from: له history: تاریخ last_updated: وروستی تازه شوی diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 1d7fddb9ad..755f3a7794 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -134,7 +134,7 @@ pt: navigation_search_subheading: search_text: metadata: - and: e + and: from: De history: Histórico last_updated: Última atualização diff --git a/config/locales/ro.yml b/config/locales/ro.yml index fef9317a21..d18e52e4c2 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -135,7 +135,7 @@ ro: navigation_search_subheading: search_text: metadata: - and: și + and: from: De la history: Istoric last_updated: Ultima actualizare diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 1bbff94389..e79f253d01 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -138,7 +138,7 @@ ru: navigation_search_subheading: search_text: metadata: - and: и + and: from: Из history: История last_updated: Последнее обновление diff --git a/config/locales/si.yml b/config/locales/si.yml index d28bfc70f7..07fe2f522d 100644 --- a/config/locales/si.yml +++ b/config/locales/si.yml @@ -134,7 +134,7 @@ si: navigation_search_subheading: search_text: metadata: - and: සහ + and: from: සිට history: ඉතිහාසය last_updated: අවසන් වරට යාවත්කාලීන කළේ diff --git a/config/locales/sk.yml b/config/locales/sk.yml index f5d68d7329..a0a8d60bb1 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -139,7 +139,7 @@ sk: navigation_search_subheading: search_text: metadata: - and: a + and: from: Od history: História last_updated: Posledná aktualizácia diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 584f7b83ac..c532386b4d 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -141,7 +141,7 @@ sl: navigation_search_subheading: search_text: metadata: - and: in + and: from: Od history: Zgodovina last_updated: Nazadnje posodobljeno diff --git a/config/locales/so.yml b/config/locales/so.yml index 0f14596639..8b57fce6fd 100644 --- a/config/locales/so.yml +++ b/config/locales/so.yml @@ -134,7 +134,7 @@ so: navigation_search_subheading: search_text: metadata: - and: iyo + and: from: Laga bilaabo history: Taariikhda last_updated: Cusboonaysiintii ugu dambaysay diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 3cc18ddd83..4f2999f3b1 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -134,7 +134,7 @@ sq: navigation_search_subheading: search_text: metadata: - and: dhe + and: from: Nga history: Historia last_updated: Përditësuar së fundmi diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 62b27335c3..2c6101671a 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -135,7 +135,7 @@ sr: navigation_search_subheading: search_text: metadata: - and: i + and: from: Od history: Istorija last_updated: Poslednje ažuriranje diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 4372ca8633..126265f5ca 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -134,7 +134,7 @@ sv: navigation_search_subheading: search_text: metadata: - and: och + and: from: Från history: Historia last_updated: Senast uppdaterad diff --git a/config/locales/sw.yml b/config/locales/sw.yml index 2e51603443..8b408689c5 100644 --- a/config/locales/sw.yml +++ b/config/locales/sw.yml @@ -134,7 +134,7 @@ sw: navigation_search_subheading: search_text: metadata: - and: na + and: from: Kuanzia history: Kumbukumbu last_updated: Ilisasishwa mara ya mwisho diff --git a/config/locales/ta.yml b/config/locales/ta.yml index 4fa7bad778..bc75c024ee 100644 --- a/config/locales/ta.yml +++ b/config/locales/ta.yml @@ -135,7 +135,7 @@ ta: navigation_search_subheading: search_text: metadata: - and: மற்றும் + and: from: இதிலிருந்து history: வரலாறு last_updated: கடைசியாகப் புதுப்பிக்கப்பட்டது diff --git a/config/locales/th.yml b/config/locales/th.yml index f0345057b2..451f45f29e 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -132,7 +132,7 @@ th: navigation_search_subheading: search_text: metadata: - and: และ + and: from: จาก history: ประวัติ last_updated: อัปเดตล่าสุด diff --git a/config/locales/tk.yml b/config/locales/tk.yml index 6c5877d74b..9e4461471c 100644 --- a/config/locales/tk.yml +++ b/config/locales/tk.yml @@ -135,7 +135,7 @@ tk: navigation_search_subheading: search_text: metadata: - and: we + and: from: "-dan" history: Taryh last_updated: Iň soňky täzelenme diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 58cde74a38..7f2efd573a 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -135,7 +135,7 @@ tr: navigation_search_subheading: search_text: metadata: - and: ve + and: from: Şuradan history: Geçmiş last_updated: Son güncelleme diff --git a/config/locales/uk.yml b/config/locales/uk.yml index e38eaa6f3a..9f3f9a3fdc 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -141,7 +141,7 @@ uk: navigation_search_subheading: search_text: metadata: - and: та + and: from: Від history: Історія last_updated: Останнє оновлення diff --git a/config/locales/ur.yml b/config/locales/ur.yml index 55c5f4223e..13f254059a 100644 --- a/config/locales/ur.yml +++ b/config/locales/ur.yml @@ -131,7 +131,7 @@ ur: navigation_search_subheading: search_text: metadata: - and: اور + and: from: از history: ہسٹری last_updated: آخری بار اپ ڈیٹ کردہ diff --git a/config/locales/uz.yml b/config/locales/uz.yml index bda02e1ccb..e141d284e4 100644 --- a/config/locales/uz.yml +++ b/config/locales/uz.yml @@ -136,7 +136,7 @@ uz: navigation_search_subheading: search_text: metadata: - and: ва + and: from: дан history: Тарих last_updated: Сўнгги янгиланиш diff --git a/config/locales/vi.yml b/config/locales/vi.yml index a30b49c587..68d7ac320a 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -133,7 +133,7 @@ vi: navigation_search_subheading: search_text: metadata: - and: và + and: from: Từ history: Lịch sử last_updated: Lần cập nhật gần đây nhất diff --git a/config/locales/zh-hk.yml b/config/locales/zh-hk.yml index 9b9f071bb5..c4d04dd28a 100644 --- a/config/locales/zh-hk.yml +++ b/config/locales/zh-hk.yml @@ -132,7 +132,7 @@ zh-hk: navigation_search_subheading: search_text: metadata: - and: 及 + and: from: 來自 history: 過往記錄 last_updated: 最近更新 diff --git a/config/locales/zh-tw.yml b/config/locales/zh-tw.yml index 908f9b9c79..2ea3bbc796 100644 --- a/config/locales/zh-tw.yml +++ b/config/locales/zh-tw.yml @@ -132,7 +132,7 @@ zh-tw: navigation_search_subheading: search_text: metadata: - and: 以及 + and: from: 從 history: 歷史 last_updated: 最新更新 diff --git a/config/locales/zh.yml b/config/locales/zh.yml index bd134ec0a0..00b944a0da 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -132,7 +132,7 @@ zh: navigation_search_subheading: search_text: metadata: - and: 和 + and: from: 从 history: 历史 last_updated: 上次更新 diff --git a/spec/components/metadata_spec.rb b/spec/components/metadata_spec.rb index a80b72b007..57f64ac6fe 100644 --- a/spec/components/metadata_spec.rb +++ b/spec/components/metadata_spec.rb @@ -78,6 +78,22 @@ def component_name end end + it "renders multiples as a single sentence (except history) in foreign language without translation of \"and\"" do + I18n.with_locale("ja") do + render_component( + from: %w[一 二], + part_of: %w[此れ 彼], + other: { + "関連項目": %w[a b c], + }, + ) + + assert_definition("から:", "一 and 二") + assert_definition("一部の:", "此れ and 彼") + assert_definition("関連項目:", "a, b and c") + end + end + it "long lists of metadata are truncated and the remainder hidden behind a toggle for from" do links = [ "Ministry of Defence",