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