mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-20 05:33:49 +08:00
feat: support most popular currencies (#3388)
This commit is contained in:
@ -123,6 +123,22 @@ class ProductBuyPage extends React.Component {
|
|||||||
return "$";
|
return "$";
|
||||||
} else if (product?.currency === "CNY") {
|
} else if (product?.currency === "CNY") {
|
||||||
return "¥";
|
return "¥";
|
||||||
|
} else if (product?.currency === "EUR") {
|
||||||
|
return "€";
|
||||||
|
} else if (product?.currency === "JPY") {
|
||||||
|
return "¥";
|
||||||
|
} else if (product?.currency === "GBP") {
|
||||||
|
return "£";
|
||||||
|
} else if (product?.currency === "AUD") {
|
||||||
|
return "A$";
|
||||||
|
} else if (product?.currency === "CAD") {
|
||||||
|
return "C$";
|
||||||
|
} else if (product?.currency === "CHF") {
|
||||||
|
return "CHF";
|
||||||
|
} else if (product?.currency === "HKD") {
|
||||||
|
return "HK$";
|
||||||
|
} else if (product?.currency === "SGD") {
|
||||||
|
return "S$";
|
||||||
} else {
|
} else {
|
||||||
return "(Unknown currency)";
|
return "(Unknown currency)";
|
||||||
}
|
}
|
||||||
|
@ -209,6 +209,14 @@ class ProductEditPage extends React.Component {
|
|||||||
[
|
[
|
||||||
{id: "USD", name: "USD"},
|
{id: "USD", name: "USD"},
|
||||||
{id: "CNY", name: "CNY"},
|
{id: "CNY", name: "CNY"},
|
||||||
|
{id: "EUR", name: "EUR"},
|
||||||
|
{id: "JPY", name: "JPY"},
|
||||||
|
{id: "GBP", name: "GBP"},
|
||||||
|
{id: "AUD", name: "AUD"},
|
||||||
|
{id: "CAD", name: "CAD"},
|
||||||
|
{id: "CHF", name: "CHF"},
|
||||||
|
{id: "HKD", name: "HKD"},
|
||||||
|
{id: "SGD", name: "SGD"},
|
||||||
].map((item, index) => <Option key={index} value={item.id}>{item.name}</Option>)
|
].map((item, index) => <Option key={index} value={item.id}>{item.name}</Option>)
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
|
@ -1553,6 +1553,22 @@ export function getCurrencyText(product) {
|
|||||||
return i18next.t("product:USD");
|
return i18next.t("product:USD");
|
||||||
} else if (product?.currency === "CNY") {
|
} else if (product?.currency === "CNY") {
|
||||||
return i18next.t("product:CNY");
|
return i18next.t("product:CNY");
|
||||||
|
} else if (product?.currency === "EUR") {
|
||||||
|
return i18next.t("product:EUR");
|
||||||
|
} else if (product?.currency === "JPY") {
|
||||||
|
return i18next.t("product:JPY");
|
||||||
|
} else if (product?.currency === "GBP") {
|
||||||
|
return i18next.t("product:GBP");
|
||||||
|
} else if (product?.currency === "AUD") {
|
||||||
|
return i18next.t("product:AUD");
|
||||||
|
} else if (product?.currency === "CAD") {
|
||||||
|
return i18next.t("product:CAD");
|
||||||
|
} else if (product?.currency === "CHF") {
|
||||||
|
return i18next.t("product:CHF");
|
||||||
|
} else if (product?.currency === "HKD") {
|
||||||
|
return i18next.t("product:HKD");
|
||||||
|
} else if (product?.currency === "SGD") {
|
||||||
|
return i18next.t("product:SGD");
|
||||||
} else {
|
} else {
|
||||||
return "(Unknown currency)";
|
return "(Unknown currency)";
|
||||||
}
|
}
|
||||||
|
@ -741,7 +741,15 @@
|
|||||||
"There is no payment channel for this product.": "There is no payment channel for this product.",
|
"There is no payment channel for this product.": "There is no payment channel for this product.",
|
||||||
"This product is currently not in sale.": "This product is currently not in sale.",
|
"This product is currently not in sale.": "This product is currently not in sale.",
|
||||||
"USD": "USD",
|
"USD": "USD",
|
||||||
"WeChat Pay": "WeChat Pay"
|
"WeChat Pay": "WeChat Pay",
|
||||||
|
"EUR": "EUR",
|
||||||
|
"JPY": "JPY",
|
||||||
|
"GBP": "GBP",
|
||||||
|
"AUD": "AUD",
|
||||||
|
"CAD": "CAD",
|
||||||
|
"CHF": "CHF",
|
||||||
|
"HKD": "HKD",
|
||||||
|
"SGD": "SGD"
|
||||||
},
|
},
|
||||||
"provider": {
|
"provider": {
|
||||||
"Access key": "Access key",
|
"Access key": "Access key",
|
||||||
|
@ -741,7 +741,15 @@
|
|||||||
"There is no payment channel for this product.": "该商品没有付款方式。",
|
"There is no payment channel for this product.": "该商品没有付款方式。",
|
||||||
"This product is currently not in sale.": "该商品目前未在售。",
|
"This product is currently not in sale.": "该商品目前未在售。",
|
||||||
"USD": "美元",
|
"USD": "美元",
|
||||||
"WeChat Pay": "微信支付"
|
"WeChat Pay": "微信支付",
|
||||||
|
"EUR": "欧元",
|
||||||
|
"JPY": "日元",
|
||||||
|
"GBP": "英镑",
|
||||||
|
"AUD": "澳元",
|
||||||
|
"CAD": "加元",
|
||||||
|
"CHF": "瑞士法郎",
|
||||||
|
"HKD": "港币",
|
||||||
|
"SGD": "新加坡元"
|
||||||
},
|
},
|
||||||
"provider": {
|
"provider": {
|
||||||
"Access key": "访问密钥",
|
"Access key": "访问密钥",
|
||||||
|
Reference in New Issue
Block a user