add localisation for strings

This commit is contained in:
Vishnu Sreekumaran Nair committed 2025-05-07 14:57:50 -04:00
1 parent e7742f9be8
commit 7c8aea0323
2 files changed
+12 -7

No files matched your search

+6 -6
View File
@@ -96,7 +96,7 @@ const Settings = () => {
setIsApiKeySet(true); setIsApiKeySet(true);
setForm((prev) => ({ setForm((prev) => ({
...prev, ...prev,
pagespeedApiKey: "*************************************", pagespeedApiKey: t("maskedPageSpeedKeyPlaceholder"),
})); }));
} else { } else {
setIsApiKeySet(false); setIsApiKeySet(false);
@@ -315,9 +315,9 @@ const Settings = () => {
)} )}
<ConfigBox> <ConfigBox>
<Box> <Box>
<Typography component="h1">Google Pagespeed API Key</Typography> <Typography component="h1">{t("pageSpeedApiKeyFieldTitle")}</Typography>
<Typography sx={{ mt: theme.spacing(2), mb: theme.spacing(2) }}> <Typography sx={{ mt: theme.spacing(2), mb: theme.spacing(2) }}>
Manage your pagespeed API key {t("pageSpeedApiKeyFieldDescription")}
</Typography> </Typography>
</Box> </Box>
<Box> <Box>
@@ -325,7 +325,7 @@ const Settings = () => {
<Box flex={1}> <Box flex={1}>
<TextInput <TextInput
id="pagespeedApiKey" id="pagespeedApiKey"
label="PageSpeed API Key" label={t("pageSpeedApiKeyFieldLabel")}
value={form.pagespeedApiKey} value={form.pagespeedApiKey}
type={apiKeyFieldType} type={apiKeyFieldType}
onChange={handleChange} onChange={handleChange}
@@ -343,8 +343,8 @@ const Settings = () => {
} }
/> />
{isApiKeySet && ( {isApiKeySet && (
<Typography > <Typography>
API key is set. Click Reset to change it. {t("pageSpeedApiKeyFieldResetLabel")}
</Typography> </Typography>
)} )}
</Box> </Box>
+6 -1
View File
@@ -410,5 +410,10 @@
"validationFailed": "Validation failed", "validationFailed": "Validation failed",
"noFileSelected": "No file selected", "noFileSelected": "No file selected",
"fallbackPage": "Import a file to upload a list of servers in bulk" "fallbackPage": "Import a file to upload a list of servers in bulk"
} },
"maskedPageSpeedKeyPlaceholder": "*************************************",
"pageSpeedApiKeyFieldTitle": "Google PageSpeed API key",
"pageSpeedApiKeyFieldLabel": "PageSpeed API key",
"pageSpeedApiKeyFieldDescription": "Enter your Google PageSpeed API key to enable pagespeed monitoring. Click Reset to update the key.",
"pageSpeedApiKeyFieldResetLabel": "API key is set. Click Reset to change it."
} }