Skip to content

Commit 3910077

Browse files
authored
Merge pull request #409 from paweljurczynski/master
feat: add polish translations
2 parents 521fd3f + 1916cda commit 3910077

File tree

4 files changed

+51
-2
lines changed

4 files changed

+51
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ module API. Options include:
157157
container: '#some-query-selector'; // container to attach to
158158
APIUrl: 'https://www.example.com/.netlify/functions/identity'; // Absolute url to endpoint. ONLY USE IN SPECIAL CASES!
159159
namePlaceholder: 'some-placeholder-for-Name'; // custom placeholder for name input form
160-
locale: 'en'; // language code for translations - available: en, fr, es, pt, hu - default to en
160+
locale: 'en'; // language code for translations - available: en, fr, es, pt, hu, pl - default to en
161161
}
162162
```
163163

src/translations/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import * as fr from "./fr.json";
33
import * as es from "./es.json";
44
import * as hu from "./hu.json";
55
import * as pt from "./pt.json";
6+
import * as pl from "./pl.json";
67

78
export const defaultLocale = "en";
8-
const translations = { en, fr, es, hu, pt };
9+
const translations = { en, fr, es, hu, pt, pl };
910

1011
export const getTranslation = (key, locale = defaultLocale) => {
1112
const translated = translations[locale] && translations[locale][key];

src/translations/index.test.js

+7
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ describe("translations", () => {
3333
expect(getTranslation("log_in", "pt")).toEqual("Entrar");
3434
});
3535

36+
it("should return translation for 'pl' locale", () => {
37+
const { getTranslation } = require("./");
38+
expect(getTranslation("log_in", "pl")).toEqual("Zaloguj się");
39+
});
40+
3641
it("should return key for non existing translation", () => {
3742
const { getTranslation } = require("./");
3843
expect(getTranslation("unknown_key")).toEqual("unknown_key");
@@ -44,12 +49,14 @@ describe("translations", () => {
4449
jest.mock("./hu.json", () => ({}));
4550
jest.mock("./es.json", () => ({}));
4651
jest.mock("./pt.json", () => ({}));
52+
jest.mock("./pl.json", () => ({}));
4753

4854
const { getTranslation } = require("./");
4955
expect(getTranslation("log_in")).toEqual("Log in");
5056
expect(getTranslation("log_in", "fr")).toEqual("Log in");
5157
expect(getTranslation("log_in", "hu")).toEqual("Log in");
5258
expect(getTranslation("log_in", "es")).toEqual("Log in");
5359
expect(getTranslation("log_in", "pt")).toEqual("Log in");
60+
expect(getTranslation("log_in", "pl")).toEqual("Log in");
5461
});
5562
});

src/translations/pl.json

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"log_in": "Zaloguj się",
3+
"log_out": "Wyloguj się",
4+
"logged_in_as": "Zaloguj jako",
5+
"logged_in": "Zalogowany",
6+
"logging_in": "Logowanie",
7+
"logging_out": "Wylogowywanie",
8+
"sign_up": "Zarejestruj się",
9+
"signing_up": "Rejestracja",
10+
"forgot_password": "Nie pamiętasz hasła?",
11+
"recover_password": "Resetuj hasło",
12+
"send_recovery_email": "Wyślij link do resetowania hasła",
13+
"sending_recovery_email": "Wysyłanie linku do resetowania hasła",
14+
"never_mind": "Nieistotne",
15+
"update_password": "Zaktualizuj hasło",
16+
"updating_password": "Aktualizowanie hasło",
17+
"complete_your_signup": "Dokończ rejestrację",
18+
"site_url_title": "Ustawienia strony",
19+
"site_url_link_text": "Usuń adres localhost",
20+
"site_url_message": "Wygląda na to że został uruchomiony lokalny serwer. Wprowadź adres Twojej strony na Netlify.",
21+
"site_url_label": "Wprowadz adres strony na Netlify",
22+
"site_url_placeholder": "Adres Twojej strony na Netlify",
23+
"site_url_submit": "Ustaw adres strony",
24+
"message_confirm": "Potwierdzenie zostało wysłane na Twój adres email. Kliknij w link w wiadomości aby kontunuować.",
25+
"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.",
26+
"message_email_changed": "Twój adres email został zaktualizowany!",
27+
"message_verfication_error": "Wystąpił błąd podczas weryfikcacji Twoje konta. Spróbuj ponownie lub skontaktuj się z administratorem,",
28+
"message_signup_disabled": "Publiczna rejestracja jest wyłączona. Skontaktuj się z administratorem by uzyskać zaproszenie.",
29+
"form_name_placeholder": "Imię",
30+
"form_email_label": "Wprowadź Twój adres email",
31+
"form_name_label": "Wprowadź Twoje imię",
32+
"form_email_placeholder": "Email",
33+
"form_password_label": "Wprowadź twoje hasło",
34+
"form_password_placeholder": "Hasło",
35+
"coded_by": "Coded by Netlify",
36+
"continue_with": "Kontynuuj z",
37+
"No user found with this email": "Nie znaleziono użytkownika o tym adresie",
38+
"Invalid Password": "Hasło nieprawidłowe",
39+
"Email not confirmed": "Email nie został potwierdzony",
40+
"User not found": "Nie znaleziono użytkownika"
41+
}

0 commit comments

Comments
 (0)