Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: update error translations #2252

Merged
merged 2 commits into from Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -130,6 +130,7 @@ exports[`Sidebar renders without crashing 1`] = `
"errors.send.decimal": "You can only send {asset} up to {decimalCount, number} decimals.",
"errors.send.fraction": "You cannot send fractional amounts of NEO.",
"errors.send.invalidAddress": "You need to specify a valid NEO address.",
"errors.send.invalidN3Address": "You need to specify a valid NEO N3 address.",
"errors.send.negative": "You cannot send negative amounts of {asset}.",
"errors.send.network": "A network error has occurred",
"errors.send.number": "Amount must be a number.",
Expand Down Expand Up @@ -813,6 +814,7 @@ exports[`Sidebar renders without crashing 1`] = `
"errors.send.decimal": "You can only send {asset} up to {decimalCount, number} decimals.",
"errors.send.fraction": "You cannot send fractional amounts of NEO.",
"errors.send.invalidAddress": "You need to specify a valid NEO address.",
"errors.send.invalidN3Address": "You need to specify a valid NEO N3 address.",
"errors.send.negative": "You cannot send negative amounts of {asset}.",
"errors.send.network": "A network error has occurred",
"errors.send.number": "Amount must be a number.",
Expand Down
Expand Up @@ -109,6 +109,7 @@ exports[`NetworkSwitch renders without crashing 1`] = `
"errors.send.decimal": "You can only send {asset} up to {decimalCount, number} decimals.",
"errors.send.fraction": "You cannot send fractional amounts of NEO.",
"errors.send.invalidAddress": "You need to specify a valid NEO address.",
"errors.send.invalidN3Address": "You need to specify a valid NEO N3 address.",
"errors.send.negative": "You cannot send negative amounts of {asset}.",
"errors.send.network": "A network error has occurred",
"errors.send.number": "Amount must be a number.",
Expand Down
1 change: 1 addition & 0 deletions __tests__/components/__snapshots__/News.test.js.snap
Expand Up @@ -127,6 +127,7 @@ exports[`News renders without crashing 1`] = `
"errors.send.decimal": "You can only send {asset} up to {decimalCount, number} decimals.",
"errors.send.fraction": "You cannot send fractional amounts of NEO.",
"errors.send.invalidAddress": "You need to specify a valid NEO address.",
"errors.send.invalidN3Address": "You need to specify a valid NEO N3 address.",
"errors.send.negative": "You cannot send negative amounts of {asset}.",
"errors.send.network": "A network error has occurred",
"errors.send.number": "Amount must be a number.",
Expand Down
1 change: 1 addition & 0 deletions __tests__/components/__snapshots__/Settings.test.js.snap
Expand Up @@ -127,6 +127,7 @@ exports[`Settings renders without crashing 1`] = `
"errors.send.decimal": "You can only send {asset} up to {decimalCount, number} decimals.",
"errors.send.fraction": "You cannot send fractional amounts of NEO.",
"errors.send.invalidAddress": "You need to specify a valid NEO address.",
"errors.send.invalidN3Address": "You need to specify a valid NEO N3 address.",
"errors.send.negative": "You cannot send negative amounts of {asset}.",
"errors.send.network": "A network error has occurred",
"errors.send.number": "Amount must be a number.",
Expand Down
1 change: 1 addition & 0 deletions __tests__/components/__snapshots__/Sidebar.test.js.snap
Expand Up @@ -127,6 +127,7 @@ exports[`Sidebar renders without crashing 1`] = `
"errors.send.decimal": "You can only send {asset} up to {decimalCount, number} decimals.",
"errors.send.fraction": "You cannot send fractional amounts of NEO.",
"errors.send.invalidAddress": "You need to specify a valid NEO address.",
"errors.send.invalidN3Address": "You need to specify a valid NEO N3 address.",
"errors.send.negative": "You cannot send negative amounts of {asset}.",
"errors.send.network": "A network error has occurred",
"errors.send.number": "Amount must be a number.",
Expand Down
4 changes: 2 additions & 2 deletions app/containers/Send/Send.jsx
Expand Up @@ -722,13 +722,13 @@ export default class Send extends React.Component<Props, State> {
if (chain === 'neo3' || isMigration) {
if (formAddress[0].toLocaleUpperCase() !== 'N') {
errors.address = intl.formatMessage({
id: 'errors.send.invalidAddress',
id: 'errors.send.invalidN3Address',
})
}

if (!n3Wallet.isAddress(formAddress)) {
errors.address = intl.formatMessage({
id: 'errors.send.invalidAddress',
id: 'errors.send.invalidN3Address',
})
}

Expand Down
1 change: 1 addition & 0 deletions app/translations/arabic.js
Expand Up @@ -129,6 +129,7 @@ const ERRORS = {
'errors.send.zero': `Can not send 0 {asset}.`,
'errors.send.decimal': `يمكنك فقط إرسال {asset} حتى {decimalCount, number} عشرية.`,
'errors.send.invalidAddress': 'تحتاج إلى تحديد عنوان NEO صالح.',
'errors.send.invalidN3Address': 'تحتاج إلى تحديد عنوان NEO N3 صالح.',
'errors.send.blackListed':
'تم إدراج العنوان في القائمة السوداء. هذا عنوان تصيد معروف.',
}
Expand Down
1 change: 1 addition & 0 deletions app/translations/chinese.js
Expand Up @@ -121,6 +121,7 @@ const ERRORS = {
'errors.send.zero': `无法发送0 {asset}.`,
'errors.send.decimal': `您最多只能发送{asset}个{decimalCount,number}个小数.`,
'errors.send.invalidAddress': '您需要指定一个有效的NEO地址.',
'errors.send.invalidN3Address': '您需要指定一个有效的NEO N3地址.',
'errors.send.blackListed': '地址已列入黑名单。这是已知的网络钓鱼地址。',
}

Expand Down
1 change: 1 addition & 0 deletions app/translations/dutch.js
Expand Up @@ -132,6 +132,7 @@ const ERRORS = {
'errors.send.zero': `Je kunt geen 0 {asset} verzenden.`,
'errors.send.decimal': `Je kunt {asset} tot maximaal {decimalCount, number} verzenden.`,
'errors.send.invalidAddress': 'Je moet een geldig NEO adres invoeren..',
'errors.send.invalidN3Address': 'Je moet een geldig NEO N3 adres invoeren..',
'errors.send.blackListed':
'Adres is geblacklist, dit is een bekend phising adres.',
}
Expand Down
1 change: 1 addition & 0 deletions app/translations/english.js
Expand Up @@ -132,6 +132,7 @@ const ERRORS = {
'errors.send.zero': `Can not send 0 {asset}.`,
'errors.send.decimal': `You can only send {asset} up to {decimalCount, number} decimals.`,
'errors.send.invalidAddress': 'You need to specify a valid NEO address.',
'errors.send.invalidN3Address': 'You need to specify a valid NEO N3 address.',
'errors.send.blackListed':
'Address is blacklisted. This is a known phishing address.',
}
Expand Down
2 changes: 2 additions & 0 deletions app/translations/french.js
Expand Up @@ -124,6 +124,8 @@ const ERRORS = {
'errors.send.zero': `Impossible d'envoyer 0 {asset}.`,
'errors.send.decimal': `Vous ne pouvez envoyer que {asset} jusqu'à {decimalCount, number} décimales.`,
'errors.send.invalidAddress': 'Vous devez spécifier une adresse NEO valide.',
'errors.send.invalidN3Address':
'Vous devez spécifier une adresse NEO N3 valide.',
'errors.send.blackListed': `L'adresse est sur liste noire. Il s'agit d'une adresse de phishing connue.`,
}

Expand Down
2 changes: 2 additions & 0 deletions app/translations/german.js
Expand Up @@ -131,6 +131,8 @@ const ERRORS = {
'errors.send.zero': `Kann 0 {asset} nicht senden.`,
'errors.send.decimal': `Sie können {asset} nur bis zu {decimalCount, number} Dezimalstellen senden.`,
'errors.send.invalidAddress': 'Sie müssen eine gültige NEO-Adresse angeben.',
'errors.send.invalidN3Address':
'Sie müssen eine gültige NEO N3-Adresse angeben.',
'errors.send.blackListed':
'Die Adresse ist auf der schwarzen Liste. Dies ist eine bekannte Phishing-Adresse.',
}
Expand Down
2 changes: 2 additions & 0 deletions app/translations/italian.js
Expand Up @@ -127,6 +127,8 @@ const ERRORS = {
'errors.send.zero': `Impossibile inviare 0 {asset}.`,
'errors.send.decimal': `Puoi inviare solo {asset} fino a {decimalCount, number} decimali.`,
'errors.send.invalidAddress': 'Devi specificare un indirizzo NEO valido.',
'errors.send.invalidN3Address':
'Devi specificare un indirizzo NEO N3 valido.',
'errors.send.blackListed': `L'indirizzo è nella lista nera. Questo è un indirizzo di phishing noto.`,
}

Expand Down
1 change: 1 addition & 0 deletions app/translations/korean.js
Expand Up @@ -114,6 +114,7 @@ const ERRORS = {
'errors.send.zero': `0 {asset}을 보낼 수 없습니다.`,
'errors.send.decimal': `{asset}은 최대 {decimalCount, number} 소수까지만 보낼 수 있습니다.`,
'errors.send.invalidAddress': '유효한 NEO 주소를 지정해야합니다.',
'errors.send.invalidN3Address': '유효한 NEO N3 주소를 지정해야합니다.',
'errors.send.blackListed':
'주소가 블랙리스트에 있습니다. 이것은 알려진 피싱 주소입니다.',
}
Expand Down
2 changes: 2 additions & 0 deletions app/translations/portuguese.js
Expand Up @@ -133,6 +133,8 @@ const ERRORS = {
'errors.send.decimal': `Você pode enviar apenas {asset} até {decimalCount, number} decimais.`,
'errors.send.invalidAddress':
'Você precisa especificar um endereço NEO válido.',
'errors.send.invalidN3Address':
'Você precisa especificar um endereço NEO N3 válido.',
'errors.send.blackListed':
'O endereço está na lista negra. Este é um endereço de phishing conhecido.',
}
Expand Down
1 change: 1 addition & 0 deletions app/translations/russian.js
Expand Up @@ -132,6 +132,7 @@ const ERRORS = {
'errors.send.zero': `Вы не можете отправлять 0 {asset}.`,
'errors.send.decimal': `Вы можете отправлять {asset} только размером до {decimalCount, number} чисел.`,
'errors.send.invalidAddress': 'Вы должны ввести правильный адрес NEO.',
'errors.send.invalidN3Address': 'Вы должны ввести правильный адрес NEO N3.',
'errors.send.blackListed':
'Адрес в черном списке. Он был отмечен как фишинговый.',
}
Expand Down
2 changes: 2 additions & 0 deletions app/translations/turkish.js
Expand Up @@ -127,6 +127,8 @@ const ERRORS = {
'errors.send.zero': `0 {asset} gönderilemiyor.`,
'errors.send.decimal': `En fazla {decimalCount, number} ondalık {asset} gönderebilirsiniz.`,
'errors.send.invalidAddress': 'Geçerli bir NEO adresi belirtmeniz gerekiyor.',
'errors.send.invalidN3Address':
'Geçerli bir NEO N3 adresi belirtmeniz gerekiyor.',
'errors.send.blackListed':
'Adres kara listeye alındı. Bu bilinen bir kimlik avı adresidir.',
}
Expand Down
1 change: 1 addition & 0 deletions app/translations/vietnamese.js
Expand Up @@ -124,6 +124,7 @@ const ERRORS = {
'errors.send.zero': `Không thể gửi 0 {asset}.`,
'errors.send.decimal': `Bạn chỉ có thể gửi {asset} tối đa {decimalCount, number} số thập phân.`,
'errors.send.invalidAddress': 'Bạn cần chỉ định một địa chỉ NEO hợp lệ.',
'errors.send.invalidN3Address': 'Bạn cần chỉ định một địa chỉ NEO N3 hợp lệ.',
'errors.send.blackListed':
'Địa chỉ được liệt kê vào danh sách đen. Đây là một địa chỉ lừa đảo được biết đến.',
}
Expand Down