feat: Make phone number input international & change library related

1. make phone number input international
2. change phone number library to libphonenumber

Change-Id: I25bb8006646d8f54b5e4bd0f84f713823f45ec5f
This commit is contained in:
zhuyue 2021-11-08 19:00:03 +08:00
parent 9d0e402048
commit 98cf22128f
14 changed files with 1247 additions and 19 deletions

View File

@ -64,13 +64,13 @@
"ip-address": "^7.1.0",
"js-yaml": "^4.0.0",
"json2csv": "^5.0.1",
"libphonenumber-js": "^1.9.42",
"lodash": "^4.17.19",
"mobx": "^5.1.0",
"mobx-react": "^5.2.8",
"mobx-react-router": "^4.1.0",
"moment": "^2.24.0",
"nanoid": "^3.0.2",
"phone": "^3.1.6",
"promise-polyfill": "^8.1.3",
"prop-types": "^15.7.2",
"qs": "^6.9.4",

View File

@ -0,0 +1,458 @@
const countryOptions = {
1: [
'US',
'AG',
'AI',
'AS',
'BB',
'BM',
'BS',
'CA',
'DM',
'DO',
'GD',
'GU',
'JM',
'KN',
'KY',
'LC',
'MP',
'MS',
'PR',
'SX',
'TC',
'TT',
'VC',
'VG',
'VI',
],
7: ['RU', 'KZ'],
20: ['EG'],
27: ['ZA'],
30: ['GR'],
31: ['NL'],
32: ['BE'],
33: ['FR'],
34: ['ES'],
36: ['HU'],
39: ['IT', 'VA'],
40: ['RO'],
41: ['CH'],
43: ['AT'],
44: ['GB', 'GG', 'IM', 'JE'],
45: ['DK'],
46: ['SE'],
47: ['NO', 'SJ'],
48: ['PL'],
49: ['DE'],
51: ['PE'],
52: ['MX'],
53: ['CU'],
54: ['AR'],
55: ['BR'],
56: ['CL'],
57: ['CO'],
58: ['VE'],
60: ['MY'],
61: ['AU', 'CC', 'CX'],
62: ['ID'],
63: ['PH'],
64: ['NZ'],
65: ['SG'],
66: ['TH'],
81: ['JP'],
82: ['KR'],
84: ['VN'],
86: ['CN'],
90: ['TR'],
91: ['IN'],
92: ['PK'],
93: ['AF'],
94: ['LK'],
95: ['MM'],
98: ['IR'],
212: ['MA', 'EH'],
213: ['DZ'],
216: ['TN'],
218: ['LY'],
220: ['GM'],
221: ['SN'],
222: ['MR'],
223: ['ML'],
224: ['GN'],
225: ['CI'],
226: ['BF'],
227: ['NE'],
228: ['TG'],
229: ['BJ'],
230: ['MU'],
231: ['LR'],
232: ['SL'],
233: ['GH'],
234: ['NG'],
235: ['TD'],
236: ['CF'],
237: ['CM'],
238: ['CV'],
240: ['GQ'],
241: ['GA'],
242: ['CG'],
244: ['AO'],
245: ['GW'],
246: ['IO'],
248: ['SC'],
249: ['SD'],
250: ['RW'],
251: ['ET'],
252: ['SO'],
253: ['DJ'],
254: ['KE'],
255: ['TZ'],
256: ['UG'],
257: ['BI'],
258: ['MZ'],
260: ['ZM'],
261: ['MG'],
262: ['RE', 'YT'],
263: ['ZW'],
264: ['NA'],
265: ['MW'],
266: ['LS'],
267: ['BW'],
268: ['SZ'],
269: ['KM'],
291: ['ER'],
297: ['AW'],
298: ['FO'],
299: ['GL'],
350: ['GI'],
351: ['PT'],
352: ['LU'],
353: ['IE'],
354: ['IS'],
355: ['AL'],
356: ['MT'],
357: ['CY'],
358: ['FI', 'AX'],
359: ['BG'],
371: ['LV'],
372: ['EE'],
373: ['MD'],
374: ['AM'],
375: ['BY'],
376: ['AD'],
377: ['MC'],
378: ['SM'],
380: ['UA'],
385: ['HR'],
386: ['SI'],
387: ['BA'],
420: ['CZ'],
421: ['SK'],
423: ['LI'],
500: ['FK'],
501: ['BZ'],
502: ['GT'],
503: ['SV'],
504: ['HN'],
505: ['NI'],
506: ['CR'],
507: ['PA'],
509: ['HT'],
590: ['GP', 'BL', 'MF'],
591: ['BO'],
592: ['GY'],
593: ['EC'],
594: ['GF'],
595: ['PY'],
596: ['MQ'],
597: ['SR'],
598: ['UY'],
672: ['NF'],
673: ['BN'],
674: ['NR'],
675: ['PG'],
676: ['TO'],
677: ['SB'],
678: ['VU'],
679: ['FJ'],
680: ['PW'],
681: ['WF'],
682: ['CK'],
685: ['WS'],
687: ['NC'],
688: ['TV'],
689: ['PF'],
690: ['TK'],
691: ['FM'],
692: ['MH'],
850: ['KP'],
852: ['HK'],
853: ['MO'],
855: ['KH'],
856: ['LA'],
880: ['BD'],
886: ['TW'],
960: ['MV'],
961: ['LB'],
962: ['JO'],
963: ['SY'],
964: ['IQ'],
965: ['KW'],
966: ['SA'],
967: ['YE'],
968: ['OM'],
970: ['PS'],
971: ['AE'],
972: ['IL'],
973: ['BH'],
974: ['QA'],
975: ['BT'],
976: ['MN'],
977: ['NP'],
992: ['TJ'],
993: ['TM'],
994: ['AZ'],
995: ['GE'],
996: ['KG'],
998: ['UZ'],
};
const i18nDict = {
CN: t('China'),
TW: t('Taiwan'),
HK: t('Hong Kong'),
MO: t('Macau'),
KR: t('South Korea'),
JP: t('Japan'),
MY: t('Malaysia'),
SG: t('Singapore'),
NZ: t('New Zealand'),
AU: t('Australia'),
US: t('United States'),
CA: t('Canada'),
VN: t('Vietnam'),
IN: t('India'),
ID: t('Indonesia'),
TH: t('Thailand'),
PH: t('Philippines'),
DK: t('Denmark'),
FI: t('Finland'),
FR: t('France'),
DE: t('Germany'),
GR: t('Greece'),
IE: t('Ireland'),
IL: t('Israel'),
IT: t('Italy'),
MX: t('Mexico'),
NL: t('Netherlands'),
NO: t('Norway'),
PT: t('Portugal'),
RU: t('Russia'),
ZA: t('South Africa'),
ES: t('Spain'),
SE: t('Sweden'),
CH: t('Switzerland'),
BE: t('Belgium'),
GB: t('United Kingdom'),
AR: t('Argentina'),
BR: t('Brazil'),
KH: t('Kampuchea'),
LTU: t('Lithuania'),
LK: t('Sri Lanka'),
NG: t('Nigeria'),
AF: t('Afghanistan'),
AL: t('Albania'),
DZ: t('Algeria'),
AS: t('American Samoa'),
AD: t('Andorra'),
AG: t('Antigua and Barbuda'),
AM: t('Armenia'),
AT: t('Austria'),
BS: t('Bahamas'),
BH: t('Bahrain'),
BD: t('Bangladesh'),
BY: t('Belarus'),
BM: t('Bermuda'),
BA: t('Bosnia and Herzegovina'),
IO: t('British Indian Ocean Territory'),
BF: t('Burkina Faso'),
CF: t('Central African Republic'),
TD: t('Chad'),
CX: t('Christmas Island'),
CC: t('Cocos (Keeling) Islands'),
CO: t('Colombia'),
CG: t('Republic Of The Congo'),
ZR: t('Democratic Republic of the Congo'),
CR: t('Costa Rica'),
CI: t("Cote D'Ivoire"),
CU: t('Cuba'),
CZ: t('Czech Republic'),
GQ: t('Equatorial Guinea'),
EE: t('Estonia'),
FK: t('Falkland Islands (Malvinas)'),
PF: t('French Polynesia'),
GA: t('Gabon'),
GP: t('Guadeloupe'),
GW: t('Guinea Bissau'),
GY: t('Guyana'),
HN: t('Honduras'),
HU: t('Hungary'),
JO: t('Jordan'),
KZ: t('Kazakhstan'),
KE: t('Kenya'),
KW: t('Kuwait'),
KG: t('Kyrgyzstan'),
LS: t('Lesotho'),
MG: t('Madagascar'),
MV: t('Maldives'),
YT: t('Mayotte'),
FM: t('Micronesia'),
MC: t('Monaco'),
MN: t('Mongolia'),
MNE: t('Montenegro'),
MS: t('Montserrat'),
MM: t('Myanmar'),
NR: t('Nauru'),
NP: t('Nepal'),
AN: t('Netherlands Antilles'),
NC: t('New Caledonia'),
NI: t('Nicaragua'),
NF: t('Norfolk Island'),
KP: t('North Korea'),
MP: t('Northern Mariana Islands'),
OM: t('Oman'),
PK: t('Pakistan'),
PW: t('Palau'),
PA: t('Panama'),
PG: t('Papua New Guinea'),
PN: t('Pitcairn'),
PL: t('Poland'),
PR: t('Puerto Rico'),
QA: t('Qatar'),
RE: t('Reunion'),
VCT: t('Saint Vincent and the Grenadines'),
STP: t('Sao Tome and Principe'),
SA: t('Saudi Arabia'),
SRB: t('Serbia'),
SC: t('Seychelles'),
SK: t('Slovakia (Slovak Republic)'),
SI: t('Slovenia'),
SZ: t('Swaziland'),
TJ: t('Tajikistan'),
KNA: t('The Federation of Saint Kitts and Nevis'),
ABH: t('the Republic of Abkhazia'),
MKD: t('The Republic of Macedonia'),
SSD: t('The Republic of South Sudan'),
TN: t('Tunisia'),
TM: t('Turkmenistan'),
TV: t('Tuvalu'),
UG: t('Uganda'),
UA: t('Ukraine'),
AE: t('United Arab Emirates'),
UY: t('Uruguay'),
UZ: t('Uzbekistan'),
VA: t('Vatican City State (Holy See)'),
WF: t('Wallis And Futuna Islands'),
EH: t('Western Sahara'),
YU: t('Yugoslavia'),
ZM: t('Zambia'),
AO: t('Angola'),
AI: t('Anguilla'),
AW: t('Aruba'),
AZ: t('Azerbaijan'),
BB: t('Barbados'),
BZ: t('Belize'),
BJ: t('Benin'),
BT: t('Bhutan'),
BO: t('Bolivia'),
BW: t('Botswana'),
BN: t('Brunei Darussalam'),
BG: t('Bulgaria'),
BI: t('Burundi'),
CM: t('Cameroon'),
CV: t('Cape Verde'),
KY: t('Cayman Islands'),
CL: t('Chile'),
KM: t('Comoros'),
CK: t('Cook Islands'),
HR: t('Croatia (local name: Hrvatska)'),
CY: t('Cyprus'),
DJ: t('Djibouti'),
DM: t('Dominica'),
TP: t('East Timor'),
EC: t('Ecuador'),
EG: t('Egypt'),
SV: t('El Salvador'),
ER: t('Eritrea'),
ET: t('Ethiopia'),
FO: t('Faroe Islands'),
FJ: t('Fiji'),
GF: t('French Guiana'),
GM: t('Gambia'),
GE: t('Georgia'),
GH: t('Ghana'),
GI: t('Gibraltar'),
GL: t('Greenland'),
GD: t('Grenada'),
GU: t('Guam'),
GT: t('Guatemala'),
GN: t('Guinea'),
HT: t('Haiti'),
IS: t('Iceland'),
IR: t('Iran (Islamic Republic of)'),
IQ: t('Iraq'),
JM: t('Jamaica'),
LAO: t("Lao People's Democratic Republic"),
LV: t('Latvia'),
LB: t('Lebanon'),
LR: t('Liberia'),
LY: t('Libyan Arab Jamahiriya'),
LI: t('Liechtenstein'),
LU: t('Luxembourg'),
MW: t('Malawi'),
ML: t('Mali'),
MT: t('Malta'),
MH: t('Marshall Islands'),
MQ: t('Martinique'),
MR: t('Mauritania'),
MU: t('Mauritius'),
MD: t('Moldova'),
MA: t('Morocco'),
MZ: t('Mozambique'),
NA: t('Namibia'),
NE: t('Niger'),
PS: t('Palestine'),
PY: t('Paraguay'),
PE: t('Peru'),
RO: t('Romania'),
RW: t('Rwanda'),
WS: t('Samoa'),
SM: t('San Marino'),
SN: t('Senegal'),
SL: t('Sierra Leone'),
SB: t('Solomon Islands'),
SO: t('Somalia'),
SD: t('Sudan'),
SR: t('Suriname'),
SY: t('Syrian Arab Republic'),
TZ: t('Tanzania'),
TG: t('Togo'),
TK: t('Tokelau'),
TO: t('Tonga'),
TT: t('Trinidad and Tobago'),
TR: t('Turkey'),
TC: t('Turks and Caicos Islands'),
VU: t('Vanuatu'),
VE: t('Venezuela'),
VI: t('Virgin Islands (U.S.)'),
YE: t('Yemen'),
ZW: t('Zimbabwe'),
};
export const defaultCountries = Object.keys(countryOptions).map((prefix) => ({
label: `+${prefix} ${countryOptions[prefix]
.map((i) => i18nDict[i])
.join(',')}`,
value: `+${prefix}`,
}));

