From c09cd6bd430707b272e5d4e6352d046af7a7cbf2 Mon Sep 17 00:00:00 2001 From: XlebyllleK <96723939+XlebyllleK@users.noreply.github.com> Date: Sun, 12 Jan 2025 19:37:36 +0200 Subject: [PATCH] Add Polish language support --- src/i18n.tsx | 8 ++++++++ src/locales/pl.tsx | 50 ++++++++++++++++++++++++++++++++++++++++++++++ src/types.ts | 3 ++- 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 src/locales/pl.tsx diff --git a/src/i18n.tsx b/src/i18n.tsx index 621cba2..2969c9e 100644 --- a/src/i18n.tsx +++ b/src/i18n.tsx @@ -13,6 +13,10 @@ import { UKRAINIAN } from './locales/uk'; +import { + POLISH +} from './locales/pl'; + const resources = { en: { translation: ENGLISH @@ -20,6 +24,10 @@ const resources = { uk: { translation: UKRAINIAN + }, + + pl: { + translation: POLISH } }; diff --git a/src/locales/pl.tsx b/src/locales/pl.tsx new file mode 100644 index 0000000..dc52127 --- /dev/null +++ b/src/locales/pl.tsx @@ -0,0 +1,50 @@ +export const POLISH = { + // src/components/Header.tsx + Header: { + "all-repositories": "Wszystkie repozytoria" + }, + + // src/components/InstallGuide.tsx + InstallGuide: { + "installation-command": "Polecenie instalacji", + + "copy": { + "prompt": "Skopiuj do schowka", + "success": "Skopiowano!" + } + }, + + // src/components/Logo.tsx + Logo: { + "title": "Lista pakietów Snigdha OS", + "description": "Przeglądaj i wyszukuj w oficjalnym repozytorium pakietów Snigdha OS", + }, + + // src/components/PackageCard.tsx + PackageCard: { + "show-installation": "Pokaż instalację", + "hide-installation": "Ukryj instalację" + }, + + // src/components/SearchBar.tsx + SearchBar: { + "placeholder": "Szukaj pakietów..." + }, + + // src/App.tsx + App: { + "package_count": { + "single": "Wyświetlanie {{count}} pakietu", + "multiple": "Wyświetlanie {{count}} pakietów", + "plural": "Wyświetlanie {{count}} pakietów", + }, + + error: { + "fetching-packages": "Wystąpił błąd podczas pobierania pakietów: {{error}}", + "retry-fetching-packages": "Spróbuj ponownie" + }, + + "no-packages-found": "Nie znaleziono pakietów odpowiadających Twojemu wyszukiwaniu.", + "footer": "Źródło danych:" + } +}; diff --git a/src/types.ts b/src/types.ts index efff439..a71be4e 100644 --- a/src/types.ts +++ b/src/types.ts @@ -13,7 +13,8 @@ export type Theme = ('light' | 'dark'); // Enumeration of supported languages export enum Languages { EN = "English", - UK = "Українська" + UK = "Українська", + PL = "Polski" } // Interface representing a single package