Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Polish translation and add a few missing strings #19

Merged
merged 4 commits into from
Nov 15, 2023
Merged
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
4 changes: 4 additions & 0 deletions src/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Hindi from "./translations/hi";
import Italian from "./translations/it";
import Portuguese from "./translations/pt";
import Romanian from "./translations/ro";
import Polish from "./translations/pl";
import Bosnian from "./translations/bs";

i18n.use(initReactI18next).init({
Expand Down Expand Up @@ -41,6 +42,9 @@ i18n.use(initReactI18next).init({
ro: {
translations: Romanian,
},
pl: {
translations: Polish,
},
bs: {
translations: Bosnian,
},
Expand Down
7 changes: 7 additions & 0 deletions src/locales/translations/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ export default {
gta_path_modal_cant_find_game_title: "Can't find GTA San Andreas!",
gta_path_modal_cant_find_game_description:
'Can not find GTA San Andreas in this directory:\n - "{{ path }}"\nUnable to find "gta_sa.exe" in your given path.',
nickname_modal_name_not_set_title: "No Nickname!",
nickname_modal_name_not_set_description: "You must choose a nickname for yourself before joining a server.",
gta_path_modal_path_not_set_title: "GTA San Andreas path is not set!",
gta_path_modal_path_not_set_description: "You didn't set GTA San Andreas path, go to settings and search for game folder.",
admin_permissions_required_modal_title: "Admin permissions required!",
admin_permissions_required_modal_description: "It seems like your GTA: San Andreas game requires administration permissions to run. This can be due to many causes, like having your game installed in \"C\" drive. Please re-open open.mp launcher as administrator either using \"Run as Admin\" button or manually by yourself",
run_as_admin: "Run as Admin",
open_settings: "Open Settings",
cancel: "Cancel",
gta_path_modal_cant_find_samp_title: "Can't find SA-MP!",
Expand Down
77 changes: 77 additions & 0 deletions src/locales/translations/pl.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
export default {
favorites: "Ulubione",
internet: "Internet",
partners: "Partnerzy",
recently_joined: "Ostatnio Dołączone",
nickname: "Pseudonim",
settings: "Ustawienia",
minimize: "Minimalizuj",
maximize: "Maksymalizuj",
close: "Zamknij",
add_server_modal_description_1: "Ręcznie dodaj serwer do listy ulubionych.",
add_server_modal_description_2: "Przykład: 127.0.0.1:7777",
add: "Dodaj",
server: "Serwer",
address: "Adres",
players: "Gracze",
server_join_prompt_enter_password: "Ten serwer ma hasło, wprowadź je:",
server_join_prompt_enter_password_input_placeholder: "Wprowadź hasło...",
server_join_prompt_nickname_input_placeholder: "Wprowadź pseudonim...",
connect: "Połącz",
copy: "Kopiuj",
remove_from_favorites: "Usuń z Ulubionych",
add_to_favorites: "Dodaj do Ulubionych",
filters: "Filtry",
filter_only_omp_servers: "Tylko serwery open.mp",
filter_non_empty_servers: "Serwery z graczami",
filter_unpassworded_servers: "Serwery bez hasła",
rule: "Reguła",
value: "Wartość",
player: "Gracz",
score: "Punkty",
locked: "Zabezpieczony",
unlocked: "Otwarty",
openmp_server: "Serwer open.mp",
name: "Nazwa",
ping: "Ping",
mode: "Tryb",
filter_servers: "Filtruj Serwery",
search_for_server_hostname_mode: "Szukaj według nazwy/trybu serwera",
clear_recently_joined_list: "Wyczyść Ostatnio Dołączone",
refresh_servers: "Odśwież Listę Serwerów",
play: "Graj",
remove_selected_server_from_favorites: "Usuń Wybrany Serwer z Ulubionych",
add_selected_server_to_favorites: "Dodaj Wybrany Serwer do Ulubionych",
add_server: "Dodaj Serwer",
hide_player_and_rule_list: "Ukryj listę graczy i reguł",
show_player_and_rule_list: "Pokaż listę graczy i reguł",
copy_server_info: "Kopiuj Informacje o Serwerze",
settings_gta_path_input_label: "Ścieżka GTA San Andreas (gdzie zainstalowany jest SA-MP)",
browse: "Przeglądaj",
settings_import_nickname_gta_path_from_samp: "Importuj pseudonim i ścieżkę gtasa z ustawień SA-MP",
settings_import_samp_favorite_list: "Importuj listę ulubionych serwerów z danych SA-MP",
settings_reset_application_data: "Zresetuj dane aplikacji (czyści ustawienia i listy)",
settings_new_update_available: "⚠ Nowa aktualizacja dostępna. Kliknij, aby pobrać! ⚠",
settings_credits_made_by: "Stworzone z ❤️ przez",
settings_credits_view_source_on_github: "Zobacz kod źródłowy na GitHubie",
update_modal_update_available_title: "Dostępna Aktualizacja!",
update_modal_update_available_description: 'Nowa wersja launcher\'a jest dostępna!\nTwoja wersja: {{ version }}\nAktualna wersja: {{ newVersion }}\nKliknij "Pobierz", aby otworzyć stronę z aktualizacją.',
download: "Pobierz",
update_modal_remind_me_next_time: "Przypomnij mi następnym razem",
update_modal_skip_this_update: "Pomiń tę aktualizację",
gta_path_modal_cant_find_game_title: "Nie można znaleźć GTA San Andreas!",
gta_path_modal_cant_find_game_description: 'Nie można znaleźć GTA San Andreas w tej lokalizacji:\n - "{{ path }}"\nNie można odnaleźć "gta_sa.exe" w podanej ścieżce.',
nickname_modal_name_not_set_title: "Brak Pseudonimu!",
nickname_modal_name_not_set_description: "Należy wybrać pseudonim przed dołączeniem do serwera.",
gta_path_modal_path_not_set_title: "Ścieżka do GTA San Andreas nie jest ustawiona!",
gta_path_modal_path_not_set_description: "Nie ustawiono ścieżki do GTA San Andreas. Należy przejść do ustawień i wyszukać folder z grą.",
admin_permissions_required_modal_title: "Wymagane są uprawnienia administratora!",
admin_permissions_required_modal_description: "Wygląda na to, że gra GTA San Andreas wymaga uprawnień administratora do uruchomienia. Może to być spowodowane różnymi przyczynami, np. zainstalowaniem gry na dysku \"C\". Otwórz ponownie launcher open.mp jako administrator, używając przycisku \"Uruchom jako Administrator\" lub wykonaj to ręcznie przez siebie.",
run_as_admin: "Uruchom jako Administrator",
open_settings: "Ustawienia",
cancel: "Anuluj",
gta_path_modal_cant_find_samp_title: "Nie można znaleźć SA-MP!",
gta_path_modal_cant_find_samp_description: 'Nie można znaleźć zainstalowanego SA-MP w tej lokalizacji:\n - "{{ path }}"\nNie można odnaleźć "samp.dll" w podanej ścieżce.\n\nJeśli nie masz zainstalowanego SA-MP, możesz pobrać go z https://sa-mp.mp/, klikając **Pobierz**.',
notification_add_to_favorites_title: "Dodano do Ulubionych!",
notification_add_to_favorites_description: "{{ server }} został dodany do listy ulubionych.",
};
25 changes: 11 additions & 14 deletions src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,20 +159,19 @@ export const startGame = async (

if (!gtasaPath || gtasaPath.length < 1) {
showMessageBox({
title: "GTA San Andreas path is not set!",
description:
"You didn't set GTA San Andreas path, go to settings and search for game folder.",
title: t("gta_path_modal_path_not_set_title"),
description: t("gta_path_modal_path_not_set_description"),
buttons: [
{
title: "Open Settings",
title: t("open_settings"),
onPress: () => {
showPrompt(false);
showSettings();
hideMessageBox();
},
},
{
title: "Cancel",
title: t("cancel"),
onPress: () => {
showPrompt(true);
setServer(server);
Expand All @@ -186,9 +185,8 @@ export const startGame = async (

if (!nickname || nickname.length < 1) {
showMessageBox({
title: "No Nickname!",
description:
"You must choose a nickname for yourself before joining a server.",
title: t("nickname_modal_name_not_set_title"),
description: t("nickname_modal_name_not_set_description"),
buttons: [
{
title: "Okay",
Expand Down Expand Up @@ -222,20 +220,19 @@ export const startGame = async (
}).catch(async (e) => {
if (e == "need_admin") {
showMessageBox({
title: "Admin perms required!",
description:
'It seems like your GTA: San Andreas game requires administration permissions to run. This can be due to many causes, like having your game installed in "C" drive. Please re-open open.mp launcher as administrator either using "Run as Admin" button or manually by yourself',
title: t("admin_permissions_required_modal_title"),
description: t("admin_permissions_required_modal_description"),
buttons: [
{
title: "Run as Admin",
title: t("run_as_admin"),
onPress: async () => {
await invoke("rerun_as_admin").then(() => {
process.exit();
});
},
},
{
title: "Cancel",
title: t("cancel"),
onPress: () => hideMessageBox(),
},
],
Expand Down Expand Up @@ -301,7 +298,7 @@ export const checkDirectoryValidity = async (
},
},
{
title: t("Cancel"),
title: t("cancel"),
onPress: () => {
if (onFail) {
onFail();
Expand Down