View File

@ -0,0 +1,63 @@
import React, { useState, useEffect } from 'react';
import { Input, Select } from 'antd';
import { defaultCountries } from './countries';
export default function InternationPhoneNumberInput({
value,
options,
onChange,
}) {
const [prefix, setPrefix] = useState(value.split(' ')[0]);
const [number, setNumber] = useState(value.split(' ')[1]);
useEffect(() => {
const [oldPrefix, oldNumber] = value.split(' ');
if (oldPrefix !== prefix || oldNumber !== number) {
setPrefix(oldPrefix);
setNumber(oldNumber);
}
}, [value]);
const triggerChange = (changedValue) => {
const newValue = {
prefix,
number,
...changedValue,
};
onChange(`${newValue.prefix} ${newValue.number}`);
};
return (
<Input.Group compact>
<Select
showSearch
value={prefix}
onChange={(val) => {
setPrefix(val);
triggerChange({ prefix: val });
}}
style={{ width: '50%' }}
options={options}
filterOption={(inputValue, option) =>
option.label.toLowerCase().includes(inputValue.toLowerCase())
}
getPopupContainer={() => document.body}
/>
<Input
value={number}
onChange={(e) => {
const newVal = e.target.value;
setNumber(newVal);
triggerChange({ number: newVal });
}}
style={{ width: '50%' }}
/>
</Input.Group>
);
}
InternationPhoneNumberInput.defaultProps = {
value: '+86 ',
options: defaultCountries,
};

View File

