fix indentation, tests & unify plural forms

command used was:
jq --indent 4 '(.. | select(type=="array")) |= . + [(.[-1:][] | sub("3rd";"4th")),(.[-1:][] | sub("3rd";"5th"))]' i18n/pl.json > /tmp/pl.json

test fix & plural unification was done manually, also cross-checking with online translation services
This commit is contained in:
El RIDO
2025-10-06 11:40:28 +02:00
parent d27f4fd2e4
commit 4cd1770c76
2 changed files with 69 additions and 42 deletions

View File

@@ -9,9 +9,11 @@
"Please wait %d seconds between each post.": [ "Please wait %d seconds between each post.": [
"Poczekaj %d sekundę przed kolejnym wklejeniem.", "Poczekaj %d sekundę przed kolejnym wklejeniem.",
"Poczekaj %d sekundy przed kolejnym wklejeniem.", "Poczekaj %d sekundy przed kolejnym wklejeniem.",
"Poczekaj %d sekund przed kolejnym wklejeniem.",
"Poczekaj %d sekund przed kolejnym wklejeniem.",
"Poczekaj %d sekund przed kolejnym wklejeniem." "Poczekaj %d sekund przed kolejnym wklejeniem."
], ],
"Document is limited to %s of encrypted data.": "Dokument jest ograniczony do %s zaszyfrowanych danych.", "Document is limited to %s of encrypted data.": "Dokument jest ograniczony do %s zaszyfrowanych danych.",
"Invalid data.": "Nieprawidłowe dane.", "Invalid data.": "Nieprawidłowe dane.",
"You are unlucky. Try again.": "Miałeś pecha — spróbuj ponownie.", "You are unlucky. Try again.": "Miałeś pecha — spróbuj ponownie.",
"Error saving comment. Sorry.": "Błąd podczas zapisywania komentarza.", "Error saving comment. Sorry.": "Błąd podczas zapisywania komentarza.",
@@ -32,16 +34,20 @@
"Password (recommended)": "Hasło (opcjonalnie, zalecane)", "Password (recommended)": "Hasło (opcjonalnie, zalecane)",
"Discussion": "Dyskusja", "Discussion": "Dyskusja",
"Toggle navigation": "Przełącz nawigację", "Toggle navigation": "Przełącz nawigację",
"%d seconds": [ "%d seconds": [
"%d second", "%d sekonda",
"%d second", "%d sekondy",
"%d second", "%d sekond",
"%d second", "%d sekond",
"%d second", "%d sekond",
"%d second" "%d sekond",
"%d sekond",
"%d sekond"
], ],
"%d minutes": [ "%d minutes": [
"%d minuta", "%d minuta",
"%d minuty",
"%d minut",
"%d minut", "%d minut",
"%d minut", "%d minut",
"%d minut", "%d minut",
@@ -50,68 +56,89 @@
], ],
"%d hours": [ "%d hours": [
"%d godzina", "%d godzina",
"%d godzina", "%d godziny",
"%d godzinę", "%d godzin",
"%d godzinę", "%d godzin",
"%d godzinę", "%d godzin",
"%d godzinę" "%d godzin",
"%d godzin",
"%d godzin"
], ],
"%d days": [ "%d days": [
"%d dzień", "%d dzień",
"%d dzień", "%d dni",
"%d dzień", "%d dni",
"%d dzień", "%d dni",
"%d dzień", "%d dni",
"%d dzień" "%d dni",
"%d dni",
"%d dni"
], ],
"%d weeks": [ "%d weeks": [
"%d tydzień", "%d tydzień",
"%d tydzień", "%d tydgodnie",
"%d tydzień", "%d tydgodni",
"%d tydzień", "%d tydgodni",
"%d tydzień", "%d tydgodni",
"%d tydzień" "%d tydgodni",
"%d tydgodni",
"%d tydgodni"
], ],
"%d months": [ "%d months": [
"%d miesiąc", "%d miesiąc",
"%d miesiąc", "%d miesiące",
"%d miesiąc", "%d miesiący",
"%d miesiąc", "%d miesiący",
"%d miesiąc", "%d miesiący",
"%d miesiąc" "%d miesiący",
"%d miesiący",
"%d miesiący"
], ],
"%d years": [ "%d years": [
"%d rok", "%d rok",
"%d rok", "%d lata",
"%d rok", "%d lat",
"%d rok", "%d lat",
"%d rok", "%d lat",
"%d rok" "%d lat",
"%d lat",
"%d lat"
], ],
"Never": "Nigdy", "Never": "Nigdy",
"Note: This is a test service: Data may be deleted anytime. Kittens will die if you abuse this service.": "Uwaga: to usługa testowa — dane mogą zostać usunięte w dowolnym momencie. Nie nadużywaj jej, bo ucierpią kotki 🐱.", "Note: This is a test service: Data may be deleted anytime. Kittens will die if you abuse this service.": "Uwaga: to usługa testowa — dane mogą zostać usunięte w dowolnym momencie. Nie nadużywaj jej, bo ucierpią kotki 🐱.",
"This document will expire in %d seconds.": [ "This document will expire in %d seconds.": [
"Ten dokument wygaśnie za %d sekundę.", "Ten dokument wygaśnie za sekundę.",
"Ten dokument wygaśnie za %d sekundy.", "Ten dokument wygaśnie za %d sekundy.",
"Ten dokument wygaśnie za %d sekund.",
"Ten dokument wygaśnie za %d sekund.",
"Ten dokument wygaśnie za %d sekund." "Ten dokument wygaśnie za %d sekund."
], ],
"This document will expire in %d minutes.": [ "This document will expire in %d minutes.": [
"Ten dokument wygaśnie za %d minutę.", "Ten dokument wygaśnie za minutę.",
"Ten dokument wygaśnie za %d minuty.", "Ten dokument wygaśnie za %d minuty.",
"Ten dokument wygaśnie za %d minut.",
"Ten dokument wygaśnie za %d minut.",
"Ten dokument wygaśnie za %d minut." "Ten dokument wygaśnie za %d minut."
], ],
"This document will expire in %d hours.": [ "This document will expire in %d hours.": [
"Ten dokument wygaśnie za godzinę.", "Ten dokument wygaśnie za godzinę.",
"Ten dokument wygaśnie za %d godziny.", "Ten dokument wygaśnie za %d godziny.",
"Ten dokument wygaśnie za %d godzin.",
"Ten dokument wygaśnie za %d godzin.",
"Ten dokument wygaśnie za %d godzin." "Ten dokument wygaśnie za %d godzin."
], ],
"This document will expire in %d days.": [ "This document will expire in %d days.": [
"Ten dokument wygaśnie za %d dzień.", "Ten dokument wygaśnie za dzień.",
"Ten dokument wygaśnie za %d dni.",
"Ten dokument wygaśnie za %d dni.",
"Ten dokument wygaśnie za %d dni.",
"Ten dokument wygaśnie za %d dni." "Ten dokument wygaśnie za %d dni."
], ],
"This document will expire in %d months.": [ "This document will expire in %d months.": [
"Ten dokument wygaśnie za miesiąc.", "Ten dokument wygaśnie za miesiąc.",
"Ten dokument wygaśnie za %d miesiące.", "Ten dokument wygaśnie za %d miesiące.",
"Ten dokument wygaśnie za %d miesięcy.",
"Ten dokument wygaśnie za %d miesięcy.",
"Ten dokument wygaśnie za %d miesięcy." "Ten dokument wygaśnie za %d miesięcy."
], ],
"Please enter the password for this document:": "Podaj hasło do tego dokumentu:", "Please enter the password for this document:": "Podaj hasło do tego dokumentu:",

