Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/chat/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ export default defineConfig(({ mode }) => {
if (normalizedId.includes('libs/translations/src/languages/jpn')) {
return 'i18n-jpn';
}
if (normalizedId.includes('libs/translations/src/languages/pl')) {
return 'i18n-pl';
}
}
}
},
Expand Down
5 changes: 5 additions & 0 deletions libs/components/src/lib/components/SettingLanguage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ export const SettingLanguage = ({ menuIsOpen }: ISettingLanguageProps) => {
title: `${t('setting:language.japanese')}`,
value: 'jpn',
contributedBy: 'robits'
},
{
title: `${t('setting:language.polish')}`,
value: 'pl',
contributedBy: 'robits'
}
];
}, [t]);
Expand Down
23 changes: 20 additions & 3 deletions libs/translations/src/i18n.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import enTranslations from './languages/en/index';
import esTranslations from './languages/es/index';
import itTranslations from './languages/it/index';
import jpnTranslations from './languages/jpn/index';
import plTranslations from './languages/pl/index';
import ptTranslations from './languages/pt/index';
import ruTranslations from './languages/ru/index';
import ttTranslations from './languages/tt/index';
Expand All @@ -26,6 +27,7 @@ const timezoneDetector = {
storedLang === 'tt' ||
storedLang === 'pt' ||
storedLang === 'jpn' ||
storedLang === 'pl' ||
storedLang === 'it')
) {
return undefined;
Expand Down Expand Up @@ -59,12 +61,26 @@ const timezoneDetector = {
if (languageCode.startsWith('jpn')) {
return 'jpn';
}
if (languageCode.startsWith('pl')) {
return 'pl';
}
}

return undefined;
},
cacheUserLanguage(lng: string) {
if (lng && (lng === 'vi' || lng === 'en' || lng === 'ru' || lng === 'es' || lng === 'tt' || lng === 'pt' || lng === 'it' || lng === 'jpn')) {
if (
lng &&
(lng === 'vi' ||
lng === 'en' ||
lng === 'ru' ||
lng === 'es' ||
lng === 'tt' ||
lng === 'pt' ||
lng === 'it' ||
lng === 'jpn' ||
lng === 'pl')
) {
localStorage.setItem('i18nextLng', lng);
}
}
Expand All @@ -78,7 +94,7 @@ i18n.use(languageDetector)
.init({
defaultNS,
fallbackLng: 'en',
supportedLngs: ['en', 'vi', 'ru', 'es', 'tt', 'pt', 'it', 'jpn'],
supportedLngs: ['en', 'vi', 'ru', 'es', 'tt', 'pt', 'it', 'jpn', 'pl'],
resources: {
en: enTranslations,
vi: viTranslations,
Expand All @@ -87,7 +103,8 @@ i18n.use(languageDetector)
tt: ttTranslations,
pt: ptTranslations,
it: itTranslations,
jpn: jpnTranslations
jpn: jpnTranslations,
pl: plTranslations
},
detection: {
order: ['timezone', 'localStorage', 'navigator', 'htmlTag'],
Expand Down
5 changes: 4 additions & 1 deletion libs/translations/src/languages/en/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@
"tatar": "Tatarça",
"portuguese": "Português",
"italian": "Italiano",
"japanese": "日本語"
"japanese": "日本語",
"french": "Français",
"german": "Deutsch",
"polish": "Polski"
},
"voice": {
"title": "Voice",
Expand Down
144 changes: 144 additions & 0 deletions libs/translations/src/languages/pl/accountSetting.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
{
"myAccount": "Moje konto",
"editUserProfile": "Edytuj profil użytkownika",
"noDisplayName": "Nie dodałeś jeszcze nazwy wyświetlanej.",
"edit": "Edytuj",
"password": "Hasło",
"phoneNumber": "Numer telefonu",
"username": "Nazwa użytkownika",
"displayName": "Nazwa wyświetlana",
"users": "Użytkownicy",
"accountManagement": "Zarządzanie kontem",
"blockedUsers": "Zablokowani użytkownicy",
"disableAccount": "Wyłącz konto",
"deleteAccount": "Usuń konto",
"accountInformation": "Informacje o koncie",
"doNotHaveBlockedUser": "Nie masz zablokowanych użytkowników",
"setPassword": "Ustaw hasło",
"changePassword": "Zmień hasło",
"setEmail": "Ustaw email",
"changeEmail": "Zmień email",
"setPhoneNumber": "Ustaw numer telefonu",
"disableAccountAlert": {
"title": "Wyłącz konto",
"description": "Czy na pewno chcesz wyłączyć konto?",
"noConfirm": "Nie",
"yesConfirm": "Tak"
},
"deleteAccountAlert": {
"title": "Usuń konto",
"description": "Czy na pewno chcesz usunąć konto?",
"noConfirm": "Nie",
"yesConfirm": "Tak"
},
"setPasswordAccount": {
"linkEmailRequiredTitle": "Wymagane połączenie z emailem",
"linkEmailRequiredDescription": "Musisz połączyć email przed ustawieniem hasła",
"goTo": "Idź do",
"title": "Ustaw hasło",
"email": "Email",
"password": "Hasło",
"currentPassword": "Aktualne hasło",
"confirmPassword": "Potwierdź hasło",
"confirm": "Zapisz",
"changePassword": "Zmień hasło",
"description": "Twoje hasło musi mieć co najmniej 8 znaków i zawierać co najmniej jedną wielką literę, jedną małą literę, jedną cyfrę i jeden znak specjalny (np. !@#$%^&*).",
"error": {
"characters": "Hasło musi mieć co najmniej 8 znaków",
"uppercase": "Hasło musi zawierać co najmniej 1 wielką literę",
"lowercase": "Hasło musi zawierać co najmniej 1 małą literę",
"number": "Hasło musi zawierać co najmniej 1 cyfrę",
"symbol": "Hasło musi zawierać co najmniej 1 znak specjalny",
"notEqual": "Potwierdzenie hasła nie pasuje",
"samePass": "Nowe hasło nie może być takie samo jak stare",
"fillOldPass": "Wpisz obecne hasło.",
"updateFail": "Aktualizacja konta nie powiodła się.",
"createFail": "Ustawianie hasła nie powiodło się.",
"incorrectCurrent": "Aktualne hasło jest nieprawidłowe. Spróbuj ponownie"
},
"toast": {
"success": "Pomyślnie zaktualizowano hasło",
"error": "Aktualizacja hasła nie powiodła się"
},
"placeholder": {
"currentPassword": "Wpisz aktualne hasło",
"password": "Wpisz nowe hasło",
"confirmPassword": "Potwierdź nowe hasło"
}
},
"setPasswordModal": {
"title": "Ustaw hasło",
"description": "Proszę utworzyć nowe hasło dla swojego konta",
"emailPlaceholder": "twoj.email@example.com",
"loading": "Ładowanie...",
"close": "Zamknij"
},
"setPhoneModal": {
"title": "Ustaw numer telefonu",
"phoneNumber": "Numer telefonu",
"description": "Otrzymasz wiadomość SMS zawierającą kod weryfikacyjny.",
"loading": "Ładowanie...",
"close": "Zamknij",
"sendOTP": "Wyślij kod OTP",
"countryCode": "Kod kraju",
"confirmOtp": "Potwierdź kod OTP",
"invalidPhone": "Nieprawidłowy numer telefonu",
"updatePhoneSuccess": "Pomyślnie zaktualizowano numer telefonu",
"updatePhoneFail": "Wystąpił błąd. Spróbuj ponownie później",
"emptyOtp": "Kod OTP jest nieprawidłowy!",
"resendOtp": "Wyślij ponownie kod OTP!",
"tooFast": "Zbyt szybko. Proszę poczekać {{seconds}} sekund przed ponownym wysłaniem kodu OTP.",
"alreadyLinked": "Ten numer jest już połączony z Twoim kontem",
"alreadyLinkedToAnother": "Ten numer jest już połączony z innym kontem",
"country": "Kraj",
"otpSentMessage": "Proszę sprawdzić kod OTP wysłany na numer telefonu {{phone}}",
"backToPhoneInput": "Zmienić numer telefonu?"
},
"toast": {
"deleteAccount": {
"success": "Pomyślnie usunięto konto",
"error": "Jesteś właścicielem clanu"
}
},
"phoneNumberSetting": {
"title": "Numer telefonu",
"updatePhoneNumber": {
"newPhoneNumber": "Nowy numer telefonu",
"nextButton": "Dalej",
"removeButton": "Usuń numer telefonu",
"failed": "Aktualizacja numeru telefonu nie powiodła się",
"invalidPhoneNumber": "Nieprawidłowy numer telefonu"
},
"verifyPhoneNumber": {
"description": "Wprowadź 6-cyfrowy kod, który wysłaliśmy",
"verifyButton": "Potwierdź",
"success": "Pomyślnie zaktualizowano numer telefonu"
}
},
"emailSetting": {
"cancel": "Anuluj",
"currentEmail": "Aktualny email",
"description": "Proszę wpisać email dla swojego konta",
"otpDescription": "Kod OTP został wysłany na nowy email",
"fillOTP": "Wpisz kod OTP",
"send": "Wyślij OTP",
"resendOtp": "Wyślij ponownie kod OTP!",
"error": {
"notEqual": "Potwierdzenie hasła nie pasuje",
"required": "Email jest wymagany",
"invalid": "Proszę wprowadzić poprawny adres email"
},
"updateEmail": {
"newEmail": "Nowy email",
"nextButton": "Dalej",
"failed": "Aktualizacja emaila nie powiodła się",
"invalidEmail": "Nieprawidłowy email",
"emailAlreadyLinked": "Ten email już używasz"
},
"verifyEmail": {
"description": "Wprowadź 6-cyfrowy kod, który wysłaliśmy",
"verifyButton": "Potwierdź",
"success": "Pomyślnie zaktualizowano email"
}
}
}
6 changes: 6 additions & 0 deletions libs/translations/src/languages/pl/activityApp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"activity": "Aktywność",
"leagueOfLegends": "League of Legends",
"listeningToSpotify": "Słuchanie Spotify",
"visualStudioCode": "Visual Studio Code"
}
Loading