@ -58,7 +58,8 @@ import NetworkSelectTable from './NetworkSelectTable';
import VolumeSelectTable from './VolumeSelectTable';
import TabSelectTable from './TabSelectTable';
import TreeSelect from './TreeSelect';
import SelectWithInput from './SelectWithInput'
import SelectWithInput from './SelectWithInput';
import InternationPhoneNumberInput from './InternationalPhoneNumberInput';
// import styles from './index.less';
export const type2component = {
@ -105,6 +106,7 @@ export const type2component = {
'input-json': JsonInput,
'tree-select': TreeSelect,
'select-input': SelectWithInput,
phone: InternationPhoneNumberInput,
};
export default class FormItem extends React.Component {

View File

@ -65,12 +65,15 @@
"Affinity": "Affinity",
"Affinity (mandatory):": "Affinity (mandatory):",
"Affinity (not mandatory):": "Affinity (not mandatory):",
"Afghanistan": "Afghanistan",
"After attaching interface, you may need to login the instance to update the network interface configuration and restart the network service.": "After attaching interface, you may need to login the instance to update the network interface configuration and restart the network service.",
"After disable the compute service, the new instance will not schedule to the compute node.": "After disable the compute service, the new instance will not schedule to the compute node.",
"After shelving, the instance will be shut down, resources will be released, and the snapshot will be saved to Glance. This will take about a few minutes, please be patient. You also can choose to unshelve to restore the instance.": "After shelving, the instance will be shut down, resources will be released, and the snapshot will be saved to Glance. This will take about a few minutes, please be patient. You also can choose to unshelve to restore the instance.",
"After the volume is expanded, the volume cannot be reduced.": "After the volume is expanded, the volume cannot be reduced.",
"Agent": "Agent",
"Agree to force shutdown": "Agree to force shutdown",
"Albania": "Albania",
"Algeria": "Algeria",
"All": "All",
"All Flavors": "All Flavors",
"All ICMP": "All ICMP",
@ -85,9 +88,14 @@
"Allocate IP": "Allocate IP",
"Allocation Pools": "Allocation Pools",
"Allowed Address Pair": "Allowed Address Pair",
"American Samoa": "American Samoa",
"Andorra": "Andorra",
"Angola": "Angola",
"Anguilla": "Anguilla",
"Anti-Affinity": "Anti-Affinity",
"Anti-affinity (mandatory):": "Anti-affinity (mandatory):",
"Anti-affinity (not mandatory):": "Anti-affinity (not mandatory):",
"Antigua and Barbuda": "Antigua and Barbuda",
"Any": "Any",
"Any(Random)": "Any(Random)",
"Application Credentials": "Application Credentials",
@ -107,6 +115,9 @@
"Are you sure to { action }?": "Are you sure to { action }?",
"Are you sure to {action} (instance: {name})?": "Are you sure to {action} (instance: {name})?",
"Are you sure to {action}?": "Are you sure to {action}?",
"Argentina": "Argentina",
"Armenia": "Armenia",
"Aruba": "Aruba",
"Associate": "Associate",
"Associate Floating IP": "Associate Floating IP",
"Associate IP": "Associate IP",
@ -126,6 +137,8 @@
"Attached To": "Attached To",
"Attaching": "Attaching",
"Attachments Info": "Attachments Info",
"Australia": "Australia",
"Austria": "Austria",
"Auth Algorithm": "Auth Algorithm",
"Auth Key": "Auth Key",
"Auto": "Auto",
@ -141,6 +154,7 @@
"Available": "Available",
"Available Zone": "Available Zone",
"Awaiting Transfer": "Awaiting Transfer",
"Azerbaijan": "Azerbaijan",
"Back": "Back",
"Back End": "Back End",
"Back to Home": "Back to Home",
@ -155,9 +169,14 @@
"Backups": "Backups",
"Backups & Snapshots": "Backups & Snapshots",
"Bad Gateway (code: 502) ": "Bad Gateway (code: 502) ",
"Bahamas": "Bahamas",
"Bahrain": "Bahrain",
"Bailiwick of Jersey": "Bailiwick of Jersey",
"BandWidth Limit Egress": "BandWidth Limit Egress",
"BandWidth Limit Ingress": "BandWidth Limit Ingress",
"Bandwidth limit": "Bandwidth limit",
"Bangladesh": "Bangladesh",
"Barbados": "Barbados",
"Bare Metal": "Bare Metal",
"Bare Metal Enroll": "Bare Metal Enroll",
"Bare Metal Node Detail": "Bare Metal Node Detail",
@ -170,6 +189,12 @@
"BaseDetail": "BaseDetail",
"Basic Parameters": "Basic Parameters",
"Batch Allocate": "Batch Allocate",
"Belarus": "Belarus",
"Belgium": "Belgium",
"Belize": "Belize",
"Benin": "Benin",
"Bermuda": "Bermuda",
"Bhutan": "Bhutan",
"Big Data": "Big Data",
"Bind Device": "Bind Device",
"Bind Device Type": "Bind Device Type",
@ -185,14 +210,23 @@
"Block Storage Services": "Block Storage Services",
"Block Storage service:": "Block Storage service:",
"Blocked": "Blocked",
"Bolivia": "Bolivia",
"Boot Device": "Boot Device",
"Boot Interface": "Boot Interface",
"Bootable": "Bootable",
"Bootable Volume": "Bootable Volume",
"Bosnia and Herzegovina": "Bosnia and Herzegovina",
"Both of Fontend and Backend": "Both of Fontend and Backend",
"Botswana": "Botswana",
"Brazil": "Brazil",
"British Indian Ocean Territory": "British Indian Ocean Territory",
"Brunei Darussalam": "Brunei Darussalam",
"Build": "Build",
"Building": "Building",
"Bulgaria": "Bulgaria",
"Burkina Faso": "Burkina Faso",
"Burst limit": "Burst limit",
"Burundi": "Burundi",
"CIDR": "CIDR",
"CIDR Format Error(e.g. 192.168.0.0/24, 2001:DB8::/48)": "CIDR Format Error(e.g. 192.168.0.0/24, 2001:DB8::/48)",
"CPU": "CPU",
@ -203,15 +237,21 @@
"CPU value is { cpu }, NUMA CPU value is { totalCpu }, need to be equal. ": "CPU value is { cpu }, NUMA CPU value is { totalCpu }, need to be equal. ",
"CPU(Core)": "CPU(Core)",
"CPU/memory can only be increased or expanded online, and cannot be decreased or reduced online.": "CPU/memory can only be increased or expanded online, and cannot be decreased or reduced online.",
"Cameroon": "Cameroon",
"Can add { number } {name}": "Can add { number } {name}",
"Canada": "Canada",
"Cancel": "Cancel",
"Cancel Download": "Cancel Download",
"Cancel Select": "Cancel Select",
"Cancel Transfer": "Cancel Transfer",
"Cancel upload successfully.": "Cancel upload successfully.",
"Capacity (GB)": "Capacity (GB)",
"Cape Verde": "Cape Verde",
"Category": "Category",
"Cayman Islands": "Cayman Islands",
"CentOS": "CentOS",
"Central African Republic": "Central African Republic",
"Chad": "Chad",
"Change Password": "Change Password",
"Change Type": "Change Type",
"Change password": "Change password",
@ -223,9 +263,12 @@
"Check Failed": "Check Failed",
"Check In Progress": "Check In Progress",
"Checksum": "Checksum",
"Chile": "Chile",
"China": "China",
"Choose a host to live migrate instance to. If not selected, the scheduler will auto select target host.": "Choose a host to live migrate instance to. If not selected, the scheduler will auto select target host.",
"Choose a host to migrate instance to. If not selected, the scheduler will auto select target host.": "Choose a host to migrate instance to. If not selected, the scheduler will auto select target host.",
"Choosing a QoS policy can limit bandwidth and DSCP": "Choosing a QoS policy can limit bandwidth and DSCP",
"Christmas Island": "Christmas Island",
"Cidr": "Cidr",
"Cinder Service": "Cinder Service",
"Cipher": "Cipher",
@ -243,10 +286,13 @@
"Close external gateway": "Close external gateway",
"Cloud": "Cloud",
"Cloud Platform": "Cloud Platform",
"Cocos (Keeling) Islands": "Cocos (Keeling) Islands",
"Code": "Code",
"Cold Migrate": "Cold Migrate",
"Colombia": "Colombia",
"Commas , are not allowed to be in a tag name in order to simplify requests that specify lists of tags": "Commas , are not allowed to be in a tag name in order to simplify requests that specify lists of tags",
"Common Server": "Common Server",
"Comoros": "Comoros",
"Compute": "Compute",
"Compute Hosts": "Compute Hosts",
"Compute Live Migration": "Compute Live Migration",
@ -288,7 +334,10 @@
"Container Format": "Container Format",
"Content": "Content",
"Control Location": "Control Location",
"Cook Islands": "Cook Islands",
"CoreOS": "CoreOS",
"Costa Rica": "Costa Rica",
"Cote D'Ivoire": "Cote D'Ivoire",
"Count": "Count",
"Crashed": "Crashed",
"Create": "Create",
@ -363,6 +412,8 @@
"Creating": "Creating",
"Creation Timeout (Minutes)": "Creation Timeout (Minutes)",
"Credential Type": "Credential Type",
"Croatia (local name: Hrvatska)": "Croatia (local name: Hrvatska)",
"Cuba": "Cuba",
"Current Availability Zones": "Current Availability Zones",
"Current Compute Host": "Current Compute Host",
"Current Flavor": "Current Flavor",
@ -383,6 +434,8 @@
"Custom TCP Rule": "Custom TCP Rule",
"Custom Trait": "Custom Trait",
"Custom UDP Rule": "Custom UDP Rule",
"Cyprus": "Cyprus",
"Czech Republic": "Czech Republic",
"DCCP": "DCCP",
"DEGRADED: One or more of the entitys components are in ERROR": "DEGRADED: One or more of the entitys components are in ERROR",
"DHCP": "DHCP",
@ -464,6 +517,8 @@
"Deleted with the instance": "Deleted with the instance",
"Deleting": "Deleting",
"Deleting this stack will delete all resources deployed by the stack.": "Deleting this stack will delete all resources deployed by the stack.",
"Democratic Republic of the Congo": "Democratic Republic of the Congo",
"Denmark": "Denmark",
"Deploy Failed": "Deploy Failed",
"Deploy Wait": "Deploy Wait",
"Deploying": "Deploying",
@ -502,6 +557,7 @@
"Disk Info": "Disk Info",
"Disk Tag": "Disk Tag",
"Disk size is limited by the min disk of flavor, image, etc.": "Disk size is limited by the min disk of flavor, image, etc.",
"Djibouti": "Djibouti",
"Do Build And Run Instance": "Do Build And Run Instance",
"Do not reset the normally mounted volume to the \"available\"、\"maintenance\" or \"error\" status. The reset state does not remove the volume from the instance. If you need to remove the volume from the instance, please go to the console of the corresponding project and use the \"detach\" operation.": "Do not reset the normally mounted volume to the \"available\"、\"maintenance\" or \"error\" status. The reset state does not remove the volume from the instance. If you need to remove the volume from the instance, please go to the console of the corresponding project and use the \"detach\" operation.",
"Do not set with a backend": "Do not set with a backend",
@ -512,6 +568,7 @@
"Domain Manager": "Domain Manager",
"Domain Name": "Domain Name",
"Domains": "Domains",
"Dominica": "Dominica",
"Down": "Down",
"Download all data": "Download all data",
"Download canceled!": "Download canceled!",
@ -526,6 +583,8 @@
"ESP": "ESP",
"Each instance belongs to at least one security group, which needs to be specified when it is created. Instances in the same security group can communicate with each other on the network, and instances in different security groups are disconnected from the internal network by default.": "Each instance belongs to at least one security group, which needs to be specified when it is created. Instances in the same security group can communicate with each other on the network, and instances in different security groups are disconnected from the internal network by default.",
"Each new connection request is assigned to the next server in order, and all requests are finally divided equally among all servers. Commonly used for short connection services, such as HTTP services.": "Each new connection request is assigned to the next server in order, and all requests are finally divided equally among all servers. Commonly used for short connection services, such as HTTP services.",
"East Timor": "East Timor",
"Ecuador": "Ecuador",
"Edit": "Edit",
"Edit Backup": "Edit Backup",
"Edit Bandwidth Egress Limit Rule": "Edit Bandwidth Egress Limit Rule",
@ -568,6 +627,8 @@
"Effective Mode": "Effective Mode",
"Effective mode after configuration changes": "Effective mode after configuration changes",
"Egress": "Egress",
"Egypt": "Egypt",
"El Salvador": "El Salvador",
"Email": "Email",
"Enable": "Enable",
"Enable Admin State": "Enable Admin State",
@ -598,11 +659,15 @@
"Entered: {length, plural, =1 {one character} other {# characters} }(maximum {maxCount} characters)": "Entered: {length, plural, =1 {one character} other {# characters} }(maximum {maxCount} characters)",
"Environment Variable": "Environment Variable",
"Ephemeral Disk(GB)": "Ephemeral Disk(GB)",
"Equatorial Guinea": "Equatorial Guinea",
"Eritrea": "Eritrea",
"Error": "Error",
"Error Deleting": "Error Deleting",
"Error Extending": "Error Extending",
"Error Restoring": "Error Restoring",
"Estonia": "Estonia",
"Ether Type": "Ether Type",
"Ethiopia": "Ethiopia",
"Event Time": "Event Time",
"Execution Result": "Execution Result",
"Expand Advanced Options": "Expand Advanced Options",
@ -629,13 +694,17 @@
"FLAT": "FLAT",
"Fail Rollback": "Fail Rollback",
"Failed": "Failed",
"Falkland Islands (Malvinas)": "Falkland Islands (Malvinas)",
"Faroe Islands": "Faroe Islands",
"Fedora": "Fedora",
"Fiji": "Fiji",
"File": "File",
"Filename": "Filename",
"Fill In The Parameters": "Fill In The Parameters",
"Filter Project": "Filter Project",
"Fingerprint": "Fingerprint",
"Finish Resize": "Finish Resize",
"Finland": "Finland",
"First time edit automatically creates health monitor When pool does not have a health monitor": "First time edit automatically creates health monitor When pool does not have a health monitor",
"Fixed IP": "Fixed IP",
"Fixed IP Address": "Fixed IP Address",
@ -668,7 +737,10 @@
"Forgot your password?": "Forgot your password?",
"Format": "Format",
"Forward Slash / is not allowed to be in a tag name": "Forward Slash / is not allowed to be in a tag name",
"France": "France",
"FreeBSD": "FreeBSD",
"French Guiana": "French Guiana",
"French Polynesia": "French Polynesia",
"Frequent login failure will cause the account to be temporarily locked, please operate after 5 minutes": "Frequent login failure will cause the account to be temporarily locked, please operate after 5 minutes",
"Front End": "Front End",
"Full": "Full",
@ -680,18 +752,34 @@
"GPU Type": "GPU Type",
"GPU pass-through will load GPU devices directly to the instance for use. VGPU is a GPU virtualization solution. GPU resources will be segmented and distributed to multiple instances for shared use.": "GPU pass-through will load GPU devices directly to the instance for use. VGPU is a GPU virtualization solution. GPU resources will be segmented and distributed to multiple instances for shared use.",
"GRE": "GRE",
"Gabon": "Gabon",
"Gambia": "Gambia",
"Gateway IP": "Gateway IP",
"Gateway Time-out (code: 504) ": "Gateway Time-out (code: 504) ",
"Gateway ip {gateway_ip} conflicts with allocation pool {pool}": "Gateway ip {gateway_ip} conflicts with allocation pool {pool}",
"General Purpose": "General Purpose",
"Georgia": "Georgia",
"Germany": "Germany",
"Get OpenRC file": "Get OpenRC file",
"Get Token": "Get Token",
"Get {name} detail error.": "Get {name} detail error.",
"Get {name} error.": "Get {name} error.",
"Ghana": "Ghana",
"Gibraltar": "Gibraltar",
"Gigabytes(GB)": "Gigabytes(GB)",
"Given IP": "Given IP",
"Global Setting": "Global Setting",
"Greece": "Greece",
"Greenland": "Greenland",
"Grenada": "Grenada",
"Guadeloupe": "Guadeloupe",
"Guam": "Guam",
"Guatemala": "Guatemala",
"Guinea": "Guinea",
"Guinea Bissau": "Guinea Bissau",
"Guyana": "Guyana",
"HTTP Version not supported (code: 505) ": "HTTP Version not supported (code: 505) ",
"Haiti": "Haiti",
"Hard Reboot": "Hard Reboot",
"Hard Rebooting": "Hard Rebooting",
"Health Monitor Delay": "Health Monitor Delay",
@ -708,6 +796,8 @@
"High Clock Speed": "High Clock Speed",
"Home": "Home",
"Home page": "Home page",
"Honduras": "Honduras",
"Hong Kong": "Hong Kong",
"Host": "Host",
"Host Aggregate": "Host Aggregate",
"Host Aggregates": "Host Aggregates",
@ -716,6 +806,7 @@
"Host Routes Format Error(e.g. ::0a38:01fe/24,::0a38:01fe)": "Host Routes Format Error(e.g. ::0a38:01fe/24,::0a38:01fe)",
"Hostname": "Hostname",
"Hosts": "Hosts",
"Hungary": "Hungary",
"Hypervisor Detail": "Hypervisor Detail",
"Hypervisors": "Hypervisors",
"ICMP Code": "ICMP Code",
@ -757,6 +848,7 @@
"IPv6-Opts": "IPv6-Opts",
"IPv6-Route": "IPv6-Route",
"ISO - Optical disc image format": "ISO - Optical disc image format",
"Iceland": "Iceland",
"Identifier of the physical port on the switch to which nodes port is connected to": "Identifier of the physical port on the switch to which nodes port is connected to",
"Identity": "Identity",
"Identity service:": "Identity service:",
@ -798,7 +890,9 @@
"In-use": "In-use",
"Increment Backup": "Increment Backup",
"Incremental Backup": "Incremental Backup",
"India": "India",
"Indicates whether this VPN can only respond to connections or both respond to and initiate connections.": "Indicates whether this VPN can only respond to connections or both respond to and initiate connections.",
"Indonesia": "Indonesia",
"Infinity": "Infinity",
"Ingress": "Ingress",
"Init Complete": "Init Complete",
@ -868,6 +962,9 @@
"Invalid: User Group name can not be duplicated": "Invalid: User Group name can not be duplicated",
"Invalid: User name can not be duplicated": "Invalid: User name can not be duplicated",
"Ip Address": "Ip Address",
"Iran (Islamic Republic of)": "Iran (Islamic Republic of)",
"Iraq": "Iraq",
"Ireland": "Ireland",
"Ironic Instance": "Ironic Instance",
"Ironic Instance Name": "Ironic Instance Name",
"Is Current Project": "Is Current Project",
@ -876,6 +973,7 @@
"Is external network port": "Is external network port",
"Isolate": "Isolate",
"Isolate(No multithreading)": "Isolate(No multithreading)",
"Israel": "Israel",
"It is IPv6 type.": "It is IPv6 type.",
"It is recommended that the { instanceType } instance simultaneously set large page memory to large. { instanceType } instances also require faster memory addressing capabilities.": "It is recommended that the { instanceType } instance simultaneously set large page memory to large. { instanceType } instances also require faster memory addressing capabilities.",
"It is recommended that you perform this cloning operation on a disk without any reading/writing": "It is recommended that you perform this cloning operation on a disk without any reading/writing",
@ -887,7 +985,14 @@
"It is suggested to use the marked AZ directly, too much AZ will lead to the fragmentation of available resources": "It is suggested to use the marked AZ directly, too much AZ will lead to the fragmentation of available resources",
"It is unreachable for all floating ips.": "It is unreachable for all floating ips.",
"It is unreachable for this floating ip.": "It is unreachable for this floating ip.",
"Italy": "Italy",
"Jamaica": "Jamaica",
"Japan": "Japan",
"Jordan": "Jordan",
"Jump to Console": "Jump to Console",
"Kampuchea": "Kampuchea",
"Kazakhstan": "Kazakhstan",
"Kenya": "Kenya",
"Kernel ID": "Kernel ID",
"Kernel Image": "Kernel Image",
"Key": "Key",
@ -898,12 +1003,21 @@
"Keypair Detail": "Keypair Detail",
"Keypair Info": "Keypair Info",
"Killed": "Killed",
"Kuwait": "Kuwait",
"Kyrgyzstan": "Kyrgyzstan",
"LB Algorithm": "LB Algorithm",
"LEAST_CONNECTIONS": "Least Connections",
"Lao People's Democratic Republic": "Lao People's Democratic Republic",
"Large": "Large",
"Large(Optimal performance)": "Large(Optimal performance)",
"Last Updated": "Last Updated",
"Latvia": "Latvia",
"Leave Maintenance Mode": "Leave Maintenance Mode",
"Lebanon": "Lebanon",
"Lesotho": "Lesotho",
"Liberia": "Liberia",
"Libyan Arab Jamahiriya": "Libyan Arab Jamahiriya",
"Liechtenstein": "Liechtenstein",
"Lifetime": "Lifetime",
"Lifetime Value": "Lifetime Value",
"Listener": "Listener",
@ -914,6 +1028,7 @@
"Listener Number": "Listener Number",
"Listener Protocol": "Listener Protocol",
"Listener Protocol Port": "Listener Protocol Port",
"Lithuania": "Lithuania",
"Live Migrate": "Live Migrate",
"Live Migration At Destination": "Live Migration At Destination",
"Load Balancer": "Load Balancer",
@ -938,14 +1053,22 @@
"Login Name": "Login Name",
"Login Password": "Login Password",
"Login Type": "Login Type",
"Luxembourg": "Luxembourg",
"MAC Address": "MAC Address",
"MAC Learning State": "MAC Learning State",
"MTU": "MTU",
"Mac Address": "Mac Address",
"MacVTap": "MacVTap",
"Macau": "Macau",
"Madagascar": "Madagascar",
"Main Project": "Main Project",
"Maintained": "Maintained",
"Maintenance": "Maintenance",
"Malawi": "Malawi",
"Malaysia": "Malaysia",
"Maldives": "Maldives",
"Mali": "Mali",
"Malta": "Malta",
"Manage Access": "Manage Access",
"Manage Host": "Manage Host",
"Manage Metadata": "Manage Metadata",
@ -966,11 +1089,16 @@
"Manual input": "Manual input",
"Manually Assigned Address": "Manually Assigned Address",
"Manually Specify": "Manually Specify",
"Marshall Islands": "Marshall Islands",
"Martinique": "Martinique",
"Mauritania": "Mauritania",
"Mauritius": "Mauritius",
"Max BandWidth": "Max BandWidth",
"Max Burst": "Max Burst",
"Max Retries": "Max Retries",
"Max connect": "Max connect",
"Maximum interval time for each health check response": "Maximum interval time for each health check response",
"Mayotte": "Mayotte",
"Mem": "Mem",
"Member": "Member",
"Member Count": "Member Count",
@ -986,6 +1114,8 @@
"Metadata": "Metadata",
"Metadata Definitions": "Metadata Definitions",
"Metadata Detail": "Metadata Detail",
"Mexico": "Mexico",
"Micronesia": "Micronesia",
"Migrate": "Migrate",
"Migrate Volume": "Migrate Volume",
"Migrate volume": "Migrate volume",
@ -1004,11 +1134,19 @@
"Missing Weight": "Missing Weight",
"Modify Project Tags": "Modify Project Tags",
"Modify QoS": "Modify QoS",
"Moldova": "Moldova",
"Monaco": "Monaco",
"Mongolia": "Mongolia",
"Montenegro": "Montenegro",
"Montserrat": "Montserrat",
"More": "More",
"More Actions": "More Actions",
"Morocco": "Morocco",
"Mount ISO": "Mount ISO",
"Mozambique": "Mozambique",
"Multiple filter tags are separated by enter": "Multiple filter tags are separated by enter",
"My Role": "My Role",
"Myanmar": "Myanmar",
"N/A": "N/A",
"NOOP": "NOOP",
"NUMA Node": "NUMA Node",
@ -1017,6 +1155,11 @@
"Name": "Name",
"Name can not be duplicated": "Name can not be duplicated",
"Namespace": "Namespace",
"Namibia": "Namibia",
"Nauru": "Nauru",
"Nepal": "Nepal",
"Netherlands": "Netherlands",
"Netherlands Antilles": "Netherlands Antilles",
"Network": "Network",
"Network Config": "Network Config",
"Network Detail": "Network Detail",
@ -1033,8 +1176,13 @@
"Neutron Agent Detail": "Neutron Agent Detail",
"Neutron Agents": "Neutron Agents",
"New Availability Zone": "New Availability Zone",
"New Caledonia": "New Caledonia",
"New Zealand": "New Zealand",
"Next": "Next",
"Next Hop": "Next Hop",
"Nicaragua": "Nicaragua",
"Niger": "Niger",
"Nigeria": "Nigeria",
"No": "No",
"No Console": "No Console",
"No Monitor": "No Monitor",
@ -1048,7 +1196,11 @@
"Node Info": "Node Info",
"Node Name": "Node Name",
"Node Num": "Node Num",
"Norfolk Island": "Norfolk Island",
"Normal": "Normal",
"North Korea": "North Korea",
"Northern Mariana Islands": "Northern Mariana Islands",
"Norway": "Norway",
"Not Implemented (code: 501) ": "Not Implemented (code: 501) ",
"Not Open": "Not Open",
"Not deleted with the instance": "Not deleted with the instance",
@ -1068,6 +1220,7 @@
"OSPF": "OSPF",
"Off": "Off",
"Offline": "Offline",
"Oman": "Oman",
"On": "On",
"One entry per line(e.g. 114.114.114.114)": "One entry per line(e.g. 114.114.114.114)",
"One entry per line(e.g. {ip})": "One entry per line(e.g. {ip})",
@ -1102,6 +1255,12 @@
"PING": "PING",
"PXE": "PXE",
"PXE Enabled": "PXE Enabled",
"Pakistan": "Pakistan",
"Palau": "Palau",
"Palestine": "Palestine",
"Panama": "Panama",
"Papua New Guinea": "Papua New Guinea",
"Paraguay": "Paraguay",
"Parameter": "Parameter",
"Params Setting": "Params Setting",
"Password": "Password",
@ -1130,10 +1289,13 @@
"Perform a consistent hash operation on the source IP address of the request to obtain a specific value. At the same time, the back-end server is numbered, and the request is distributed to the server with the corresponding number according to the calculation result. This can enable load distribution of visits from different source IPs, and at the same time enable requests from the same client IP to always be dispatched to a specific server. This method is suitable for load balancing TCP protocol without cookie function.": "Perform a consistent hash operation on the source IP address of the request to obtain a specific value. At the same time, the back-end server is numbered, and the request is distributed to the server with the corresponding number according to the calculation result. This can enable load distribution of visits from different source IPs, and at the same time enable requests from the same client IP to always be dispatched to a specific server. This method is suitable for load balancing TCP protocol without cookie function.",
"Permanent": "Permanent",
"Persistent": "Persistent",
"Peru": "Peru",
"Phase1 Negotiation Mode": "Phase1 Negotiation Mode",
"Philippines": "Philippines",
"Phone": "Phone",
"Physical Network": "Physical Network",
"Physical Node": "Physical Node",
"Pitcairn": "Pitcairn",
"Placement service:": "Placement service:",
"Platform Info": "Platform Info",
"Please confirm your password!": "Please confirm your password!",
@ -1198,6 +1360,7 @@
"Pleasse select a network!": "Pleasse select a network!",
"Pleasse select a subnet!": "Pleasse select a subnet!",
"Pleasse select a type!": "Pleasse select a type!",
"Poland": "Poland",
"Policy": "Policy",
"Policy Name": "Policy Name",
"Pool Algorithm": "Pool Algorithm",
@ -1219,6 +1382,7 @@
"Port Security Enabled": "Port Security Enabled",
"Port Type": "Port Type",
"Ports": "Ports",
"Portugal": "Portugal",
"Power Off": "Power Off",
"Power On": "Power On",
"Power State": "Power State",
@ -1262,7 +1426,9 @@
"Public": "Public",
"Public Image": "Public Image",
"Public Key": "Public Key",
"Puerto Rico": "Puerto Rico",
"QCOW2 - QEMU image format": "QCOW2 - QEMU image format",
"Qatar": "Qatar",
"QoS": "QoS",
"QoS Bandwidth Egress Limit": "QoS Bandwidth Egress Limit",
"QoS Bandwidth Ingress Limit": "QoS Bandwidth Ingress Limit",
@ -1318,6 +1484,7 @@
"Remove": "Remove",
"Remove Network": "Remove Network",
"Remove Router": "Remove Router",
"Republic Of The Congo": "Republic Of The Congo",
"Request ID": "Request ID",
"Require": "Require",
"Require(Need multithreading)": "Require(Need multithreading)",
@ -1353,6 +1520,7 @@
"Resume Instance": "Resume Instance",
"Resuming": "Resuming",
"Retyping": "Retyping",
"Reunion": "Reunion",
"Revert Resize or Migrate": "Revert Resize or Migrate",
"Revert Resize/Migrate": "Revert Resize/Migrate",
"Reverting": "Reverting",
@ -1365,6 +1533,7 @@
"Rollback Complete": "Rollback Complete",
"Rollback Failed": "Rollback Failed",
"Rollback In Progress": "Rollback In Progress",
"Romania": "Romania",
"Root Disk": "Root Disk",
"Router": "Router",
"Router Detail": "Router Detail",
@ -1375,12 +1544,21 @@
"Rules": "Rules",
"Rules Number": "Rules Number",
"Running": "Running",
"Russia": "Russia",
"Rwanda": "Rwanda",
"SCTP": "SCTP",
"SNAT Enabled": "SNAT Enabled",
"SNAT Rules": "SNAT Rules",
"SNAT Source": "SNAT Source",
"SNAT rules": "SNAT rules",
"SOURCE_IP": "Source IP",
"Saint Maarten (Dutch Part)": "Saint Maarten (Dutch Part)",
"Saint Vincent and the Grenadines": "Saint Vincent and the Grenadines",
"Samoa": "Samoa",
"San Marino": "San Marino",
"Santa Luzia Island": "Santa Luzia Island",
"Sao Tome and Principe": "Sao Tome and Principe",
"Saudi Arabia": "Saudi Arabia",
"Saving": "Saving",
"Scheduling": "Scheduling",
"Sec for DPD delay, > 0": "Sec for DPD delay, > 0",
@ -1405,6 +1583,8 @@
"Selected": "Selected",
"Selected Members": "Selected Members",
"Selected list": "Selected list",
"Senegal": "Senegal",
"Serbia": "Serbia",
"Server Group": "Server Group",
"Server Group Detail": "Server Group Detail",
"Server Group Member": "Server Group Member",
@ -1416,6 +1596,7 @@
"Set Admin Password": "Set Admin Password",
"Set Boot Device": "Set Boot Device",
"Set IP": "Set IP",
"Seychelles": "Seychelles",
"Shared": "Shared",
"Shared Image": "Shared Image",
"Shared Network": "Shared Network",
@ -1434,9 +1615,13 @@
"Shut Down": "Shut Down",
"Shut Off": "Shut Off",
"Shutoff": "Shutoff",
"Sierra Leone": "Sierra Leone",
"Sign Out": "Sign Out",
"Sign up": "Sign up",
"Singapore": "Singapore",
"Size": "Size",
"Slovakia (Slovak Republic)": "Slovakia (Slovak Republic)",
"Slovenia": "Slovenia",
"Small": "Small",
"Small(Not recommended)": "Small(Not recommended)",
"Smart Scheduling": "Smart Scheduling",
@ -1458,11 +1643,17 @@
"Soft Rebooting": "Soft Rebooting",
"Soft-Affinity": "Soft-Affinity",
"Soft-Anti-Affinity": "Soft-Anti-Affinity",
"Solomon Islands": "Solomon Islands",
"Somalia": "Somalia",
"Sorry, the page you visited does not exist.": "Sorry, the page you visited does not exist.",
"Source Port/Port Range": "Source Port/Port Range",
"South Africa": "South Africa",
"South Korea": "South Korea",
"Spain": "Spain",
"Spawning": "Spawning",
"Specification": "Specification",
"Specs": "Specs",
"Sri Lanka": "Sri Lanka",
"Stack Detail": "Stack Detail",
"Stack Events": "Stack Events",
"Stack Name": "Stack Name",
@ -1507,6 +1698,8 @@
"Subordinate Project": "Subordinate Project",
"Subordinate User Group": "Subordinate User Group",
"Success": "Success",
"Sudan": "Sudan",
"Suriname": "Suriname",
"Suspend": "Suspend",
"Suspend Complete": "Suspend Complete",
"Suspend Failed": "Suspend Failed",
@ -1514,10 +1707,14 @@
"Suspend Instance": "Suspend Instance",
"Suspended": "Suspended",
"Suspending": "Suspending",
"Swaziland": "Swaziland",
"Sweden": "Sweden",
"Switch ID": "Switch ID",
"Switch Info": "Switch Info",
"Switch Language": "Switch Language",
"Switch Project": "Switch Project",
"Switzerland": "Switzerland",
"Syrian Arab Republic": "Syrian Arab Republic",
"System": "System",
"System Admin": "System Admin",
"System Config": "System Config",
@ -1529,7 +1726,10 @@
"TCP": "TCP",
"Tags": "Tags",
"Tags are not case sensitive": "Tags are not case sensitive",
"Taiwan": "Taiwan",
"Tajikistan": "Tajikistan",
"Take effect after restart": "Take effect after restart",
"Tanzania": "Tanzania",
"Target Compute Host": "Target Compute Host",
"Target IP Address": "Target IP Address",
"Target Port": "Target Port",
@ -1537,8 +1737,12 @@
"Target Subnet": "Target Subnet",
"Template Content": "Template Content",
"Template Name": "Template Name",
"Thailand": "Thailand",
"That is, after how many consecutive failures of the health check, the health check status of the back-end cloud server is changed from normal to abnormal": "That is, after how many consecutive failures of the health check, the health check status of the back-end cloud server is changed from normal to abnormal",
"The Federation of Saint Kitts and Nevis": "The Federation of Saint Kitts and Nevis",
"The Provider is the encryption provider format (e.g. \"lucks\")": "The Provider is the encryption provider format (e.g. \"lucks\")",
"The Republic of Macedonia": "The Republic of Macedonia",
"The Republic of South Sudan": "The Republic of South Sudan",
"The SSH key is a way to remotely log in to the instance. The cloud platform only helps to keep the public key. Please keep your private key properly.": "The SSH key is a way to remotely log in to the instance. The cloud platform only helps to keep the public key. Please keep your private key properly.",
"The affiliated Domain cannot be modified after creation": "The affiliated Domain cannot be modified after creation",
"The amphora instance is required for load balancing service setup and is not recommended": "The amphora instance is required for load balancing service setup and is not recommended",
@ -1605,6 +1809,9 @@
"Timeout(Mininte)": "Timeout(Mininte)",
"Timeout(s)": "Timeout(s)",
"To open": "To open",
"Togo": "Togo",
"Tokelau": "Tokelau",
"Tonga": "Tonga",
"Too many disks mounted on the instance will affect the read and write performance. It is recommended not to exceed 16 disks.": "Too many disks mounted on the instance will affect the read and write performance. It is recommended not to exceed 16 disks.",
"Topic": "Topic",
"Topology": "Topology",
@ -1616,6 +1823,12 @@
"Transfer ID": "Transfer ID",
"Transfer Name": "Transfer Name",
"Transform Protocol": "Transform Protocol",
"Trinidad and Tobago": "Trinidad and Tobago",
"Tunisia": "Tunisia",
"Turkey": "Turkey",
"Turkmenistan": "Turkmenistan",
"Turks and Caicos Islands": "Turks and Caicos Islands",
"Tuvalu": "Tuvalu",
"Type": "Type",
"UDPLite": "UDPLite",
"USB Info": "USB Info",
@ -1623,6 +1836,8 @@
"USER": "USER",
"UUID": "UUID",
"Ubuntu": "Ubuntu",
"Uganda": "Uganda",
"Ukraine": "Ukraine",
"Unable to create instance: batch creation is not supported when specifying IP.": "Unable to create instance: batch creation is not supported when specifying IP.",
"Unable to create instance: insufficient quota to create resources.": "Unable to create instance: insufficient quota to create resources.",
"Unable to create volume: insufficient quota to create resources.": "Unable to create volume: insufficient quota to create resources.",
@ -1640,6 +1855,9 @@
"Unattached": "Unattached",
"Unavailable": "Unavailable",
"Unbootable": "Unbootable",
"United Arab Emirates": "United Arab Emirates",
"United Kingdom": "United Kingdom",
"United States": "United States",
"Unknown": "Unknown",
"Unless you know clearly which AZ to create the volume in, you don not need to fill in here.": "Unless you know clearly which AZ to create the volume in, you don not need to fill in here.",
"Unlimit": "Unlimit",
@ -1666,6 +1884,7 @@
"Updating Password": "Updating Password",
"Upload progress": "Upload progress",
"Uploading": "Uploading",
"Uruguay": "Uruguay",
"Usage Type": "Usage Type",
"Usb Controller": "Usb Controller",
"Use Type": "Use Type",
@ -1699,6 +1918,7 @@
"Username or password is incorrect": "Username or password is incorrect",
"Users": "Users",
"Using server groups, you can create cloud hosts on the same/different physical nodes as much as possible to meet the affinity/non-affinity requirements of business applications.": "Using server groups, you can create cloud hosts on the same/different physical nodes as much as possible to meet the affinity/non-affinity requirements of business applications.",
"Uzbekistan": "Uzbekistan",
"VCPU (Core)": "VCPU (Core)",
"VCPUs": "VCPUs",
"VDI - VirtualBox compatible image format": "VDI - VirtualBox compatible image format",
@ -1716,11 +1936,16 @@
"VRRP": "VRRP",
"Valid": "Valid",
"Value": "Value",
"Vanuatu": "Vanuatu",
"Vatican City State (Holy See)": "Vatican City State (Holy See)",
"Vendor Interface": "Vendor Interface",
"Venezuela": "Venezuela",
"Verifying": "Verifying",
"Vietnam": "Vietnam",
"View": "View",
"View Detail": "View Detail",
"View Rules": "View Rules",
"Virgin Islands (U.S.)": "Virgin Islands (U.S.)",
"Virtual Adapter": "Virtual Adapter",
"Virtual Adapter Detail": "Virtual Adapter Detail",
"Virtual Adapter ID": "Virtual Adapter ID",
@ -1744,11 +1969,13 @@
"Volume Transfer": "Volume Transfer",
"Volume Type": "Volume Type",
"Volume Type Detail": "Volume Type Detail",
"Wallis And Futuna Islands": "Wallis And Futuna Islands",
"Warn": "Warn",
"Weight": "Weight",
"Weights": "Weights",
"Welcome": "Welcome",
"Welcome, {name}": "Welcome, {name}",
"Western Sahara": "Western Sahara",
"When the computing service starts the recycling instance interval, the instance will be stored in the recycling bin after deletion, and will be retained according to the corresponding time interval. You can choose to restore it within this period. After successful recovery, the status of the instance is running and related resources remain unchanged.": "When the computing service starts the recycling instance interval, the instance will be stored in the recycling bin after deletion, and will be retained according to the corresponding time interval. You can choose to restore it within this period. After successful recovery, the status of the instance is running and related resources remain unchanged.",
"When the volume is \"bootable\" and the status is \"available\", it can be used as a startup source to create an instance.": "When the volume is \"bootable\" and the status is \"available\", it can be used as a startup source to create an instance.",
"When you do online backup of the volume that has been bound, you need to pay attention to the following points:": "When you do online backup of the volume that has been bound, you need to pay attention to the following points:",
@ -1761,6 +1988,7 @@
"Work Num": "Work Num",
"X86 Architecture": "X86 Architecture",
"YAML File": "YAML File",
"Yemen": "Yemen",
"Yes": "Yes",
"You are not allowed to delete router \"{ name }\".": "You are not allowed to delete router \"{ name }\".",
"You are not allowed to delete snapshot \"{ name }\", which is used by creating volume \"{volumes}\".": "You are not allowed to delete snapshot \"{ name }\", which is used by creating volume \"{volumes}\".",
@ -1773,6 +2001,9 @@
"You are trying to edit a network that not belong to current project. Please do not continue unless you are quit sure what you are doing.": "You are trying to edit a network that not belong to current project. Please do not continue unless you are quit sure what you are doing.",
"You can manually specify a physical node to create an instance.": "You can manually specify a physical node to create an instance.",
"You don't have access to get {name}.": "You don't have access to get {name}.",
"Yugoslavia": "Yugoslavia",
"Zambia": "Zambia",
"Zimbabwe": "Zimbabwe",
"abandon stack": "abandon stack",
"add network": "add network",
"add router": "add router",
@ -1967,6 +2198,8 @@
"storage backend": "storage backend",
"subnets": "subnets",
"suspend instance": "suspend instance",
"the Republic of Abkhazia": "the Republic of Abkhazia",
"the Republic of South Ossetia": "the Republic of South Ossetia",
"the policy is in use": "the policy is in use",
"the router has connected subnet": "the router has connected subnet",
"the vpn gateway is in use": "the vpn gateway is in use",

File diff suppressed because it is too large Load Diff

View File

@ -275,7 +275,7 @@ export class CreateForm extends FormAction {
{
name: 'phone',
label: t('Phone'),
type: 'input',
type: 'phone',
required: true,
validator: phoneNumberValidate,
labelCol,

View File

@ -17,6 +17,7 @@ import { ModalAction } from 'containers/Action';
import globalUserStore from 'stores/keystone/user';
import globalDomainStore from 'stores/keystone/domain';
import { phoneNumberValidate, emailValidate } from 'utils/validate';
import parsePhoneNumberFromString from 'libphonenumber-js';
export class EditForm extends ModalAction {
init() {
@ -93,12 +94,17 @@ export class EditForm extends ModalAction {
const domain = domains.filter((it) => it.id === domain_id)[0];
const project = projects.filter((it) => it.id === default_project_id)[0];
if (name && this.formRef.current) {
const formatedPhone = parsePhoneNumberFromString(phone || '', 'CN') || {
country: 'CN',
nationalNumber: '',
};
const { countryCallingCode, nationalNumber } = formatedPhone;
this.formRef.current.setFieldsValue({
name,
domain_id: domain ? domain.name : '',
default_project_id: project ? project.name : '',
email,
phone,
phone: `+${countryCallingCode} ${nationalNumber}`,
real_name,
description,
});
@ -142,7 +148,7 @@ export class EditForm extends ModalAction {
{
name: 'phone',
label: t('Phone'),
type: 'input',
type: 'phone',
required: true,
validator: phoneNumberValidate,
},

View File

@ -183,7 +183,7 @@ export class CreateForm extends ModalAction {
name: 'phone',
label: t('Phone'),
validator: phoneNumberValidate,
type: 'input',
type: 'phone',
required: true,
},
{

View File

@ -15,7 +15,7 @@
import { isString, isNil } from 'lodash';
import { Address4, Address6 } from 'ip-address';
import cidrRegex from 'cidr-regex';
import { phone } from 'phone';
import { isValidPhoneNumber } from 'libphonenumber-js';
const { v4, v6 } = cidrRegex;
@ -75,7 +75,7 @@ export const regex = {
asciiRegex,
};
export const isPhoneNumber = (value) => phone(value).isValid;
export const isPhoneNumber = (value) => isValidPhoneNumber(value);
export const isEmailNumber = (value) => emailRegex.test(value);

View File

@ -20,6 +20,7 @@ describe('The User Page', () => {
const name = `e2e-user-${uuid}`;
const newname = `${name}-1`;
const email = `${name}@example.com`;
const prefix = '+86';
const phone = '18500000000';
const password = 'passW0rd_';
const tmpPassword = `${password}1`;
@ -47,7 +48,8 @@ describe('The User Page', () => {
.formInput('email', email)
.formInput('password', tmpPassword)
.formInput('confirmPassword', tmpPassword)
.formInput('phone', phone)
.formSelect('phone', prefix)
.formInput('phone', phone, '.ant-input')
.formInput('real_name', name)
.formButtonClick('more')
.wait(2000)

View File

@ -125,8 +125,8 @@ Cypress.Commands.add('clickStepActionCancelButton', (waitTime = 2000) => {
.wait(waitTime);
});
Cypress.Commands.add('formInput', (formItemName, value) => {
cy.get(getId(formItemName)).find('input').clear().type(value);
Cypress.Commands.add('formInput', (formItemName, value, selector = 'input') => {
cy.get(getId(formItemName)).find(selector).clear().type(value);
});
Cypress.Commands.add('formText', (formItemName, value) => {

View File

@ -207,6 +207,7 @@ Cypress.Commands.add('createUserGroup', ({ name }) => {
Cypress.Commands.add('createUser', ({ name }) => {
const email = `${name}@example.com`;
const prefix = '+86';
const phone = '18500000000';
const password = 'passW0rd_';
cy.visitPage(userListUrl)
@ -216,7 +217,8 @@ Cypress.Commands.add('createUser', ({ name }) => {
.formInput('email', email)
.formInput('password', password)
.formInput('confirmPassword', password)
.formInput('phone', phone)
.formSelect('phone', prefix)
.formInput('phone', phone, '.ant-input')
.formInput('real_name', name)
.clickFormActionSubmitButton()
.tableSearchText(name)

View File

@ -8992,6 +8992,11 @@ levn@~0.3.0:
prelude-ls "~1.1.2"
type-check "~0.3.2"
libphonenumber-js@^1.9.42:
version "1.9.42"
resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.9.42.tgz#41f41d540f89b6e3fd36de7120ddb57b3a468c77"
integrity sha512-UBtU0ylpZPKPT8NLIyQJWj/DToMFxmo3Fm5m6qDc0LATvf0SY0qUhaurCEvukAB9Fo+Ia2Anjzqwoupaa64fXg==
liftup@~3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/liftup/-/liftup-3.0.1.tgz#1cb81aff0f368464ed3a5f1a7286372d6b1a60ce"
@ -10729,11 +10734,6 @@ performance-now@^2.1.0:
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
phone@^3.1.6:
version "3.1.6"
resolved "https://registry.yarnpkg.com/phone/-/phone-3.1.6.tgz#eefff0be1ce4ce9f2ee028c67be6b58dc5616ef1"
integrity sha512-46WCdbDG32OKoPsntTg2l0VBaWVWg0A3zvH5dUhApwOupyn7owXRtDBz6vAjsJiZQGTft++WvTxEZeqxlCUv9g==
picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3:
version "2.2.3"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.3.tgz#465547f359ccc206d3c48e46a1bcb89bf7ee619d"