From cc87f01e2fe75aa98f1f430ecd8c250d01fa4435 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 10 Nov 2024 22:07:20 +0000 Subject: [PATCH 1/7] Addition of Polish Language --- src/static/locale/active_languages.json | 5 + src/static/locale/pl.json | 317 ++++++++++++++++++++++++ 2 files changed, 322 insertions(+) create mode 100644 src/static/locale/pl.json diff --git a/src/static/locale/active_languages.json b/src/static/locale/active_languages.json index 644a3eb..0c82b69 100644 --- a/src/static/locale/active_languages.json +++ b/src/static/locale/active_languages.json @@ -43,5 +43,10 @@ "lang_id": "zh-hk", "lang_name": "Chinese (Traditional)", "lang_name_localized": "中文(繁體)" + }, + { + "lang_id": "pl", + "lang_name": "Polish)", + "lang_name_localized": "Polski" } ] diff --git a/src/static/locale/pl.json b/src/static/locale/pl.json new file mode 100644 index 0000000..bcbd94a --- /dev/null +++ b/src/static/locale/pl.json @@ -0,0 +1,317 @@ +{ + "Welcome to": "Witamy w", + "Username": "Nazwa Użytkownika", + "Password": "Hasło", + "OTP from your authenticator": "OTP z Twojego Autentykatora", + "Sign In": "Zaloguj", + "Signing In\\.\\.\\.": "Trwa Logowanie...", + "Access Remote Server": "Połącz się ze zdalnym serwerem", + "Server": "Serwer", + "Click": "Kliknij", + "Pinging...": "Pinguje...", + "to add your server": "aby dodać do Twojego serwera", + "Server List": "Lista Serwerów", + "Sorry, your username or password is incorrect.": "Nazwa użytkownika bądź hasło jest niepoprawne.", + "Home": "Strona Główna", + "Settings": "Ustawnienia", + "Tools": "Narzędzia", + "Sign Out": "Wyloguj się", + "Checking for update...": "Sprawdzanie aktualizacji...", + "You're on the latest version": "Korzystasz z najnowszej wersji", + "WireGuard Configurations": "Konfiguracja", + "You don't have any WireGuard configurations yet. Please check the configuration folder or change it in Settings. By default the folder is /etc/wireguard.": "Nie posiadasz żadnych konfiguarcji WireGuard. Sprawdź folder konfiguarcji lub zmień go w Ustawieniach. Domyślnie konfiguracje są zapisywane w /etc/wireguard.", + "Configuration": "Konfiguracja", + "Configurations": "Konfiguracje", + "Peers Default Settings": "Domyślne ustawienia Klientów", + "Dashboard Theme": "Styl Panelu", + "Light": "Jasny", + "Dark": "Ciemny", + "This will be changed globally, and will be apply to all peer's QR code and configuration file.": "Te zmiany zostaną wprowadzone globalnie i nadpiszą kody QR i konfiguracje wszystkich Klientów.", + "Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port": "Aby zapisać zmiany adresów IP lub portu nasłuchiwania wymagany będzie manualny restart WGDashboard.", + "WireGuard Configurations Settings": "Ustawienia Konfiguracji WireGuard", + "Configurations Directory": "Folder Konfiguracji", + "Remember to remove / at the end of your path. e.g /etc/wireguard": "Pamiętaj aby usunąć / na końcu ścieżki, na przykład /etc/wireguard", + "WGDashboard Account Settings": "Ustawienia Konta WGDashboard", + "Current Password": "Aktualne Hasło", + "New Password": "Nowe Hasło", + "Repeat New Password": "Powtórz Nowe Hasło", + "Update Password": "Aktualizuj Hasło", + "Multi-Factor Authentication \\(MFA\\)": "Weryfikacja Wieloskładnikowa (MFA)", + "Reset": "Reset", + "Setup": "Ustawienia", + "API Keys": "Klucze API", + "API Key": "Klucz API", + "Key": "Klucz", + "Enabled": "Włączone", + "Disabled": "Wyłączone", + "No WGDashboard API Key": "Brak Klucza API WGDashboard", + "Expire At": "Termin Ważności", + "Are you sure to delete this API key\\?": "Czy na pewno chcesz usunąć ten klucz API?", + "Create API Key": "Stwórz klucz API", + "When should this API Key expire\\?": "Kiedy ten klucz API powinien utracić swoją ważność?", + "Never Expire": "Nigdy", + "Don't think that's a good idea": "To nie jest dobry pomysł...", + "Creating\\.\\.\\.": "Tworzenie...", + "Create": "Stwórz", + "Status": "Status", + "On": "Wł.", + "Off": "Wył.", + "Turning On\\.\\.\\.": "Włączam...", + "Turning Off\\.\\.\\.": "Wyłączam...", + "Address": "Adres", + "Listen Port": "Port Nasłuchu", + "Public Key": "Klucz publiczny", + "Connected Peers": "Połączeni Klienci", + "Total Usage": "Łączne Użycie", + "Total Received": "Łącznie Odebrano", + "Total Sent": "Łącznie Wysłano", + "Peers Data Usage": "Użycie danych przez Klientów", + "Real Time Received Data Usage": "Aktualnie Odbierane Dane", + "Real Time Sent Data Usage": "Aktualnie Wysyłane Dane", + "Peer": "Klient", + "Peers": "Klienci", + "Peer Settings": "Ustawienia Klientów", + "Download All": "Pobierz Wszystkie", + "Search Peers\\.\\.\\.": "Szukaj Klientów...", + "Display": "Wyświetlanie", + "Sort By": "Sortuj po", + "Refresh Interval": "Interwał Odświeżania", + "Name": "Nazwa", + "ago": "temu", + "Allowed IPs": "Dozwolone IP", + "Restricted": "Ograniczone", + "(.*) Seconds": "$1 sek.", + "(.*) Minutes": "$1 min.", + "Configuration Settings": "Ustawienia Konfiguracji", + "Peer Jobs": "Automatyzacje Klienta", + "Active Jobs": "Aktywne Automatyzacje", + "All Active Jobs": "Wszystkie Aktywne Automatyzacje", + "Logs": "Logi", + "Private Key": "Prywatny Klucz", + "\\(Required for QR Code and Download\\)": "(Wymagane aby otrzymać kod QR lub Pobrać)", + "\\(Required\\)": "(Wymagane)", + "Endpoint Allowed IPs": "Dozwolone IP Punktu Końcowego", + "DNS": "DNS", + "Optional Settings": "Opcjonalne Ustawienia", + "Pre-Shared Key": "Klucz PSK", + "MTU": "MTU", + "Persistent Keepalive": "Stałe Utrzymywanie Online", + "Reset Data Usage": "Zresetuje Użycie Danych", + "Total": "Łącznie", + "Sent": "Wysłano", + "Received": "Otrzymano", + "Revert": "Cofnij", + "Save Peer": "Zapisz Klienta", + "QR Code": "Kod QR", + "Schedule Jobs": "Automatyzacje", + "Job": "Automatyzacja", + "Job ID": "ID Automatyzacji", + "Unsaved Job": "Niezapisana Automatyzacja", + "This peer does not have any job yet\\.": "Ten klient nie posiada żadnych automatyzacji.", + "if": "Jeśli", + "is": "jest", + "then": "to wtedy", + "larger than": "większy/a niż", + "Date": "Data", + "Restrict Peer": "Ogranicz Klienta", + "Delete Peer": "Usuń Klienta", + "Edit": "Edytuj", + "Delete": "Usuń", + "Deleting...": "Usuwam...", + "Cancel": "Anuluj", + "Save": "Zapisz", + "No active job at the moment\\.": "Brak aktywnych automatyzacji.", + "Jobs Logs": "Logi Automatyzacji", + "Updated at": "Ostatnia zmiana", + "Refresh": "Odśwież", + "Filter": "Filtruj", + "Success": "Sukces", + "Failed": "Porażka", + "Log ID": "ID Logów", + "Message": "Wiadomość", + "Share Peer": "Udostępnij Klienta", + "Currently the peer is not sharing": "Aktualnie klient nie jest udostępniony", + "Sharing\\.\\.\\.": "Udostępniam...", + "Start Sharing": "Rozpocznij Udostępnianie", + "Stop Sharing\\.\\.\\.": "Zakańczanie Udostępniania...", + "Stop Sharing": "Zakończ", + "Access Restricted": "Dostęp Ograniczony", + "Restrict Access": "Ogranicz Dostęp", + "Restricting\\.\\.\\.": "Ograniczanie...", + "Allow Access": "Udostępnij Dostęp", + "Allowing Access\\.\\.\\.": "Udostępnianie Dostępu...", + "Download \\& QR Code is not available due to no private key set for this peer": "Kod QR lub pobieranie nie jest dostępne ze względu na brak ustawionego prywatnego klucza dla tego klienta", + "Add Peers": "Dodaj Klientów", + "Bulk Add": "Masowe Dodawanie", + "By adding peers by bulk, each peer's name will be auto generated, and Allowed IP will be assign to the next available IP\\.": "Dodając klientów masowo, nazwa każdego klienta zostanie wygenerowana automatycznie i przydzielone zostanie następny dostępny adres IP.", + "How many peers you want to add\\?": "Ilu klientów chcesz dodać?", + "You can add up to (.*) peers": "Możesz dodać do $1 Klientów", + "Use your own Private and Public Key": "Użyj własnych publicznych i prywatnych kluczy", + "Enter IP Address/CIDR": "Podaj adres IP/CIDR", + "IP Address/CIDR": "Adres IP/CIDR", + "or": "lub", + "Pick Available IP": "Wybierz Dostępny Adres IP", + "No available IP containing": "Brak dostępnych adresów IP zawierających", + "Add": "Dodaj", + "Adding\\.\\.\\.": "Dodawanie...", + "Failed to check available update": "Nie udało się sprawdzić dostępnych aktualizacji", + "Nice to meet you!": "Miło Cię poznać!", + "Please fill in the following fields to finish setup": "Wypełnij następujące pola aby ukończyć instalacje", + "Create an account": "Stwórz konto", + "Enter an username you like": "Wpisz nazwę użytkownika", + "Enter a password": "Utwórz Hasło", + "\\(At least 8 characters and make sure is strong enough!\\)": "(Wybierz silne hasło zawierające co najmniej 8 znaków!)", + "Confirm password": "Potwierdź Hasło", + "Next": "Dalej", + "Saving\\.\\.\\.": "Zapisywanie...", + "1\\. Please scan the following QR Code to generate TOTP with your choice of authenticator": "1. Zeskanuj ten kod QR aby utworzyć jednorazowe hasło (TOTP) za pomocą Twojego Autentykatora", + "Or you can click the link below:": "Lub kliknij w poniższy link:", + "2\\. Enter the TOTP generated by your authenticator to verify": "2. Podaj swoje jednorazowe hasło (TOTP), utworzone za pomocą Twojego Autentykatora", + "TOTP verified!": "Jednorazowe hasło (TOTP) potwierdzone!", + "I don't need MFA": "Nie potrzebuję Weryfikacji Wieloskładnikowej (MFA)", + "Complete": "Zakończ", + "(v[0-9.]{1,}) is now available for update!": "Aktualizacja do wersji $1 jest dostępna do pobrania!", + "Current Version:": "Aktualna wersja: ", + "Oh no\\.\\.\\. This link is either expired or invalid\\.": "Ups. Ten link nie jest poprawny bądź utracił swoją ważność.", + "Scan QR Code with the WireGuard App to add peer": "Zeskanuj kod QR za pomocą aplikacji WireGuard aby dodać klienta", + "or click the button below to download the ": "lub kliknij przycisk poniżej aby pobrać ", + " file": " plik", + "FROM ": "z ", + "(.*) is on": "$1 jest wł.", + "(.*) is off": "$1 jest wył.", + "Allowed IPs is invalid": "Dozwolone Adresy IP są niepoprawne", + "Peer created successfully": "Klient utworzony pomyślnie", + "Please fill in all required box": "Wypełnij wszystkie wymagane pola", + "Please specify amount of peers you want to add": "Podaj liczbę klientów do dodania", + "No more available IP can assign": "Brak dostępnych adresów IP do dopisania", + "The maximum number of peers can add is (.*)": "Maksymalnie można dodać $1 klientów", + "Generating key pairs by bulk failed": "Tworzenie par kluczy nie udało się", + "Failed to add peers in bulk": "Nie udało się dodać klientów masowo", + "This peer already exist": "Ten klient już istnieje", + "This IP is not available: (.*)": "Ten adres IP nie jest dostępny: $1", + "Configuration does not exist": "Konfiguracja nie istnieje", + "Peer does not exist": "Klient nie istnieje", + "Please provide a valid configuration name": "Podaj poprawną nazwę konfiguracji", + "Peer saved": "Klient zapisany pomyślnie", + "Allowed IPs already taken by another peer": "Adres IP jest już wykorzystywany przez innego klienta", + "Endpoint Allowed IPs format is incorrect": "Format Dozwolonych adresów IP jest niepoprawny", + "DNS format is incorrect": "Niepoprawny format adresu serwera DNS", + "MTU format is not correct": "Niepoprawny format wartości MTU", + "Persistent Keepalive format is not correct": "Niepoprawny format wartości Stałego Utrzymywania Online", + "Private key does not match with the public key": "Prywatny klucz nie pasuje do publicznego klucza", + "Update peer failed when updating Pre-Shared Key": "Aktualizacja klientów nie powiodła się przy zapisywaniu Klucza PSK", + "Update peer failed when updating Allowed IPs": "Aktualizacja klientów nie powiodła się przy zapisywaniu dozwolonych adresów IP", + "Update peer failed when saving the configuration": "Aktualizacja klientów nie powiodła się przy zapisywaniu Konfiguracji", + "Peer data usage reset successfully": "Użycie danych klienta zresetowane pomyślnie", + "Peer download started": "Pobieranie klienta rozpoczęte", + "Please specify one or more peers": "Wybierz co najmniej jednego klienta", + "Share link failed to create. Reason: (.*)": "Nie udało się stworzyć linku do udostępniania. Powód: $1", + "Link expire date updated": "Data ważności linku zapisana", + "Link expire date failed to update. Reason: (.*)": "Nie udało się zapisać daty linku do udostępniania. Powód: $1", + "Peer job saved": "Automatyzacja klienta zapisana", + "Please specify job": "Wybierz poprawną automatyzacje", + "Please specify peer and configuration": "Wybierz klienta i konfiguracje", + "Peer job deleted": "Automatyzacja klienta usunięta pomyślnie", + "API Keys function is successfully enabled": "Funkcjonalność kluczy API pomyślnie włączona", + "API Keys function is successfully disabled": "Funkcjonalność kluczy API pomyślnie wyłączona", + "API Keys function is failed to enable": "Nie udało się włączyć funkcjonalności kluczy API", + "API Keys function is failed to disable": "Nie udało się wyłączyć funkcjonalności kluczy API", + "WGDashboard API Keys function is disabled": "Funkcjonalność kluczy API jest wyłączona", + "WireGuard configuration path saved": "Zapisano ścieżkę konfiguracji WireGuard pomyślnie", + "API Key deleted": "Klucz API usunięty pomyślnie", + "API Key created": "Klucz API stworzony pomyślnie", + "Sign in session ended, please sign in again": "Sesja logowania została zakończona. Zaloguj się ponownie", + "Please specify an IP Address (v4/v6)": "Podaj adres IP (v4/v6)", + "Please provide ipAddress and count": "Podaj adres IP i ilość", + "Please provide ipAddress": "Podaj adres IP", + "Dashboard Language": "Język Portalu WGDashboard", + "Dashboard language update failed": "Nie udało się zmienić języka portalu WGDashboard", + "Peer Remote Endpoint": "Zdalny Punkt Końcowy Klienta", + "New Configuration": "Nowa Konfiguracja", + "Configuration Name": "Nazwa Konfiguracji", + "Configuration name is invalid. Possible reasons:": "Nazwa Konfiguracji jest nieprawidłowa. Możliwy powód:", + "Configuration name already exist\\.": "Konfiguracja o tej nazwie już istnieje. ", + "Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen\\.": "Nazwa konfiguracji może zawierać tylko 15 znaków składających się z małych i dużych liter alfabetu, liczb, oraz tych znaków: _=+.- ", + "Invalid Port": "Niepoprawny Port", + "Save Configuration": "Zapisz Konfiguracje", + "IP Address/CIDR is invalid": "Adres IP/CIDR jest niepoprawny", + "IP Address": "Adres IP", + "Enter IP Address / Hostname": "Wpisz Adres IP / Nazwę Hosta", + "IP Address / Hostname": "Adres IP / Nazwa Hosta", + "Dashboard IP Address & Listen Port": "Adres IP Portalu WGDashboard oraz Port Nasłuchiwania", + "Count": "Ilość", + "Geolocation": "Geolokalizacja", + "Is Alive": "Jest Online", + "Average / Min / Max Round Trip Time": "Średnia / Min. / Maks. czas podróży pakietu", + "Sent / Received / Lost Package": "Wysłane / Otrzymane / Utracone Pakiety", + "Restore Configuration": "Przywróc Konfiguracje", + "Step (.*)": "Krok $1", + "Select a backup you want to restore": "Wybierz kopię zapasową którą chcesz przywrócić", + "Click to change a backup": "Wybierz kopię zapasową", + "Selected Backup": "Wybrana kopia zapasowa", + "You don't have any configuration to restore": "Nie posiadasz żadnej konfiguracji do przywrócenia", + "Help": "Pomoc", + "Backup": "Kopia Zapasowa", + "([0-9].*) Backups?": "$1 Kopii Zapasowych?", + "Yes": "Tak", + "No": "Nie", + "Backup not selected": "Nie wybrano kopii zapasowej", + "Confirm \\& edit restore information": "Potwierdź i edytuj informacje o przywróceniu kopii zapasowej", + "(.*) Available IP Address": "$1 Dostępne Adresy IP", + "Database File": "Plik Bazy Danych", + "Contain": "Zawiera", + "Restricted Peers?": "Ograniczeni Klienci", + "Restore": "Przywróć", + "Restoring": "Trwa przywracanie...", + "WGDashboard Settings": "Ustawienia WGDashboard", + "Peers Settings": "Ustawienia Klientów", + "WireGuard Configuration Settings": "Ustawienia Konfiguracji WireGuard", + "Appearance": "Wygląd", + "Theme": "Styl", + "Language": "Język", + "Account Settings": "Ustawienia Konta", + "Peer Default Settings": "Domyślne Ustawienia Klientów", + "Toggle When Start Up": "Zmień przy starcie", + "Other Settings": "Inne Ustawienia", + "Select Peers": "Wybierz Klientów", + "Backup & Restore": "Tworzenie i Przywracanie Kopii Zapasowej", + "Delete Configuration": "Usuń Konfiguracje", + "Create Backup": "Stwórz Kopię Zapasową", + "No backup yet, click the button above to create backup\\.": "Brak kopii Zapasowych, kliknij przycisk powyżej aby utworzyć nową kopię", + "Are you sure to delete this backup\\?": "Czy na pewno chcesz usunąć tą kopię zapasową?", + "Are you sure to restore this backup?\\": "Czy na pewno chcesz przywrócić tą kopię zapasową?", + "Backup Date": "Data Utworzenia", + "File": "Plik", + "Are you sure to delete this configuration\\?": "Czy na pewno chcesz usunąć tą konfigurację?", + "Once you deleted this configuration\\:": "Jak tylko usuniesz tą konfigurację: ", + "All connected peers will get disconnected": "Wszyscy klienci zostaną odłączeni", + "Both configuration file \\(\\.conf\\) and database table related to this configuration will get deleted": "Zarówno plik konfiguracji (.conf) jak i tabela w bazie danych dotycząca tej konfiguracji zostaną usunięte", + "Checking backups...": "Sprawdzanie kopii zapasowych...", + "This configuration have ([0-9].*) backups": "Ta konfiguracja ma utworzone $1 kopii zapasowych", + "This configuration have no backup": "Ta konfiguracja nie posiada żadnych kopii zapasowych", + "If you're sure, please type in the configuration name below and click Delete": "Jeśli jesteś pewny/a wpisz nazwę konfiguracji poniżej i kliknij Usuń", + "Select All": "Zaznacz Wszystkie", + "Clear Selection": "Wyczyść Zaznaczenie", + "([0-9].*) Peers?": "$1 Klientów?", + "Downloading": "Pobieranie", + "Download Finished": "Pobieranie Zakończone", + "Done": "Zakończono", + "Are you sure to delete": "Czy na pewno chcesz usunąć", + "Are you sure to delete this peer\\?": "Czy na pewno chcesz usunąć tego klienta?", + "Configuration deleted": "Konfiguracja usunięta pomyślnie", + "Configuration saved": "Konfiguracja zapisana pomyślnie", + "WGDashboard language update failed": "Nie udało się zmienić języka WGDashboard", + "Configuration restored": "Konfiguracja przywrócona pomyślnie", + "Allowed IP already taken by another peer": "Dozwolony Adres IP jest już wykorzystywany przez innego klienta", + "Failed to allow access of peer (.*)": "Nie udało się pozwolić na dostęp klientowi:$1", + "Failed to save configuration through WireGuard": "Nie udało się zapisać konfiguracji poprzez WireGuard", + "Allow access successfully!": "Pomyślnie udostępniono dostęp!", + "Deleted ([0-9]{1,}) peer\\(s\\)": "Usunięto $1 klienta/ów", + "Deleted ([0-9]{1,}) peer\\(s\\) successfully. Failed to delete ([0-9]{1,}) peer\\(s\\)": "Usunięto $1 klienta/ów pomyślnie. Nie udało się usunąć $2 klienta/ów", + "Restricted ([0-9]{1,}) peer\\(s\\)": "Ograniczono $1 klienta/ów ", + "Restricted ([0-9]{1,}) peer\\(s\\) successfully. Failed to restrict ([0-9]{1,}) peer\\(s\\)": "Ograniczono $1 klienta/ów pomyślnie. Nie udało się ograniczyć $2 klienta/ów", + "Traceroute": "Trasa Pakietów (Traceroute)", + "Autostart": "Automatyczny Start", + "Path": "Ścieżka" +} + From 665b0f148486d56a042e1446c1fb5d3a1888293a Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Thu, 14 Nov 2024 02:02:26 +0800 Subject: [PATCH 2/7] Added template and script to check local files --- src/static/locale/language_template.json | 312 +++++++++++++++++++++++ src/static/locale/verify_locale_files.py | 65 +++++ 2 files changed, 377 insertions(+) create mode 100644 src/static/locale/language_template.json create mode 100644 src/static/locale/verify_locale_files.py diff --git a/src/static/locale/language_template.json b/src/static/locale/language_template.json new file mode 100644 index 0000000..b999e23 --- /dev/null +++ b/src/static/locale/language_template.json @@ -0,0 +1,312 @@ +{ + "Welcome to": "", + "Username": "", + "Password": "", + "OTP from your authenticator": "", + "Sign In": "", + "Signing In\\.\\.\\.": "", + "Access Remote Server": "", + "Server": "", + "Click": "", + "Pinging...": "", + "to add your server": "", + "Server List": "", + "Sorry, your username or password is incorrect.": "", + "Home": "", + "Settings": "", + "Tools": "", + "Sign Out": "", + "Checking for update...": "", + "You're on the latest version": "", + "WireGuard Configurations": "", + "You don't have any WireGuard configurations yet. Please check the configuration folder or change it in Settings. By default the folder is /etc/wireguard.": "", + "Configuration": "", + "Configurations": "", + "Peers Default Settings": "", + "Dashboard Theme": "", + "Light": "", + "Dark": "", + "This will be changed globally, and will be apply to all peer's QR code and configuration file.": "", + "WireGuard Configurations Settings": "", + "Configurations Directory": "", + "Remember to remove / at the end of your path. e.g /etc/wireguard": "", + "WGDashboard Account Settings": "", + "Current Password": "", + "New Password": "", + "Repeat New Password": "", + "Update Password": "", + "Multi-Factor Authentication \\(MFA\\)": "", + "Reset": "", + "Setup": "", + "API Keys": "", + "API Key": "", + "Key": "", + "Enabled": "", + "Disabled": "", + "No WGDashboard API Key": "", + "Expire At": "", + "Are you sure to delete this API key\\?": "", + "Create API Key": "", + "When should this API Key expire\\?": "", + "Never Expire": "", + "Don't think that's a good idea": "", + "Creating\\.\\.\\.": "", + "Create": "", + "Status": "", + "On": "", + "Off": "", + "Turning On\\.\\.\\.": "", + "Turning Off\\.\\.\\.": "", + "Address": "", + "Listen Port": "", + "Public Key": "", + "Connected Peers": "", + "Total Usage": "", + "Total Received": "", + "Total Sent": "", + "Peers Data Usage": "", + "Real Time Received Data Usage": "", + "Real Time Sent Data Usage": "", + "Peer": "", + "Peers": "", + "Peer Settings": "", + "Download All": "", + "Search Peers\\.\\.\\.": "", + "Display": "", + "Sort By": "", + "Refresh Interval": "", + "Name": "", + "Allowed IPs": "", + "Restricted": "", + "(.*) Seconds": "", + "(.*) Minutes": "", + "Configuration Settings": "", + "Peer Jobs": "", + "Active Jobs": "", + "All Active Jobs": "", + "Logs": "", + "Private Key": "", + "\\(Required for QR Code and Download\\)": "", + "\\(Required\\)": "", + "Endpoint Allowed IPs": "", + "DNS": "", + "Optional Settings": "", + "Pre-Shared Key": "", + "MTU": "", + "Persistent Keepalive": "", + "Reset Data Usage": "", + "Total": "", + "Sent": "", + "Received": "", + "Revert": "", + "Save Peer": "", + "QR Code": "", + "Schedule Jobs": "", + "Job": "", + "Job ID": "", + "Unsaved Job": "", + "This peer does not have any job yet\\.": "", + "if": "", + "is": "", + "then": "", + "larger than": "", + "Date": "", + "Restrict Peer": "", + "Delete Peer": "", + "Edit": "", + "Delete": "", + "Deleting...": "", + "Cancel": "", + "Save": "", + "No active job at the moment\\.": "", + "Jobs Logs": "", + "Updated at": "", + "Refresh": "", + "Filter": "", + "Success": "", + "Failed": "", + "Log ID": "", + "Message": "", + "Share Peer": "", + "Currently the peer is not sharing": "", + "Sharing\\.\\.\\.": "", + "Start Sharing": "", + "Stop Sharing\\.\\.\\.": "", + "Stop Sharing": "", + "Access Restricted": "", + "Restrict Access": "", + "Restricting\\.\\.\\.": "", + "Allow Access": "", + "Allowing Access\\.\\.\\.": "", + "Download \\& QR Code is not available due to no private key set for this peer": "", + "Add Peers": "", + "Bulk Add": "", + "By adding peers by bulk, each peer's name will be auto generated, and Allowed IP will be assign to the next available IP\\.": "", + "How many peers you want to add\\?": "", + "You can add up to (.*) peers": "", + "Use your own Private and Public Key": "", + "Enter IP Address/CIDR": "", + "IP Address/CIDR": "", + "or": "", + "Pick Available IP": "", + "No available IP containing": "", + "Add": "", + "Adding\\.\\.\\.": "", + "Failed to check available update": "", + "Nice to meet you!": "", + "Please fill in the following fields to finish setup": "", + "Create an account": "", + "Enter an username you like": "", + "Enter a password": "", + "\\(At least 8 characters and make sure is strong enough!\\)": "", + "Confirm password": "", + "Next": "", + "Saving\\.\\.\\.": "", + "1\\. Please scan the following QR Code to generate TOTP with your choice of authenticator": "", + "Or you can click the link below:": "", + "2\\. Enter the TOTP generated by your authenticator to verify": "", + "TOTP verified!": "", + "I don't need MFA": "", + "Complete": "", + "(v[0-9.]{1,}) is now available for update!": "", + "Current Version:": "", + "Oh no\\.\\.\\. This link is either expired or invalid\\.": "", + "Scan QR Code with the WireGuard App to add peer": "", + "or click the button below to download the ": "", + " file": "", + "FROM ": "", + "(.*) is on": "", + "(.*) is off": "", + "Allowed IPs is invalid": "", + "Peer created successfully": "", + "Please fill in all required box": "", + "Please specify amount of peers you want to add": "", + "No more available IP can assign": "", + "The maximum number of peers can add is (.*)": "", + "Generating key pairs by bulk failed": "", + "Failed to add peers in bulk": "", + "This peer already exist": "", + "This IP is not available: (.*)": "", + "Configuration does not exist": "", + "Peer does not exist": "", + "Please provide a valid configuration name": "", + "Peer saved": "", + "Allowed IPs already taken by another peer": "", + "Endpoint Allowed IPs format is incorrect": "", + "DNS format is incorrect": "", + "MTU format is not correct": "", + "Persistent Keepalive format is not correct": "", + "Private key does not match with the public key": "", + "Update peer failed when updating Pre-Shared Key": "", + "Update peer failed when updating Allowed IPs": "", + "Update peer failed when saving the configuration": "", + "Peer data usage reset successfully": "", + "Peer download started": "", + "Please specify one or more peers": "", + "Share link failed to create. Reason: (.*)": "", + "Link expire date updated": "", + "Link expire date failed to update. Reason: (.*)": "", + "Peer job saved": "", + "Please specify job": "", + "Please specify peer and configuration": "", + "Peer job deleted": "", + "API Keys function is successfully enabled": "", + "API Keys function is successfully disabled": "", + "API Keys function is failed to enable": "", + "API Keys function is failed to disable": "", + "WGDashboard API Keys function is disabled": "", + "WireGuard configuration path saved": "", + "API Key deleted": "", + "API Key created": "", + "Sign in session ended, please sign in again": "", + "Please specify an IP Address (v4/v6)": "", + "Please provide ipAddress and count": "", + "Please provide ipAddress": "", + "Dashboard Language": "", + "Dashboard language update failed": "", + "Peer Remote Endpoint": "", + "New Configuration": "", + "Configuration Name": "", + "Configuration name is invalid. Possible reasons:": "", + "Configuration name already exist\\.": "", + "Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen\\.": "", + "Invalid Port": "", + "Save Configuration": "", + "IP Address/CIDR is invalid": "", + "IP Address": "", + "Enter IP Address / Hostname": "", + "IP Address / Hostname": "", + "Dashboard IP Address \\& Listen Port": "", + "Count": "", + "Geolocation": "", + "Is Alive": "", + "Average / Min / Max Round Trip Time": "", + "Sent / Received / Lost Package": "", + "Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port": "", + "Restore Configuration": "", + "Step (.*)": "", + "Select a backup you want to restore": "", + "Click to change a backup": "", + "Selected Backup": "", + "You don't have any configuration to restore": "", + "Help": "", + "Backup": "", + "([0-9].*) Backups?": "", + "Yes": "", + "No": "", + "Backup not selected": "", + "Confirm \\& edit restore information": "", + "(.*) Available IP Address": "", + "Database File": "", + "Contain": "", + "Restricted Peers?": "", + "Restore": "", + "Restoring": "", + "WGDashboard Settings": "", + "Peers Settings": "", + "WireGuard Configuration Settings": "", + "Appearance": "", + "Theme": "", + "Language": "", + "Account Settings": "", + "Peer Default Settings": "", + "Toggle When Start Up": "", + "Other Settings": "", + "Select Peers": "", + "Backup & Restore": "", + "Delete Configuration": "", + "Create Backup": "", + "No backup yet, click the button above to create backup\\.": "", + "Are you sure to delete this backup\\?": "", + "Are you sure to restore this backup?\\": "", + "Backup Date": "", + "File": "", + "Are you sure to delete this configuration\\?": "", + "Once you deleted this configuration\\:": "", + "All connected peers will get disconnected": "", + "Both configuration file \\(\\.conf\\) and database table related to this configuration will get deleted": "", + "Checking backups...": "", + "This configuration have ([0-9].*) backups": "", + "This configuration have no backup": "", + "If you're sure, please type in the configuration name below and click Delete": "", + "Select All": "", + "Clear Selection": "", + "([0-9].*) Peers?": "", + "Downloading": "", + "Download Finished": "", + "Done": "", + "Are you sure to delete": "", + "Are you sure to delete this peer\\?": "", + "Configuration deleted": "", + "Configuration saved": "", + "WGDashboard language update failed": "", + "Configuration restored": "", + "Allowed IP already taken by another peer": "", + "Failed to allow access of peer (.*)": "", + "Failed to save configuration through WireGuard": "", + "Allow access successfully": "", + "Deleted ([0-9]{1,}) peer\\(s\\)": "", + "Deleted ([0-9]{1,}) peer\\(s\\) successfully. Failed to delete ([0-9]{1,}) peer\\(s\\)": "", + "Restricted ([0-9]{1,}) peer\\(s\\)": "", + "Restricted ([0-9]{1,}) peer\\(s\\) successfully. Failed to restrict ([0-9]{1,}) peer\\(s\\)": "" +} \ No newline at end of file diff --git a/src/static/locale/verify_locale_files.py b/src/static/locale/verify_locale_files.py new file mode 100644 index 0000000..6b6fde0 --- /dev/null +++ b/src/static/locale/verify_locale_files.py @@ -0,0 +1,65 @@ +import json +import os.path + +from typing_extensions import deprecated + +active_languages = json.loads(open("active_languages.json", "r").read()) +language_template = json.loads(open("language_template.json", "r").read()) +welcome = "WGDashboard Locale File Verification [by @donaldzou]" + +print("="*(len(welcome) + 4)) +print(f"| {welcome} |") +print("="*(len(welcome) + 4)) +print() +print("Active Languages") + +for al in range(len(active_languages)): + print(f"\t[Language #{al + 1}] {active_languages[al]['lang_name']}") + +k = -1 + +m = input("Select the language number you want to verify or enter [q] to exit: ") +if m != "q": + if m.isdigit(): + k = int(m) - 1 + if k < 0 or k > len(active_languages): + exit(0) + else: + exit(0) +else: + exit(0) + + +print() +print(f"Selected Language: {active_languages[k]['lang_name']}") +if active_languages[k]['lang_id'] != "en": + with open(f"{active_languages[k]['lang_id']}.json", "r") as f: + + lang_file = json.loads(f.read()) + missing_translation = [] + deprecated_translation = [] + + for a in language_template.keys(): + if a not in lang_file.keys(): + missing_translation.append(a) + + for b in lang_file.keys(): + if b not in language_template.keys(): + deprecated_translation.append(b) + + + print("\n\t[Missing Translations] Simply copy the JSON below into the locale file and translate them in :)") + if len(missing_translation) > 0: + for a in range(len(missing_translation)): + print(f'\t\t"{missing_translation[a]}": ""{(',' if a < len(missing_translation) - 1 else '')}') + else: + print("\t\tNo missing translations ;) You're all good!") + + + print("\n\t[Deprecated Translations] Simply remove the translation below :)1") + if len(deprecated_translation) > 0: + for a in range(len(deprecated_translation)): + print(f'\t\t"{deprecated_translation[a]}": "{lang_file[deprecated_translation[a]]}"') + + else: + print("\t\tNo deprecated9 translations ;) You're all good!") \ No newline at end of file From 98c017dd56685228d0890afced4a072b9a6c4a61 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 14 Nov 2024 00:09:59 +0000 Subject: [PATCH 3/7] Fix to a translation --- src/static/locale/pl.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/locale/pl.json b/src/static/locale/pl.json index bcbd94a..66816ff 100644 --- a/src/static/locale/pl.json +++ b/src/static/locale/pl.json @@ -271,7 +271,7 @@ "Language": "Język", "Account Settings": "Ustawienia Konta", "Peer Default Settings": "Domyślne Ustawienia Klientów", - "Toggle When Start Up": "Zmień przy starcie", + "Toggle When Start Up": "Włącz przy starcie serwera", "Other Settings": "Inne Ustawienia", "Select Peers": "Wybierz Klientów", "Backup & Restore": "Tworzenie i Przywracanie Kopii Zapasowej", From 43f6bd41c925b4df72b2f881f7ac02b3d95fff12 Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Fri, 15 Nov 2024 02:15:40 +0800 Subject: [PATCH 4/7] Update verify_locale_files.py --- src/static/locale/verify_locale_files.py | 83 ++++++++++-------------- 1 file changed, 34 insertions(+), 49 deletions(-) diff --git a/src/static/locale/verify_locale_files.py b/src/static/locale/verify_locale_files.py index 6b6fde0..55fed7a 100644 --- a/src/static/locale/verify_locale_files.py +++ b/src/static/locale/verify_locale_files.py @@ -13,53 +13,38 @@ print("="*(len(welcome) + 4)) print() print("Active Languages") -for al in range(len(active_languages)): - print(f"\t[Language #{al + 1}] {active_languages[al]['lang_name']}") +status = {} -k = -1 - -m = input("Select the language number you want to verify or enter [q] to exit: ") -if m != "q": - if m.isdigit(): - k = int(m) - 1 - if k < 0 or k > len(active_languages): - exit(0) - else: - exit(0) -else: - exit(0) - - -print() -print(f"Selected Language: {active_languages[k]['lang_name']}") -if active_languages[k]['lang_id'] != "en": - with open(f"{active_languages[k]['lang_id']}.json", "r") as f: - - lang_file = json.loads(f.read()) - missing_translation = [] - deprecated_translation = [] - - for a in language_template.keys(): - if a not in lang_file.keys(): - missing_translation.append(a) - - for b in lang_file.keys(): - if b not in language_template.keys(): - deprecated_translation.append(b) - - - print("\n\t[Missing Translations] Simply copy the JSON below into the locale file and translate them in :)") - if len(missing_translation) > 0: - for a in range(len(missing_translation)): - print(f'\t\t"{missing_translation[a]}": ""{(',' if a < len(missing_translation) - 1 else '')}') - else: - print("\t\tNo missing translations ;) You're all good!") - - - print("\n\t[Deprecated Translations] Simply remove the translation below :)1") - if len(deprecated_translation) > 0: - for a in range(len(deprecated_translation)): - print(f'\t\t"{deprecated_translation[a]}": "{lang_file[deprecated_translation[a]]}"') - - else: - print("\t\tNo deprecated9 translations ;) You're all good!") \ No newline at end of file +for k in range(len(active_languages)): + print(f"[Language] {active_languages[k]['lang_name']}") + if active_languages[k]['lang_id'] != "en": + with open(f"{active_languages[k]['lang_id']}.json", "r") as f: + lang_file = json.loads(f.read()) + missing_translation = [] + deprecated_translation = [] + + for a in language_template.keys(): + if a not in lang_file.keys(): + missing_translation.append(a) + + for b in lang_file.keys(): + if b not in language_template.keys(): + deprecated_translation.append(b) + + + print("\t[Missing Translations]") + if len(missing_translation) > 0: + for a in range(len(missing_translation)): + print(f'\t\t"{missing_translation[a]}": ""{(',' if a < len(missing_translation) - 1 else '')}') + else: + print("\t\tNo missing translations") + + + print("\n\t[Deprecated Translations]") + if len(deprecated_translation) > 0: + for a in range(len(deprecated_translation)): + print(f'\t\t"{deprecated_translation[a]}": "{lang_file[deprecated_translation[a]]}"') + + else: + print("\t\tNo deprecated translations") + print() \ No newline at end of file From 915783699b9f214ccd89ddab4f25707b844575ed Mon Sep 17 00:00:00 2001 From: Daan Date: Thu, 14 Nov 2024 21:36:27 +0100 Subject: [PATCH 5/7] Proposed changes --- src/static/locale/nl-nl.json | 2 +- src/static/locale/tr-tr.json | 2 +- src/static/locale/uk.json | 1 + src/static/locale/verify_locale_files.py | 66 ++++++++++++------------ 4 files changed, 37 insertions(+), 34 deletions(-) diff --git a/src/static/locale/nl-nl.json b/src/static/locale/nl-nl.json index 2565cd9..0193636 100644 --- a/src/static/locale/nl-nl.json +++ b/src/static/locale/nl-nl.json @@ -4,7 +4,7 @@ "Password": "Wachtwoord", "OTP from your authenticator": "OTP van uw authenticator", "Sign In": "Inloggen", - "Signing In...": "Inloggen...", + "Signing In\\.\\.\\.": "Inloggen...", "Access Remote Server": "Toegang tot Remote Server", "Server": "Server", "Click": "Klik", diff --git a/src/static/locale/tr-tr.json b/src/static/locale/tr-tr.json index e86c59d..f97d674 100644 --- a/src/static/locale/tr-tr.json +++ b/src/static/locale/tr-tr.json @@ -4,7 +4,7 @@ "Password": "Parola", "OTP from your authenticator": "Kimlik doğrulama uygulamanızdan tek kullanımlık parola", "Sign In": "Giriş Yap", - "Signing In...": "Giriş Yapılıyor...", + "Signing In\\.\\.\\.": "Giriş Yapılıyor...", "Access Remote Server": "Uzak Sunuculara Eriş", "Server": "Sunucu", "Click": "Tıkla", diff --git a/src/static/locale/uk.json b/src/static/locale/uk.json index f9530f7..ae257ee 100644 --- a/src/static/locale/uk.json +++ b/src/static/locale/uk.json @@ -236,6 +236,7 @@ "IP Address": "IP-адреса", "Enter IP Address / Hostname": "Введіть IP-адресу / ім’я хоста", "IP Address / Hostname": "IP-адресу / ім’я хоста", + "Dashboard IP Address \\& Listen Port": "", "Count": "Граф", "Geolocation": "", "Is Alive": "", diff --git a/src/static/locale/verify_locale_files.py b/src/static/locale/verify_locale_files.py index 55fed7a..0aa56be 100644 --- a/src/static/locale/verify_locale_files.py +++ b/src/static/locale/verify_locale_files.py @@ -15,36 +15,38 @@ print("Active Languages") status = {} -for k in range(len(active_languages)): - print(f"[Language] {active_languages[k]['lang_name']}") - if active_languages[k]['lang_id'] != "en": - with open(f"{active_languages[k]['lang_id']}.json", "r") as f: - lang_file = json.loads(f.read()) - missing_translation = [] - deprecated_translation = [] +for language in active_languages: + print(f"[Language] {language['lang_name']}") - for a in language_template.keys(): - if a not in lang_file.keys(): - missing_translation.append(a) - - for b in lang_file.keys(): - if b not in language_template.keys(): - deprecated_translation.append(b) - - - print("\t[Missing Translations]") - if len(missing_translation) > 0: - for a in range(len(missing_translation)): - print(f'\t\t"{missing_translation[a]}": ""{(',' if a < len(missing_translation) - 1 else '')}') - else: - print("\t\tNo missing translations") - - - print("\n\t[Deprecated Translations]") - if len(deprecated_translation) > 0: - for a in range(len(deprecated_translation)): - print(f'\t\t"{deprecated_translation[a]}": "{lang_file[deprecated_translation[a]]}"') - - else: - print("\t\tNo deprecated translations") - print() \ No newline at end of file + if language['lang_id'] != "en": + with open(f"{language['lang_id']}.json", "r") as f: + lang_file = json.load(f) + + # Identify missing and deprecated translations + missing_translation = [ + key for key in language_template + if key not in lang_file or not lang_file[key].strip() + ] + + deprecated_translation = [ + key for key in lang_file + if key not in language_template + ] + + # Print missing translations + print("\t[Missing Translations]") + if missing_translation: + print(",\n".join(f'\t\t"{key}": ""' + for key in missing_translation)) + else: + print("\t\tNo missing translations") + + # Print deprecated translations + print("\n\t[Deprecated Translations]") + if deprecated_translation: + print("\n".join(f'\t\t"{key}": "{lang_file[key]}"' + for key in deprecated_translation)) + else: + print("\t\tNo deprecated translations") + + print() From 239bc144e32b64fe4719cf929343996071129f0f Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Fri, 15 Nov 2024 12:00:31 +0800 Subject: [PATCH 6/7] Fixed both Chinese translation --- src/static/locale/zh-cn.json | 2 +- src/static/locale/zh-hk.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/static/locale/zh-cn.json b/src/static/locale/zh-cn.json index 9966d5b..d07a2d7 100644 --- a/src/static/locale/zh-cn.json +++ b/src/static/locale/zh-cn.json @@ -298,7 +298,7 @@ "Are you sure to delete": "您确定要删除", "Are you sure to delete this peer\\?": "您确定要删除此端点吗?", "Configuration deleted": "配置删除成功", - "Configuration saved": "", + "Configuration saved": "配置保存成功", "WGDashboard language update failed": "WGDashboard 语言更新失败", "Configuration restored": "配置恢复成功", "Allowed IP already taken by another peer": "允许的 IP 地址已经被别的端点占用", diff --git a/src/static/locale/zh-hk.json b/src/static/locale/zh-hk.json index e71edc5..0b6ae94 100644 --- a/src/static/locale/zh-hk.json +++ b/src/static/locale/zh-hk.json @@ -298,7 +298,7 @@ "Are you sure to delete": "您確定要刪除", "Are you sure to delete this peer\\?": "您確定要刪除此端點嗎?", "Configuration deleted": "配置刪除成功", - "Configuration saved": "", + "Configuration saved": "配置保存成功", "WGDashboard language update failed": "WGDashboard 語言更新失敗", "Configuration restored": "配置恢復成功", "Allowed IP already taken by another peer": "允許的 IP 地址已經被別的端點佔用", @@ -309,4 +309,5 @@ "Deleted ([0-9]{1,}) peer\\(s\\) successfully. Failed to delete ([0-9]{1,}) peer\\(s\\)": "成功刪除了$1個端點,失敗刪除了$2個端點", "Restricted ([0-9]{1,}) peer\\(s\\)": "限制訪問了$1個端點", "Restricted ([0-9]{1,}) peer\\(s\\) successfully. Failed to restrict ([0-9]{1,}) peer\\(s\\)": "成功限制訪問了$1個端點,失敗限制訪問了$2個端點" + } \ No newline at end of file From 981b30e4af524f1a45f2773112c3c98bef305188 Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Sun, 17 Nov 2024 17:20:41 +0800 Subject: [PATCH 7/7] Update check script --- src/static/locale/active_languages.json | 2 +- src/static/locale/pl.json | 3 ++- src/static/locale/verify_locale_files.py | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/static/locale/active_languages.json b/src/static/locale/active_languages.json index 76eb264..5deedf6 100644 --- a/src/static/locale/active_languages.json +++ b/src/static/locale/active_languages.json @@ -56,7 +56,7 @@ }, { "lang_id": "pl", - "lang_name": "Polish)", + "lang_name": "Polish", "lang_name_localized": "Polski" } ] diff --git a/src/static/locale/pl.json b/src/static/locale/pl.json index 66816ff..f2a7715 100644 --- a/src/static/locale/pl.json +++ b/src/static/locale/pl.json @@ -238,7 +238,7 @@ "IP Address": "Adres IP", "Enter IP Address / Hostname": "Wpisz Adres IP / Nazwę Hosta", "IP Address / Hostname": "Adres IP / Nazwa Hosta", - "Dashboard IP Address & Listen Port": "Adres IP Portalu WGDashboard oraz Port Nasłuchiwania", + "Dashboard IP Address \\& Listen Port": "Adres IP Portalu WGDashboard oraz Port Nasłuchiwania", "Count": "Ilość", "Geolocation": "Geolokalizacja", "Is Alive": "Jest Online", @@ -313,5 +313,6 @@ "Traceroute": "Trasa Pakietów (Traceroute)", "Autostart": "Automatyczny Start", "Path": "Ścieżka" + } diff --git a/src/static/locale/verify_locale_files.py b/src/static/locale/verify_locale_files.py index 0aa56be..f8d4e5b 100644 --- a/src/static/locale/verify_locale_files.py +++ b/src/static/locale/verify_locale_files.py @@ -36,8 +36,7 @@ for language in active_languages: # Print missing translations print("\t[Missing Translations]") if missing_translation: - print(",\n".join(f'\t\t"{key}": ""' - for key in missing_translation)) + print(",\n".join(f'\t\t"' + key + '": ""' for key in missing_translation)) else: print("\t\tNo missing translations")