From 1dc08d639984d158a5c510e5abcc196119a4bf74 Mon Sep 17 00:00:00 2001
From: pswid <78219494+pswid@users.noreply.github.com>
Date: Tue, 25 Oct 2022 20:57:51 +0200
Subject: [PATCH] The translation of the web interface into Polish has been
corrected and completed (e.g. the word order has been fixed).
Newly added words should be translated from English into other languages in index.ts files
---
interface/.typesafe-i18n.json | 2 +-
.../src/components/layout/LayoutAuthMenu.tsx | 2 +-
.../src/components/layout/LayoutMenu.tsx | 8 +-
interface/src/framework/ap/APSettingsForm.tsx | 14 +-
interface/src/framework/ap/APStatusForm.tsx | 10 +-
interface/src/framework/ap/AccessPoint.tsx | 6 +-
interface/src/framework/mqtt/Mqtt.tsx | 4 +-
.../src/framework/mqtt/MqttSettingsForm.tsx | 2 +-
.../src/framework/mqtt/MqttStatusForm.tsx | 10 +-
.../framework/network/NetworkConnection.tsx | 6 +-
.../framework/network/NetworkSettingsForm.tsx | 6 +-
.../framework/network/NetworkStatusForm.tsx | 20 +-
.../src/framework/ntp/NTPSettingsForm.tsx | 4 +-
interface/src/framework/ntp/NTPStatusForm.tsx | 12 +-
interface/src/framework/ntp/NetworkTime.tsx | 4 +-
.../framework/security/ManageUsersForm.tsx | 4 +-
interface/src/framework/security/Security.tsx | 4 +-
.../security/SecuritySettingsForm.tsx | 4 +-
interface/src/framework/security/UserForm.tsx | 6 +-
.../framework/system/GeneralFileUpload.tsx | 4 +-
.../src/framework/system/OTASettingsForm.tsx | 2 +-
interface/src/framework/system/System.tsx | 8 +-
interface/src/framework/system/SystemLog.tsx | 4 +-
.../src/framework/system/SystemStatusForm.tsx | 8 +-
interface/src/i18n/de/index.ts | 44 +-
interface/src/i18n/en/index.ts | 48 +-
interface/src/i18n/i18n-types.ts | 1267 +++++++++--------
interface/src/i18n/i18n-util.ts | 2 +-
interface/src/i18n/nl/index.ts | 50 +-
interface/src/i18n/no/index.ts | 50 +-
interface/src/i18n/pl/index.ts | 135 +-
interface/src/i18n/se/index.ts | 53 +-
interface/src/project/DashboardData.tsx | 28 +-
interface/src/project/DashboardStatus.tsx | 6 +-
interface/src/project/Help.tsx | 4 +-
interface/src/project/ProjectMenu.tsx | 4 +-
interface/src/project/Settings.tsx | 2 +-
interface/src/project/SettingsApplication.tsx | 16 +-
.../src/project/SettingsCustomization.tsx | 10 +-
interface/src/utils/useRest.ts | 2 +-
40 files changed, 1071 insertions(+), 804 deletions(-)
diff --git a/interface/.typesafe-i18n.json b/interface/.typesafe-i18n.json
index 50a90e48b..905df0d48 100644
--- a/interface/.typesafe-i18n.json
+++ b/interface/.typesafe-i18n.json
@@ -1,5 +1,5 @@
{
"adapter": "react",
- "baseLocale": "en",
+ "baseLocale": "pl",
"$schema": "https://unpkg.com/typesafe-i18n@5.14.0/schema/typesafe-i18n.json"
}
diff --git a/interface/src/components/layout/LayoutAuthMenu.tsx b/interface/src/components/layout/LayoutAuthMenu.tsx
index dd5513564..c8cf66a21 100644
--- a/interface/src/components/layout/LayoutAuthMenu.tsx
+++ b/interface/src/components/layout/LayoutAuthMenu.tsx
@@ -130,7 +130,7 @@ const LayoutAuthMenu: FC = () => {
{me.username}
- {me.admin ? LL.ADMIN() + ' ' + LL.USER() : LL.GUEST() + ' ' + LL.USER()}
+ {me.admin ? LL.ADMIN() : LL.GUEST()} {LL.USER(2)}
diff --git a/interface/src/components/layout/LayoutMenu.tsx b/interface/src/components/layout/LayoutMenu.tsx
index cff62bbf6..9a79220ca 100644
--- a/interface/src/components/layout/LayoutMenu.tsx
+++ b/interface/src/components/layout/LayoutMenu.tsx
@@ -31,17 +31,17 @@ const LayoutMenu: FC = () => {
)}
-
-
+
+
{features.ntp && }
{features.mqtt && }
-
+
>
);
diff --git a/interface/src/framework/ap/APSettingsForm.tsx b/interface/src/framework/ap/APSettingsForm.tsx
index 8b3419760..8c8163d32 100644
--- a/interface/src/framework/ap/APSettingsForm.tsx
+++ b/interface/src/framework/ap/APSettingsForm.tsx
@@ -74,7 +74,7 @@ const APSettingsForm: FC = () => {
{
{
{
{
{
{
};
return (
-
+
{content()}
);
diff --git a/interface/src/framework/ap/APStatusForm.tsx b/interface/src/framework/ap/APStatusForm.tsx
index e4589c836..5a82f88e9 100644
--- a/interface/src/framework/ap/APStatusForm.tsx
+++ b/interface/src/framework/ap/APStatusForm.tsx
@@ -60,14 +60,14 @@ const APStatusForm: FC = () => {
-
+
IP
-
+
@@ -76,7 +76,7 @@ const APStatusForm: FC = () => {
-
+
@@ -85,7 +85,7 @@ const APStatusForm: FC = () => {
-
+
@@ -99,7 +99,7 @@ const APStatusForm: FC = () => {
};
return (
-
+
{content()}
);
diff --git a/interface/src/framework/ap/AccessPoint.tsx b/interface/src/framework/ap/AccessPoint.tsx
index d90b645cc..efc56217a 100644
--- a/interface/src/framework/ap/AccessPoint.tsx
+++ b/interface/src/framework/ap/AccessPoint.tsx
@@ -13,7 +13,7 @@ import { useI18nContext } from '../../i18n/i18n-react';
const AccessPoint: FC = () => {
const { LL } = useI18nContext();
- useLayoutTitle(LL.ACCESS_POINT());
+ useLayoutTitle(LL.ACCESS_POINT(0));
const authenticatedContext = useContext(AuthenticatedContext);
@@ -22,10 +22,10 @@ const AccessPoint: FC = () => {
return (
<>
-
+
diff --git a/interface/src/framework/mqtt/Mqtt.tsx b/interface/src/framework/mqtt/Mqtt.tsx
index 53ed3b44b..436d784ef 100644
--- a/interface/src/framework/mqtt/Mqtt.tsx
+++ b/interface/src/framework/mqtt/Mqtt.tsx
@@ -22,8 +22,8 @@ const Mqtt: FC = () => {
return (
<>
-
-
+
+
} />
diff --git a/interface/src/framework/mqtt/MqttSettingsForm.tsx b/interface/src/framework/mqtt/MqttSettingsForm.tsx
index 1eecf0b55..d4dbc5f55 100644
--- a/interface/src/framework/mqtt/MqttSettingsForm.tsx
+++ b/interface/src/framework/mqtt/MqttSettingsForm.tsx
@@ -351,7 +351,7 @@ const MqttSettingsForm: FC = () => {
};
return (
-
+
{content()}
);
diff --git a/interface/src/framework/mqtt/MqttStatusForm.tsx b/interface/src/framework/mqtt/MqttStatusForm.tsx
index 825f76731..453db0948 100644
--- a/interface/src/framework/mqtt/MqttStatusForm.tsx
+++ b/interface/src/framework/mqtt/MqttStatusForm.tsx
@@ -50,7 +50,7 @@ const MqttStatusForm: FC = () => {
return LL.NOT_ENABLED();
}
if (connected) {
- return LL.CONNECTED() + (connect_count > 1 ? ' (' + connect_count + ')' : '');
+ return LL.CONNECTED(0) + (connect_count > 1 ? ' (' + connect_count + ')' : '');
}
return LL.DISCONNECTED() + (connect_count > 1 ? ' (' + connect_count + ')' : '');
};
@@ -112,7 +112,7 @@ const MqttStatusForm: FC = () => {
-
+
@@ -121,7 +121,7 @@ const MqttStatusForm: FC = () => {
-
+
>
@@ -137,7 +137,7 @@ const MqttStatusForm: FC = () => {
-
+
{data.enabled && renderConnectionStatus()}
@@ -152,7 +152,7 @@ const MqttStatusForm: FC = () => {
};
return (
-
+
{content()}
);
diff --git a/interface/src/framework/network/NetworkConnection.tsx b/interface/src/framework/network/NetworkConnection.tsx
index 90ecda203..02e4f7e8e 100644
--- a/interface/src/framework/network/NetworkConnection.tsx
+++ b/interface/src/framework/network/NetworkConnection.tsx
@@ -15,7 +15,7 @@ import { useI18nContext } from '../../i18n/i18n-react';
const NetworkConnection: FC = () => {
const { LL } = useI18nContext();
- useLayoutTitle(LL.NETWORK());
+ useLayoutTitle(LL.NETWORK(0));
const { routerTab } = useRouterTab();
@@ -45,9 +45,9 @@ const NetworkConnection: FC = () => {
}}
>
-
+
-
+
} />
diff --git a/interface/src/framework/network/NetworkSettingsForm.tsx b/interface/src/framework/network/NetworkSettingsForm.tsx
index 2fb1e4294..206b920c3 100644
--- a/interface/src/framework/network/NetworkSettingsForm.tsx
+++ b/interface/src/framework/network/NetworkSettingsForm.tsx
@@ -140,7 +140,7 @@ const WiFiSettingsForm: FC = () => {
dBm
}}
@@ -174,7 +174,7 @@ const WiFiSettingsForm: FC = () => {
{
};
return (
-
+
{content()}
);
diff --git a/interface/src/framework/network/NetworkStatusForm.tsx b/interface/src/framework/network/NetworkStatusForm.tsx
index eb99aa45b..3f84b1d47 100644
--- a/interface/src/framework/network/NetworkStatusForm.tsx
+++ b/interface/src/framework/network/NetworkStatusForm.tsx
@@ -73,13 +73,13 @@ const NetworkStatusForm: FC = () => {
case NetworkConnectionStatus.WIFI_STATUS_NO_SSID_AVAIL:
return 'No SSID Available';
case NetworkConnectionStatus.WIFI_STATUS_CONNECTED:
- return LL.CONNECTED() + ' (WiFi)';
+ return LL.CONNECTED(0) + ' (WiFi)';
case NetworkConnectionStatus.ETHERNET_STATUS_CONNECTED:
- return LL.CONNECTED() + ' (Ethernet)';
+ return LL.CONNECTED(0) + ' (Ethernet)';
case NetworkConnectionStatus.WIFI_STATUS_CONNECT_FAILED:
- return LL.CONNECTED() + ' ' + LL.FAILED();
+ return LL.CONNECTED(1) + ' ' + LL.FAILED();
case NetworkConnectionStatus.WIFI_STATUS_CONNECTION_LOST:
- return LL.CONNECTED() + ' ' + LL.LOST();
+ return LL.CONNECTED(1) + ' ' + LL.LOST();
case NetworkConnectionStatus.WIFI_STATUS_DISCONNECTED:
return LL.DISCONNECTED();
default:
@@ -124,7 +124,7 @@ const NetworkStatusForm: FC = () => {
IP
-
+
@@ -133,14 +133,14 @@ const NetworkStatusForm: FC = () => {
-
+
#
-
+
@@ -149,7 +149,7 @@ const NetworkStatusForm: FC = () => {
-
+
@@ -158,7 +158,7 @@ const NetworkStatusForm: FC = () => {
-
+
>
@@ -174,7 +174,7 @@ const NetworkStatusForm: FC = () => {
};
return (
-
+
{content()}
);
diff --git a/interface/src/framework/ntp/NTPSettingsForm.tsx b/interface/src/framework/ntp/NTPSettingsForm.tsx
index f538b87d9..34e302368 100644
--- a/interface/src/framework/ntp/NTPSettingsForm.tsx
+++ b/interface/src/framework/ntp/NTPSettingsForm.tsx
@@ -58,7 +58,7 @@ const NTPSettingsForm: FC = () => {
{
};
return (
-
+
{content()}
);
diff --git a/interface/src/framework/ntp/NTPStatusForm.tsx b/interface/src/framework/ntp/NTPStatusForm.tsx
index 756062eb1..986565a32 100644
--- a/interface/src/framework/ntp/NTPStatusForm.tsx
+++ b/interface/src/framework/ntp/NTPStatusForm.tsx
@@ -100,7 +100,7 @@ const NTPStatusForm: FC = () => {
const renderSetTimeDialog = () => (
@@ -149,7 +149,7 @@ const NTPStatusForm: FC = () => {
-
+
{isNtpEnabled(data) && (
@@ -160,7 +160,7 @@ const NTPStatusForm: FC = () => {
-
+
>
@@ -196,7 +196,7 @@ const NTPStatusForm: FC = () => {
}>
- {LL.SET_TIME()}
+ {LL.SET_TIME(0)}
@@ -208,7 +208,7 @@ const NTPStatusForm: FC = () => {
};
return (
-
+
{content()}
);
diff --git a/interface/src/framework/ntp/NetworkTime.tsx b/interface/src/framework/ntp/NetworkTime.tsx
index ead2d0b3d..bc39dedc3 100644
--- a/interface/src/framework/ntp/NetworkTime.tsx
+++ b/interface/src/framework/ntp/NetworkTime.tsx
@@ -21,8 +21,8 @@ const NetworkTime: FC = () => {
return (
<>
-
-
+
+
} />
diff --git a/interface/src/framework/security/ManageUsersForm.tsx b/interface/src/framework/security/ManageUsersForm.tsx
index 827a5f5d8..29c29c6ee 100644
--- a/interface/src/framework/security/ManageUsersForm.tsx
+++ b/interface/src/framework/security/ManageUsersForm.tsx
@@ -141,7 +141,7 @@ const ManageUsersForm: FC = () => {
{LL.USERNAME()}
- {LL.IS_ADMIN()}
+ {LL.IS_ADMIN(0)}
@@ -192,7 +192,7 @@ const ManageUsersForm: FC = () => {
} variant="outlined" color="secondary" onClick={createUser}>
- {LL.ADD()}
+ {LL.ADD(0)}
diff --git a/interface/src/framework/security/Security.tsx b/interface/src/framework/security/Security.tsx
index 3c5ca85ee..837add325 100644
--- a/interface/src/framework/security/Security.tsx
+++ b/interface/src/framework/security/Security.tsx
@@ -12,7 +12,7 @@ import { useI18nContext } from '../../i18n/i18n-react';
const Security: FC = () => {
const { LL } = useI18nContext();
- useLayoutTitle(LL.SECURITY());
+ useLayoutTitle(LL.SECURITY(0));
const { routerTab } = useRouterTab();
@@ -20,7 +20,7 @@ const Security: FC = () => {
<>
-
+
} />
diff --git a/interface/src/framework/security/SecuritySettingsForm.tsx b/interface/src/framework/security/SecuritySettingsForm.tsx
index afadbed8d..33d422573 100644
--- a/interface/src/framework/security/SecuritySettingsForm.tsx
+++ b/interface/src/framework/security/SecuritySettingsForm.tsx
@@ -46,7 +46,7 @@ const SecuritySettingsForm: FC = () => {
{
};
return (
-
+
{content()}
);
diff --git a/interface/src/framework/security/UserForm.tsx b/interface/src/framework/security/UserForm.tsx
index 7a8f0d105..28e659469 100644
--- a/interface/src/framework/security/UserForm.tsx
+++ b/interface/src/framework/security/UserForm.tsx
@@ -54,7 +54,7 @@ const UserForm: FC = ({ creating, validator, user, setUser, onDon
{user && (
<>
- {creating ? LL.ADD() : LL.MODIFY()} {LL.USER()}
+ {creating ? LL.ADD(1) : LL.MODIFY()} {LL.USER(1)}
= ({ creating, validator, user, setUser, onDon
/>
}
- label={LL.IS_ADMIN()}
+ label={LL.IS_ADMIN(1)}
/>
@@ -94,7 +94,7 @@ const UserForm: FC = ({ creating, validator, user, setUser, onDon
color="primary"
autoFocus
>
- {LL.ADD()}
+ {LL.ADD(0)}
>
diff --git a/interface/src/framework/system/GeneralFileUpload.tsx b/interface/src/framework/system/GeneralFileUpload.tsx
index 64754972b..cb3fee48b 100644
--- a/interface/src/framework/system/GeneralFileUpload.tsx
+++ b/interface/src/framework/system/GeneralFileUpload.tsx
@@ -85,7 +85,7 @@ const GeneralFileUpload: FC = ({ uploadGeneralFile }) => {
{!uploading && (
<>
- {LL.DOWNLOAD()}
+ {LL.DOWNLOAD(0)}
@@ -93,7 +93,7 @@ const GeneralFileUpload: FC = ({ uploadGeneralFile }) => {
} variant="outlined" color="primary" onClick={() => downloadSettings()}>
- {LL.SETTINGS()}
+ {LL.SETTINGS_OF("")}
diff --git a/interface/src/framework/system/OTASettingsForm.tsx b/interface/src/framework/system/OTASettingsForm.tsx
index a35ecc741..e5350694f 100644
--- a/interface/src/framework/system/OTASettingsForm.tsx
+++ b/interface/src/framework/system/OTASettingsForm.tsx
@@ -93,7 +93,7 @@ const OTASettingsForm: FC = () => {
};
return (
-
+
{content()}
);
diff --git a/interface/src/framework/system/System.tsx b/interface/src/framework/system/System.tsx
index 5d6110da6..8864bb7d0 100644
--- a/interface/src/framework/system/System.tsx
+++ b/interface/src/framework/system/System.tsx
@@ -17,7 +17,7 @@ import { useI18nContext } from '../../i18n/i18n-react';
const System: FC = () => {
const { LL } = useI18nContext();
- useLayoutTitle(LL.SYSTEM());
+ useLayoutTitle(LL.SYSTEM(0));
const { me } = useContext(AuthenticatedContext);
const { features } = useContext(FeaturesContext);
@@ -26,10 +26,10 @@ const System: FC = () => {
return (
<>
-
-
+
+
- {features.ota && }
+ {features.ota && }
{features.upload_firmware && }
diff --git a/interface/src/framework/system/SystemLog.tsx b/interface/src/framework/system/SystemLog.tsx
index 1b7c83cd0..8d4c2a61f 100644
--- a/interface/src/framework/system/SystemLog.tsx
+++ b/interface/src/framework/system/SystemLog.tsx
@@ -202,7 +202,7 @@ const SystemLog: FC = () => {
{
};
return (
-
+
{content()}
);
diff --git a/interface/src/framework/system/SystemStatusForm.tsx b/interface/src/framework/system/SystemStatusForm.tsx
index 9bdd4a4c0..31c57e7ef 100644
--- a/interface/src/framework/system/SystemStatusForm.tsx
+++ b/interface/src/framework/system/SystemStatusForm.tsx
@@ -135,7 +135,7 @@ const SystemStatusForm: FC = () => {
) (
- {LL.DOWNLOAD()}
+ {LL.DOWNLOAD(1)}
)
@@ -150,7 +150,7 @@ const SystemStatusForm: FC = () => {
) (
- {LL.DOWNLOAD()}
+ {LL.DOWNLOAD(1)}
)
@@ -229,7 +229,7 @@ const SystemStatusForm: FC = () => {
-
+
{latestVersion && (
@@ -878,7 +878,7 @@ const DashboardData: FC = () => {
endIcon={getSortIcon(sensor_sort.state, 'TEMPERATURE')}
onClick={() => sensor_sort.fns.onToggleSort({ sortKey: 'TEMPERATURE' })}
>
- {LL.VALUE()}
+ {LL.VALUE(0)}
@@ -946,7 +946,7 @@ const DashboardData: FC = () => {
{LL.TYPE()}
- {LL.VALUE()}
+ {LL.VALUE(0)}
@@ -986,11 +986,11 @@ const DashboardData: FC = () => {
});
if (response.status === 204) {
- enqueueSnackbar(LL.ANALOG_SENSOR() + ' ' + LL.DELETION() + ' ' + LL.FAILED(), { variant: 'error' });
+ enqueueSnackbar(LL.DELETION_OF( LL.ANALOG_SENSOR() ) + ' ' + LL.FAILED(), { variant: 'error' });
} else if (response.status === 403) {
enqueueSnackbar(LL.ACCESS_DENIED(), { variant: 'error' });
} else {
- enqueueSnackbar(LL.ANALOG_SENSOR() + ' ' + LL.REMOVED(), { variant: 'success' });
+ enqueueSnackbar( LL.REMOVED_OF( LL.ANALOG_SENSOR() ), { variant: 'success' });
}
} catch (error) {
enqueueSnackbar(extractErrorMessage(error, LL.PROBLEM_UPDATING()), { variant: 'error' });
@@ -1014,11 +1014,11 @@ const DashboardData: FC = () => {
});
if (response.status === 204) {
- enqueueSnackbar(LL.ANALOG_SENSOR() + ' ' + LL.UPDATE() + ' ' + LL.FAILED(), { variant: 'error' });
+ enqueueSnackbar(LL.UPDATE_OF( LL.ANALOG_SENSOR() ) + ' ' + LL.FAILED(), { variant: 'error' });
} else if (response.status === 403) {
enqueueSnackbar(LL.ACCESS_DENIED(), { variant: 'error' });
} else {
- enqueueSnackbar(LL.ANALOG_SENSOR() + ' ' + LL.UPDATED(), { variant: 'success' });
+ enqueueSnackbar(LL.UPDATED_OF( LL.ANALOG_SENSOR() ), { variant: 'success' });
}
} catch (error) {
enqueueSnackbar(extractErrorMessage(error, LL.PROBLEM_UPDATING()), { variant: 'error' });
@@ -1077,7 +1077,7 @@ const DashboardData: FC = () => {
{analog.t >= AnalogType.COUNTER && analog.t <= AnalogType.RATE && (
<>
-
+
{DeviceValueUOM_s.map((val, i) => (