mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-05 05:50:19 +08:00
feat: reduce i18n items
This commit is contained in:
@ -920,7 +920,7 @@ export function getClickable(text) {
|
||||
return (
|
||||
<a onClick={() => {
|
||||
copy(text);
|
||||
showMessage("success", "Copied to clipboard");
|
||||
showMessage("success", i18next.t("general:Copied to clipboard successfully"));
|
||||
}}>
|
||||
{text}
|
||||
</a>
|
||||
@ -1171,7 +1171,7 @@ export function renderLogo(application) {
|
||||
|
||||
function isSigninMethodEnabled(application, signinMethod) {
|
||||
if (application && application.signinMethods) {
|
||||
return application.signinMethods.filter(item => item.name === signinMethod && item.rule !== "Hide-Password").length > 0;
|
||||
return application.signinMethods.filter(item => item.name === signinMethod && item.rule !== "Hide password").length > 0;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@ -1550,25 +1550,25 @@ export function getDefaultHtmlEmailContent() {
|
||||
|
||||
export function getCurrencyText(product) {
|
||||
if (product?.currency === "USD") {
|
||||
return i18next.t("product:USD");
|
||||
return i18next.t("currency:USD");
|
||||
} else if (product?.currency === "CNY") {
|
||||
return i18next.t("product:CNY");
|
||||
return i18next.t("currency:CNY");
|
||||
} else if (product?.currency === "EUR") {
|
||||
return i18next.t("product:EUR");
|
||||
return i18next.t("currency:EUR");
|
||||
} else if (product?.currency === "JPY") {
|
||||
return i18next.t("product:JPY");
|
||||
return i18next.t("currency:JPY");
|
||||
} else if (product?.currency === "GBP") {
|
||||
return i18next.t("product:GBP");
|
||||
return i18next.t("currency:GBP");
|
||||
} else if (product?.currency === "AUD") {
|
||||
return i18next.t("product:AUD");
|
||||
return i18next.t("currency:AUD");
|
||||
} else if (product?.currency === "CAD") {
|
||||
return i18next.t("product:CAD");
|
||||
return i18next.t("currency:CAD");
|
||||
} else if (product?.currency === "CHF") {
|
||||
return i18next.t("product:CHF");
|
||||
return i18next.t("currency:CHF");
|
||||
} else if (product?.currency === "HKD") {
|
||||
return i18next.t("product:HKD");
|
||||
return i18next.t("currency:HKD");
|
||||
} else if (product?.currency === "SGD") {
|
||||
return i18next.t("product:SGD");
|
||||
return i18next.t("currency:SGD");
|
||||
} else {
|
||||
return "(Unknown currency)";
|
||||
}
|
||||
|
Reference in New Issue
Block a user