View File

@@ -114,13 +114,13 @@ class I18nTest extends TestCase
I18n::loadTranslations(); I18n::loadTranslations();
$this->assertEquals('pl', I18n::getLanguage(), 'browser language pl'); $this->assertEquals('pl', I18n::getLanguage(), 'browser language pl');
$this->assertEquals('1 godzina', I18n::_('%d hours', 1), '1 hour in Polish'); $this->assertEquals('1 godzina', I18n::_('%d hours', 1), '1 hour in Polish');
$this->assertEquals('2 godzina', I18n::_('%d hours', 2), '2 hours in Polish'); $this->assertEquals('2 godziny', I18n::_('%d hours', 2), '2 hours in Polish');
$this->assertEquals('12 godzinę', I18n::_('%d hours', 12), '12 hours in Polish'); $this->assertEquals('12 godzin', I18n::_('%d hours', 12), '12 hours in Polish');
$this->assertEquals('22 godzina', I18n::_('%d hours', 22), '22 hours in Polish'); $this->assertEquals('22 godziny', I18n::_('%d hours', 22), '22 hours in Polish');
$this->assertEquals('1 minut', I18n::_('%d minutes', 1), '1 minute in Polish'); $this->assertEquals('1 minuta', I18n::_('%d minutes', 1), '1 minute in Polish');
$this->assertEquals('3 minut', I18n::_('%d minutes', 3), '3 minutes in Polish'); $this->assertEquals('3 minuty', I18n::_('%d minutes', 3), '3 minutes in Polish');
$this->assertEquals('13 minut', I18n::_('%d minutes', 13), '13 minutes in Polish'); $this->assertEquals('13 minut', I18n::_('%d minutes', 13), '13 minutes in Polish');
$this->assertEquals('23 minut', I18n::_('%d minutes', 23), '23 minutes in Polish'); $this->assertEquals('23 minuty', I18n::_('%d minutes', 23), '23 minutes in Polish');
} }
public function testBrowserLanguageRuDetection() public function testBrowserLanguageRuDetection()