From e3c9c09eedeb67538cd44c63dc635e33b83752da Mon Sep 17 00:00:00 2001 From: Dixsie Wolmers Date: Wed, 20 May 2020 23:27:56 -0500 Subject: Add Network Settings translations Signed-off-by: Dixsie Wolmers Change-Id: I8d5f6544fb99832bfcda5e4ee63603ce41339d8e --- src/locales/en-US.json | 527 +++++++++++---------- .../modules/Configuration/NetworkSettingsStore.js | 7 +- .../NetworkSettings/NetworkSettings.vue | 116 +++-- 3 files changed, 363 insertions(+), 287 deletions(-) diff --git a/src/locales/en-US.json b/src/locales/en-US.json index 9f74ca00..b48fdf04 100644 --- a/src/locales/en-US.json +++ b/src/locales/en-US.json @@ -266,7 +266,36 @@ "powerConsumption": "Current power consumption", "serverPowCapSetting": "Server power cap setting" }, - + "pageNetworkSettings": { + "interface": "Interface", + "pageDescription": "Configure network settings for the BMC and the Virtualization management interface", + "staticDns": "Static DNS", + "staticIpv4": "Static IPv4", + "system": "System", + "ariaLabel": { + "staticDnsRow": "Static DNS address", + "staticIpv4AddressRow": "Static IPv4 address", + "staticIpv4SubnetRow": "Static IPV4 subnet" + }, + "form": { + "defaultGateway": "Default gateway", + "hostname": "Hostname", + "macAddress": "MAC address", + "networkInterface": "Network interface" + }, + "table": { + "addDns": "Add DNS server", + "addStaticIpv4Address": "Add static IP", + "deleteDns": "Delete DNS row", + "deleteStaticIpv4": "Delete IPv4 row", + "ipAddress": "IP address", + "subnet": "Subnet mask" + }, + "toast": { + "errorSaveNetworkSettings": "Error saving network settings.", + "successSaveNetworkSettings": "Successfully saved network settings." + } + }, "pageRebootBmc": { "rebootBmc": "Reboot BMC", "rebootInformation": "When you reboot the BMC, your web browser loses contact with the BMC for several minutes. When the BMC is back online, you may need to log in again.", @@ -384,254 +413,254 @@ "description": "The attempted action is not accessible from the logged in account. Contact your system administrator to check your privilege role." }, "countries": { - "AF":"Afghanistan", - "AL":"Albania", - "DZ":"Algeria", - "AS":"American Samoa", - "AD":"Andorra", - "AO":"Angola", - "AI":"Anguilla", - "AQ":"Antarctica", - "AG":"Antigua and Barbuda", - "AR":"Argentina", - "AM":"Armenia", - "AW":"Aruba", - "AU":"Australia", - "AT":"Austria", - "AZ":"Azerbaijan", - "BS":"Bahamas, The", - "BH":"Bahrain", - "BD":"Bangladesh", - "BB":"Barbados", - "BY":"Belarus", - "BE":"Belgium", - "BZ":"Belize", - "BJ":"Benin", - "BM":"Bermuda", - "BT":"Bhutan", - "BO":"Bolivia", - "BQ":"Bonaire, Sint Eustatius and Saba", - "BA":"Bosnia and Herzegovina ", - "BW":"Bostwana", - "BV":"Bouvet Island", - "BR":"Brazil", - "IO":"British Indian Ocean Territory", - "BN":"Brunei Darussalam ", - "BG":"Bulgaria", - "BF":"Burkina Faso", - "BI":"Burundi", - "CV":"Cabo Verde", - "KH":"Cambodia", - "CM":"Cameroon", - "CA":"Canada", - "KY":"Cayman Islands", - "CF":"Central African Republic", - "TD":"Chad", - "CL":"Chile", - "CN":"China", - "CX":"Christmas Island ", - "CC":"Cocos(Keeling) Islands", - "CO":"Columbia", - "KM":"Comoros", - "CD":"Congo, The Democratic Republic of the", - "CG":"Congo", - "CK":"Cook Islands", - "CR":"Costa Rica", - "HR":"Croatia", - "CU":"Cuba", - "CW":"Curaçao", - "CY":"Cyprus", - "CZ":"Czechia", - "CI":"Côte d\"Ivoire", - "DK":"Denmark", - "DJ":"Djibouti", - "DM":"Dominica", - "DO":"Dominican Republic", - "EC":"Ecuador", - "EG":"Egypt", - "SV":"El Salvador", - "GQ":"Equatorial Guinea ", - "ER":"Eritrea", - "EE":"Estonia", - "SZ":"Eswatini", - "ET":"Ethiopia", - "FK":"Falkland Islands (Malvinas)", - "FO":"Faroe Islands", - "FJ":"Fiji", - "FI":"Finland", - "FR":"France", - "GF":"French Guiana", - "PF":"French Polynesia", - "TF":"French Southern Territories", - "GA":"Gabon", - "GM":"Gambia, The", - "GE":"Georgia", - "DE":"Germany", - "GH":"Ghana", - "GI":"Gibraltar", - "GR":"Greece", - "GL":"Greenland", - "GD":"Grenada", - "GP":"Guadeloupe", - "GU":"Guam", - "GT":"Guatemala", - "GG":"Guernsey", - "GN":"Guinea", - "GW":"Guinea-Bissau", - "GY":"Guyana", - "HT":"Haiti", - "HM":"Heard Island and McDonald Islands", - "VA":"Holy See", - "HN":"Honduras", - "HK":"Hong Kong", - "HU":"Hungary", - "IS":"Iceland", - "IN":"India", - "ID":"Indonesia", - "IR":"Iran, Islamic Republic of", - "IQ":"Iraq", - "IE":"Ireland", - "IM":"Isle of Man", - "IL":"Israel", - "IT":"Italy", - "JM":"Jamaica", - "JP":"Japan", - "JE":"Jersey", - "JO":"Jordan", - "KZ":"Kazakhstan", - "KE":"Kenya", - "KI":"Kiribati", - "KR":"Korea, Republic of", - "KP":"Korea, Democratic People\"s Republic of", - "KW":"Kuwait", - "KG":"Kyrgyzstan", - "LA":"Lao People\"s Democratic Republic", - "LV":"Latvia", - "LB":"Lebanon", - "LS":"Lesotho", - "LR":"Liberia", - "LY":"Libya", - "LI":"Liechtenstein", - "LT":"Lithuania", - "LU":"Luxembourg", - "MO":"Macao", - "MK":"Macedonia, The Former Yugoslav Republic of", - "MG":"Madagascar", - "MW":"Malawi", - "MY":"Malaysia", - "MV":"Maldives", - "ML":"Mali", - "MT":"Malta", - "MH":"Marshall Islands", - "MQ":"Martinique", - "MR":"Mauritania", - "MU":"Mauritius", - "YT":"Mayotte", - "MX":"Mexico", - "FM":"Micronesia, Federated States of", - "MD":"Moldova, Republic of", - "MC":"Monaco", - "MN":"Mongolia", - "ME":"Montenegro", - "MS":"Montserrat", - "MA":"Morocco", - "MZ":"Mozambique", - "MM":"Myanmar", - "NA":"Namibia", - "NR":"Nauru", - "NP":"Nepal", - "NL":"Netherlands", - "NC":"New Caledonia", - "NZ":"New Zealand", - "NI":"Nicaragua", - "NE":"Niger", - "NG":"Nigeria", - "NU":"Niue", - "NF":"Norfolk Island", - "MP":"Northern Mariana Islands", - "NO":"Norway", - "OM":"Oman", - "PK":"Pakistan", - "PW":"Palau", - "PS":"Palestine", - "PA":"Panama", - "PG":"Papua New Guinea", - "PY":"Paraguay", - "PE":"Peru", - "PH":"Philippines", - "PN":"Pitcairn", - "PL":"Poland", - "PT":"Portugal", - "PR":"Puerto Rico", - "QA":"Qatar", - "RO":"Romania", - "RU":"Russian Federation", - "RW":"Rwanda", - "RE":"Réunion", - "BL":"Saint Barthélemy", - "SH":"Saint Helena, Ascension and Tristan da Cunha", - "KN":"Saint Kitts and Nevis ", - "LC":"Saint Lucia", - "MF":"Saint Martin", - "PM":"Saint Pierre and Miquelon", - "VC":"Saint Vincent and the Grenadines", - "WS":"Samoa", - "SM":"San Marino ", - "ST":"Sao Tome and Principe", - "SA":"Saudi Arabia", - "SN":"Senegal", - "RS":"Serbia", - "SC":"Seychelles", - "SL":"Sierra Leone", - "SG":"Singapore", - "SX":"Sint Maarten", - "SK":"Slovakia", - "SI":"Slovenia", - "SB":"Solomon Islands", - "SO":"Somalia", - "ZA":"South Africa ", - "GS":"South Georgia and the South Sandwich Islands", - "SS":"South Sudan", - "ES":"Spain", - "LK":"Sri Lanka", - "SD":"Sudan", - "SR":"Suriname", - "SJ":"Svalbard and Jan Mayen", - "SE":"Sweden", - "CH":"Switzerland", - "SY":"Syrian Arab Republic", - "TW":"Taiwan", - "TJ":"Tajikistan", - "TZ":"Tanzania, United Republic of", - "TH":"Thailand", - "TL":"Timor-Leste", - "TG":"Togo", - "TK":"Tokelau", - "TO":"Tonga", - "TT":"Trinidad and Tobago", - "TN":"Tunisia", - "TR":"Turkey", - "TM":"Turkmenistan", - "TC":"Turks and Caicos Islands", - "TV":"Tuvalu", - "UG":"Uganda", - "UA":"Ukraine", - "AE":"United Arab Emirates", - "GB":"United Kingdom", - "UM":"United States Minor Outlying Islands", - "US":"United States of America", - "UY":"Uruguay", - "UZ":"Uzbekistan", - "VU":"Vanuatu", - "VE":"Venezuela", - "VN":"Viet Nam", - "VG":"Virgin Islands, British", - "VI":"Virgin Islands, U.S", - "WF":"Wallis and Futuna", - "EH":"Western Sahara", - "YE":"Yemen", - "ZM":"Zambia", - "ZW":"Zimbabwe", + "AF": "Afghanistan", + "AL": "Albania", + "DZ": "Algeria", + "AS": "American Samoa", + "AD": "Andorra", + "AO": "Angola", + "AI": "Anguilla", + "AQ": "Antarctica", + "AG": "Antigua and Barbuda", + "AR": "Argentina", + "AM": "Armenia", + "AW": "Aruba", + "AU": "Australia", + "AT": "Austria", + "AZ": "Azerbaijan", + "BS": "Bahamas, The", + "BH": "Bahrain", + "BD": "Bangladesh", + "BB": "Barbados", + "BY": "Belarus", + "BE": "Belgium", + "BZ": "Belize", + "BJ": "Benin", + "BM": "Bermuda", + "BT": "Bhutan", + "BO": "Bolivia", + "BQ": "Bonaire, Sint Eustatius and Saba", + "BA": "Bosnia and Herzegovina ", + "BW": "Bostwana", + "BV": "Bouvet Island", + "BR": "Brazil", + "IO": "British Indian Ocean Territory", + "BN": "Brunei Darussalam ", + "BG": "Bulgaria", + "BF": "Burkina Faso", + "BI": "Burundi", + "CV": "Cabo Verde", + "KH": "Cambodia", + "CM": "Cameroon", + "CA": "Canada", + "KY": "Cayman Islands", + "CF": "Central African Republic", + "TD": "Chad", + "CL": "Chile", + "CN": "China", + "CX": "Christmas Island ", + "CC": "Cocos(Keeling) Islands", + "CO": "Columbia", + "KM": "Comoros", + "CD": "Congo, The Democratic Republic of the", + "CG": "Congo", + "CK": "Cook Islands", + "CR": "Costa Rica", + "HR": "Croatia", + "CU": "Cuba", + "CW": "Curaçao", + "CY": "Cyprus", + "CZ": "Czechia", + "CI": "Côte d\"Ivoire", + "DK": "Denmark", + "DJ": "Djibouti", + "DM": "Dominica", + "DO": "Dominican Republic", + "EC": "Ecuador", + "EG": "Egypt", + "SV": "El Salvador", + "GQ": "Equatorial Guinea ", + "ER": "Eritrea", + "EE": "Estonia", + "SZ": "Eswatini", + "ET": "Ethiopia", + "FK": "Falkland Islands (Malvinas)", + "FO": "Faroe Islands", + "FJ": "Fiji", + "FI": "Finland", + "FR": "France", + "GF": "French Guiana", + "PF": "French Polynesia", + "TF": "French Southern Territories", + "GA": "Gabon", + "GM": "Gambia, The", + "GE": "Georgia", + "DE": "Germany", + "GH": "Ghana", + "GI": "Gibraltar", + "GR": "Greece", + "GL": "Greenland", + "GD": "Grenada", + "GP": "Guadeloupe", + "GU": "Guam", + "GT": "Guatemala", + "GG": "Guernsey", + "GN": "Guinea", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HT": "Haiti", + "HM": "Heard Island and McDonald Islands", + "VA": "Holy See", + "HN": "Honduras", + "HK": "Hong Kong", + "HU": "Hungary", + "IS": "Iceland", + "IN": "India", + "ID": "Indonesia", + "IR": "Iran, Islamic Republic of", + "IQ": "Iraq", + "IE": "Ireland", + "IM": "Isle of Man", + "IL": "Israel", + "IT": "Italy", + "JM": "Jamaica", + "JP": "Japan", + "JE": "Jersey", + "JO": "Jordan", + "KZ": "Kazakhstan", + "KE": "Kenya", + "KI": "Kiribati", + "KR": "Korea, Republic of", + "KP": "Korea, Democratic People\"s Republic of", + "KW": "Kuwait", + "KG": "Kyrgyzstan", + "LA": "Lao People\"s Democratic Republic", + "LV": "Latvia", + "LB": "Lebanon", + "LS": "Lesotho", + "LR": "Liberia", + "LY": "Libya", + "LI": "Liechtenstein", + "LT": "Lithuania", + "LU": "Luxembourg", + "MO": "Macao", + "MK": "Macedonia, The Former Yugoslav Republic of", + "MG": "Madagascar", + "MW": "Malawi", + "MY": "Malaysia", + "MV": "Maldives", + "ML": "Mali", + "MT": "Malta", + "MH": "Marshall Islands", + "MQ": "Martinique", + "MR": "Mauritania", + "MU": "Mauritius", + "YT": "Mayotte", + "MX": "Mexico", + "FM": "Micronesia, Federated States of", + "MD": "Moldova, Republic of", + "MC": "Monaco", + "MN": "Mongolia", + "ME": "Montenegro", + "MS": "Montserrat", + "MA": "Morocco", + "MZ": "Mozambique", + "MM": "Myanmar", + "NA": "Namibia", + "NR": "Nauru", + "NP": "Nepal", + "NL": "Netherlands", + "NC": "New Caledonia", + "NZ": "New Zealand", + "NI": "Nicaragua", + "NE": "Niger", + "NG": "Nigeria", + "NU": "Niue", + "NF": "Norfolk Island", + "MP": "Northern Mariana Islands", + "NO": "Norway", + "OM": "Oman", + "PK": "Pakistan", + "PW": "Palau", + "PS": "Palestine", + "PA": "Panama", + "PG": "Papua New Guinea", + "PY": "Paraguay", + "PE": "Peru", + "PH": "Philippines", + "PN": "Pitcairn", + "PL": "Poland", + "PT": "Portugal", + "PR": "Puerto Rico", + "QA": "Qatar", + "RO": "Romania", + "RU": "Russian Federation", + "RW": "Rwanda", + "RE": "Réunion", + "BL": "Saint Barthélemy", + "SH": "Saint Helena, Ascension and Tristan da Cunha", + "KN": "Saint Kitts and Nevis ", + "LC": "Saint Lucia", + "MF": "Saint Martin", + "PM": "Saint Pierre and Miquelon", + "VC": "Saint Vincent and the Grenadines", + "WS": "Samoa", + "SM": "San Marino ", + "ST": "Sao Tome and Principe", + "SA": "Saudi Arabia", + "SN": "Senegal", + "RS": "Serbia", + "SC": "Seychelles", + "SL": "Sierra Leone", + "SG": "Singapore", + "SX": "Sint Maarten", + "SK": "Slovakia", + "SI": "Slovenia", + "SB": "Solomon Islands", + "SO": "Somalia", + "ZA": "South Africa ", + "GS": "South Georgia and the South Sandwich Islands", + "SS": "South Sudan", + "ES": "Spain", + "LK": "Sri Lanka", + "SD": "Sudan", + "SR": "Suriname", + "SJ": "Svalbard and Jan Mayen", + "SE": "Sweden", + "CH": "Switzerland", + "SY": "Syrian Arab Republic", + "TW": "Taiwan", + "TJ": "Tajikistan", + "TZ": "Tanzania, United Republic of", + "TH": "Thailand", + "TL": "Timor-Leste", + "TG": "Togo", + "TK": "Tokelau", + "TO": "Tonga", + "TT": "Trinidad and Tobago", + "TN": "Tunisia", + "TR": "Turkey", + "TM": "Turkmenistan", + "TC": "Turks and Caicos Islands", + "TV": "Tuvalu", + "UG": "Uganda", + "UA": "Ukraine", + "AE": "United Arab Emirates", + "GB": "United Kingdom", + "UM": "United States Minor Outlying Islands", + "US": "United States of America", + "UY": "Uruguay", + "UZ": "Uzbekistan", + "VU": "Vanuatu", + "VE": "Venezuela", + "VN": "Viet Nam", + "VG": "Virgin Islands, British", + "VI": "Virgin Islands, U.S", + "WF": "Wallis and Futuna", + "EH": "Western Sahara", + "YE": "Yemen", + "ZM": "Zambia", + "ZW": "Zimbabwe", "AX": "Åland Islands" } } \ No newline at end of file diff --git a/src/store/modules/Configuration/NetworkSettingsStore.js b/src/store/modules/Configuration/NetworkSettingsStore.js index 524ad342..dbeaef65 100644 --- a/src/store/modules/Configuration/NetworkSettingsStore.js +++ b/src/store/modules/Configuration/NetworkSettingsStore.js @@ -1,4 +1,5 @@ import api from '../../api'; +import i18n from '@/i18n'; import { find, remove } from 'lodash'; const NetworkSettingsStore = { @@ -96,11 +97,13 @@ const NetworkSettingsStore = { ) .then(() => dispatch('getEthernetData')) .then(() => { - return 'Successfully configured network settings.'; + return i18n.t('pageNetworkSettings.toast.successSaveNetworkSettings'); }) .catch(error => { console.log(error); - throw new Error('Error configuring network settings.'); + throw new Error( + i18n.t('pageNetworkSettings.toast.errorSaveNetworkSettings') + ); }); } } diff --git a/src/views/Configuration/NetworkSettings/NetworkSettings.vue b/src/views/Configuration/NetworkSettings/NetworkSettings.vue index 18e73a04..63de2376 100644 --- a/src/views/Configuration/NetworkSettings/NetworkSettings.vue +++ b/src/views/Configuration/NetworkSettings/NetworkSettings.vue @@ -1,12 +1,13 @@ @@ -164,12 +194,13 @@ - Add static IP + + {{ $t('pageNetworkSettings.table.addStaticIpv4Address') }} - + - Field required + {{ $t('global.form.fieldRequired') }}
- Invalid + {{ $t('global.form.invalidFormat') }}
@@ -227,7 +262,7 @@
- Add DNS server + {{ $t('pageNetworkSettings.table.addDns') }}
@@ -237,7 +272,7 @@ type="submit" :disabled="!$v.form.$anyDirty || $v.form.$invalid" > - Save settings + {{ $t('global.action.saveSettings') }} @@ -283,12 +318,21 @@ export default { dhcpEnabled: null, ipv4Configuration: '', ipv4StaticTableFields: [ - { key: 'Address', label: 'IP address' }, - { key: 'SubnetMask', label: 'Subnet mask' }, + { + key: 'Address', + label: this.$t('pageNetworkSettings.table.ipAddress') + }, + { + key: 'SubnetMask', + label: this.$t('pageNetworkSettings.table.subnet') + }, { key: 'actions', label: '', tdClass: 'text-right' } ], dnsTableFields: [ - { key: 'address', label: 'IP address' }, + { + key: 'address', + label: this.$t('pageNetworkSettings.table.ipAddress') + }, { key: 'actions', label: '', tdClass: 'text-right' } ], selectedInterfaceIndex: 0, @@ -383,7 +427,7 @@ export default { { value: 'delete', enabled: this.dhcpEnabled, - title: 'delete static dns row' + title: this.$t('pageNetworkSettings.table.deleteDns') } ] }; @@ -397,7 +441,7 @@ export default { { value: 'delete', enabled: this.dhcpEnabled, - title: 'delete static dns row' + title: this.$t('pageNetworkSettings.table.deleteDns') } ] }); @@ -419,7 +463,7 @@ export default { { value: 'delete', enabled: this.dhcpEnabled, - title: 'delete static ipv4 row' + title: this.$t('pageNetworkSettings.table.deleteStaticIpv4') } ] }; @@ -434,7 +478,7 @@ export default { { value: 'delete', enabled: this.dhcpEnabled, - title: 'delete static ipv4 row' + title: this.$t('pageNetworkSettings.table.deleteStaticIpv4') } ] }); -- cgit v1.2.3