refactor(ui): improve i18n

This commit is contained in:
Fu Diwei
2024-12-10 16:37:24 +08:00
parent a4eff0b408
commit 8fe0d342aa
76 changed files with 214 additions and 266 deletions

View File

@@ -84,10 +84,10 @@ const Account = () => {
<div className="flex justify-end">
{changed ? (
<Button type="submit">{t("common.update")}</Button>
<Button type="submit">{t("common.button.save")}</Button>
) : (
<Button type="submit" disabled variant={"secondary"}>
{t("common.update")}
{t("common.button.save")}
</Button>
)}
</div>

View File

@@ -124,7 +124,7 @@ const Password = () => {
)}
/>
<div className="flex justify-end">
<Button type="submit">{t("common.update")}</Button>
<Button type="submit">{t("common.button.save")}</Button>
</div>
</form>
</Form>

View File

@@ -80,13 +80,13 @@ const SSLProvider = () => {
const resp = await update({ ...data });
setConfig(resp);
toast({
title: t("common.update.succeeded.message"),
description: t("common.update.succeeded.message"),
title: t("common.text.operation_succeeded"),
description: t("common.text.operation_succeeded"),
});
} catch (e) {
const message = getErrMsg(e);
toast({
title: t("common.update.failed.message"),
title: t("common.text.operation_failed"),
description: message,
variant: "destructive",
});
@@ -222,7 +222,7 @@ const SSLProviderLetsEncryptForm = () => {
<FormMessage />
<div className="flex justify-end">
<Button type="submit">{t("common.update")}</Button>
<Button type="submit">{t("common.button.save")}</Button>
</div>
</form>
</Form>
@@ -328,7 +328,7 @@ const SSLProviderZeroSSLForm = () => {
<FormMessage />
<div className="flex justify-end">
<Button type="submit">{t("common.update")}</Button>
<Button type="submit">{t("common.button.save")}</Button>
</div>
</form>
</Form>
@@ -435,7 +435,7 @@ const SSLProviderGtsForm = () => {
<FormMessage />
<div className="flex justify-end">
<Button type="submit">{t("common.update")}</Button>
<Button type="submit">{t("common.button.save")}</Button>
</div>
</form>
</Form>