diff --git a/README.md b/README.md index 7266fbeae..d7dfb570f 100644 --- a/README.md +++ b/README.md @@ -157,7 +157,7 @@ module API. Options include: container: '#some-query-selector'; // container to attach to APIUrl: 'https://www.example.com/.netlify/functions/identity'; // Absolute url to endpoint. ONLY USE IN SPECIAL CASES! namePlaceholder: 'some-placeholder-for-Name'; // custom placeholder for name input form - locale: 'en'; // language code for translations - available: en, fr, es, pt, hu - default to en + locale: 'en'; // language code for translations - available: en, fr, es, pt, hu, pl - default to en } ``` diff --git a/src/translations/index.js b/src/translations/index.js index 55b78da7d..6df41b3b8 100644 --- a/src/translations/index.js +++ b/src/translations/index.js @@ -3,9 +3,10 @@ import * as fr from "./fr.json"; import * as es from "./es.json"; import * as hu from "./hu.json"; import * as pt from "./pt.json"; +import * as pl from "./pl.json"; export const defaultLocale = "en"; -const translations = { en, fr, es, hu, pt }; +const translations = { en, fr, es, hu, pt, pl }; export const getTranslation = (key, locale = defaultLocale) => { const translated = translations[locale] && translations[locale][key]; diff --git a/src/translations/index.test.js b/src/translations/index.test.js index 7937a6cce..1f8db3213 100644 --- a/src/translations/index.test.js +++ b/src/translations/index.test.js @@ -33,6 +33,11 @@ describe("translations", () => { expect(getTranslation("log_in", "pt")).toEqual("Entrar"); }); + it("should return translation for 'pl' locale", () => { + const { getTranslation } = require("./"); + expect(getTranslation("log_in", "pl")).toEqual("Zaloguj się"); + }); + it("should return key for non existing translation", () => { const { getTranslation } = require("./"); expect(getTranslation("unknown_key")).toEqual("unknown_key"); @@ -44,6 +49,7 @@ describe("translations", () => { jest.mock("./hu.json", () => ({})); jest.mock("./es.json", () => ({})); jest.mock("./pt.json", () => ({})); + jest.mock("./pl.json", () => ({})); const { getTranslation } = require("./"); expect(getTranslation("log_in")).toEqual("Log in"); @@ -51,5 +57,6 @@ describe("translations", () => { expect(getTranslation("log_in", "hu")).toEqual("Log in"); expect(getTranslation("log_in", "es")).toEqual("Log in"); expect(getTranslation("log_in", "pt")).toEqual("Log in"); + expect(getTranslation("log_in", "pl")).toEqual("Log in"); }); }); diff --git a/src/translations/pl.json b/src/translations/pl.json new file mode 100644 index 000000000..c1ff5ecb3 --- /dev/null +++ b/src/translations/pl.json @@ -0,0 +1,41 @@ +{ + "log_in": "Zaloguj się", + "log_out": "Wyloguj się", + "logged_in_as": "Zaloguj jako", + "logged_in": "Zalogowany", + "logging_in": "Logowanie", + "logging_out": "Wylogowywanie", + "sign_up": "Zarejestruj się", + "signing_up": "Rejestracja", + "forgot_password": "Nie pamiętasz hasła?", + "recover_password": "Resetuj hasło", + "send_recovery_email": "Wyślij link do resetowania hasła", + "sending_recovery_email": "Wysyłanie linku do resetowania hasła", + "never_mind": "Nieistotne", + "update_password": "Zaktualizuj hasło", + "updating_password": "Aktualizowanie hasło", + "complete_your_signup": "Dokończ rejestrację", + "site_url_title": "Ustawienia strony", + "site_url_link_text": "Usuń adres localhost", + "site_url_message": "Wygląda na to że został uruchomiony lokalny serwer. Wprowadź adres Twojej strony na Netlify.", + "site_url_label": "Wprowadz adres strony na Netlify", + "site_url_placeholder": "Adres Twojej strony na Netlify", + "site_url_submit": "Ustaw adres strony", + "message_confirm": "Potwierdzenie zostało wysłane na Twój adres email. Kliknij w link w wiadomości aby kontunuować.", + "message_password_mail": "Wysłaliśmy link resetujący hasło na Twój adres email. Klknij w link w wiadomości aby zresetować hasło.", + "message_email_changed": "Twój adres email został zaktualizowany!", + "message_verfication_error": "Wystąpił błąd podczas weryfikcacji Twoje konta. Spróbuj ponownie lub skontaktuj się z administratorem,", + "message_signup_disabled": "Publiczna rejestracja jest wyłączona. Skontaktuj się z administratorem by uzyskać zaproszenie.", + "form_name_placeholder": "Imię", + "form_email_label": "Wprowadź Twój adres email", + "form_name_label": "Wprowadź Twoje imię", + "form_email_placeholder": "Email", + "form_password_label": "Wprowadź twoje hasło", + "form_password_placeholder": "Hasło", + "coded_by": "Coded by Netlify", + "continue_with": "Kontynuuj z", + "No user found with this email": "Nie znaleziono użytkownika o tym adresie", + "Invalid Password": "Hasło nieprawidłowe", + "Email not confirmed": "Email nie został potwierdzony", + "User not found": "Nie znaleziono użytkownika" +}