fix: missing translation labels
This commit is contained in:
parent
c6b13d783b
commit
a03036e8e1
|
@ -271,25 +271,44 @@ QtObject {
|
||||||
function formatShortDateStr(longStr) {
|
function formatShortDateStr(longStr) {
|
||||||
const dmKeys = {
|
const dmKeys = {
|
||||||
// Days
|
// Days
|
||||||
|
//% "Sun"
|
||||||
Sunday: qsTrId("sun"),
|
Sunday: qsTrId("sun"),
|
||||||
|
//% "Mon"
|
||||||
Monday: qsTrId("mon"),
|
Monday: qsTrId("mon"),
|
||||||
|
//% "Tue"
|
||||||
Tuesday: qsTrId("tue"),
|
Tuesday: qsTrId("tue"),
|
||||||
|
//% "Wed"
|
||||||
Wednesday: qsTrId("wed"),
|
Wednesday: qsTrId("wed"),
|
||||||
|
//% "Thu"
|
||||||
Thursday: qsTrId("thu"),
|
Thursday: qsTrId("thu"),
|
||||||
|
//% "Fri"
|
||||||
Friday: qsTrId("fri"),
|
Friday: qsTrId("fri"),
|
||||||
|
//% "Sat"
|
||||||
Saturday: qsTrId("sat"),
|
Saturday: qsTrId("sat"),
|
||||||
// Months
|
// Months
|
||||||
|
//% "Jan"
|
||||||
January: qsTrId("jan"),
|
January: qsTrId("jan"),
|
||||||
|
//% "Feb"
|
||||||
February: qsTrId("feb"),
|
February: qsTrId("feb"),
|
||||||
|
//% "Mar"
|
||||||
March: qsTrId("mar"),
|
March: qsTrId("mar"),
|
||||||
|
//% "Apr"
|
||||||
April: qsTrId("apr"),
|
April: qsTrId("apr"),
|
||||||
|
//% "May"
|
||||||
May: qsTrId("may"),
|
May: qsTrId("may"),
|
||||||
|
//% "Jun"
|
||||||
June: qsTrId("jun"),
|
June: qsTrId("jun"),
|
||||||
|
//% "Jul"
|
||||||
July: qsTrId("jul"),
|
July: qsTrId("jul"),
|
||||||
|
//% "Aug"
|
||||||
August: qsTrId("aug"),
|
August: qsTrId("aug"),
|
||||||
|
//% "Sep"
|
||||||
September: qsTrId("sep"),
|
September: qsTrId("sep"),
|
||||||
|
//% "Oct"
|
||||||
October: qsTrId("oct"),
|
October: qsTrId("oct"),
|
||||||
|
//% "Nov"
|
||||||
November: qsTrId("nov"),
|
November: qsTrId("nov"),
|
||||||
|
//% "Dec"
|
||||||
December: qsTrId("dec")
|
December: qsTrId("dec")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -317,14 +336,22 @@ QtObject {
|
||||||
if (now.toDateString() === messageDate.toDateString()) {
|
if (now.toDateString() === messageDate.toDateString()) {
|
||||||
return (hours < 10 ? "0" + hours : hours) + ":" + (minutes < 10 ? "0" + minutes : minutes)
|
return (hours < 10 ? "0" + hours : hours) + ":" + (minutes < 10 ? "0" + minutes : minutes)
|
||||||
} else if (yesterday.toDateString() === messageDate.toDateString()) {
|
} else if (yesterday.toDateString() === messageDate.toDateString()) {
|
||||||
|
//% "Yesterday"
|
||||||
return qsTrId("yesterday")
|
return qsTrId("yesterday")
|
||||||
} else if (lastWeek.getTime() < messageDate.getTime()) {
|
} else if (lastWeek.getTime() < messageDate.getTime()) {
|
||||||
|
//% "Sunday"
|
||||||
let days = [qsTrId("sunday"),
|
let days = [qsTrId("sunday"),
|
||||||
|
//% "Monday"
|
||||||
qsTrId("monday"),
|
qsTrId("monday"),
|
||||||
|
//% "Tuesday"
|
||||||
qsTrId("tuesday"),
|
qsTrId("tuesday"),
|
||||||
|
//% "Wednesday"
|
||||||
qsTrId("wednesday"),
|
qsTrId("wednesday"),
|
||||||
|
//% "Thursday"
|
||||||
qsTrId("thursday"),
|
qsTrId("thursday"),
|
||||||
|
//% "Friday"
|
||||||
qsTrId("friday"),
|
qsTrId("friday"),
|
||||||
|
//% "Saturday"
|
||||||
qsTrId("saturday")];
|
qsTrId("saturday")];
|
||||||
return days[messageDate.getDay()];
|
return days[messageDate.getDay()];
|
||||||
} else {
|
} else {
|
||||||
|
@ -409,6 +436,7 @@ QtObject {
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//% "Join the %1 community"
|
||||||
result.title = qsTrId("join-the--1-community").arg(communityName)
|
result.title = qsTrId("join-the--1-community").arg(communityName)
|
||||||
result.communityId = communityId
|
result.communityId = communityId
|
||||||
result.callback = function () {
|
result.callback = function () {
|
||||||
|
@ -515,11 +543,17 @@ QtObject {
|
||||||
|
|
||||||
function getNetworkName(network){
|
function getNetworkName(network){
|
||||||
switch(network){
|
switch(network){
|
||||||
|
//% "Mainnet with upstream RPC"
|
||||||
case Constants.networkMainnet: return qsTrId("mainnet-with-upstream-rpc")
|
case Constants.networkMainnet: return qsTrId("mainnet-with-upstream-rpc")
|
||||||
|
//% "POA Network"
|
||||||
case Constants.networkPOA: return qsTrId("poa-network")
|
case Constants.networkPOA: return qsTrId("poa-network")
|
||||||
|
//% "xDai Chain"
|
||||||
case Constants.networkXDai: return qsTrId("xdai-chain")
|
case Constants.networkXDai: return qsTrId("xdai-chain")
|
||||||
|
//% "Goerli with upstream RPC"
|
||||||
case Constants.networkGoerli: return qsTrId("goerli-with-upstream-rpc")
|
case Constants.networkGoerli: return qsTrId("goerli-with-upstream-rpc")
|
||||||
|
//% "Rinkeby with upstream RPC"
|
||||||
case Constants.networkRinkeby: return qsTrId("rinkeby-with-upstream-rpc")
|
case Constants.networkRinkeby: return qsTrId("rinkeby-with-upstream-rpc")
|
||||||
|
//% "Ropsten with upstream RPC"
|
||||||
case Constants.networkRopsten: return qsTrId("ropsten-with-upstream-rpc")
|
case Constants.networkRopsten: return qsTrId("ropsten-with-upstream-rpc")
|
||||||
default: return network
|
default: return network
|
||||||
}
|
}
|
||||||
|
@ -529,17 +563,20 @@ QtObject {
|
||||||
switch (item) {
|
switch (item) {
|
||||||
case "first":
|
case "first":
|
||||||
if (firstPasswordField.text === "") {
|
if (firstPasswordField.text === "") {
|
||||||
|
//% "You need to enter a password"
|
||||||
return [false, qsTrId("you-need-to-enter-a-password")];
|
return [false, qsTrId("you-need-to-enter-a-password")];
|
||||||
} else if (firstPasswordField.text.length < 6) {
|
} else if (firstPasswordField.text.length < 6) {
|
||||||
return [false, qsTr("Password needs to be 6 characters or more")];
|
return [false, qsTrId("Password needs to be 6 characters or more")];
|
||||||
}
|
}
|
||||||
return [true, ""];
|
return [true, ""];
|
||||||
|
|
||||||
case "repeat":
|
case "repeat":
|
||||||
if (repeatPasswordField.text === "") {
|
if (repeatPasswordField.text === "") {
|
||||||
|
//% "You need to repeat your password"
|
||||||
return [false, qsTrId("you-need-to-repeat-your-password")];
|
return [false, qsTrId("you-need-to-repeat-your-password")];
|
||||||
} else if (repeatPasswordField.text !== firstPasswordField.text) {
|
} else if (repeatPasswordField.text !== firstPasswordField.text) {
|
||||||
return [false, qsTr("Passwords don't match")];
|
//% "Passwords don't match"
|
||||||
|
return [false, qsTrId("passwords-don-t-match")];
|
||||||
}
|
}
|
||||||
return [true, ""];
|
return [true, ""];
|
||||||
|
|
||||||
|
@ -606,14 +643,17 @@ QtObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(validation & Utils.Validate.TextLength && str.length > limit) {
|
if(validation & Utils.Validate.TextLength && str.length > limit) {
|
||||||
|
//% "The %1 cannot exceed %2 characters"
|
||||||
errMsg = qsTrId("the--1-cannot-exceed--2-characters").arg(fieldName, limit)
|
errMsg = qsTrId("the--1-cannot-exceed--2-characters").arg(fieldName, limit)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(validation & Utils.Validate.TextHexColor && !isHexColor(str)) {
|
if(validation & Utils.Validate.TextHexColor && !isHexColor(str)) {
|
||||||
|
//% "Must be an hexadecimal color (eg: #4360DF)"
|
||||||
errMsg = qsTrId("must-be-an-hexadecimal-color--eg---4360df-")
|
errMsg = qsTrId("must-be-an-hexadecimal-color--eg---4360df-")
|
||||||
}
|
}
|
||||||
|
|
||||||
if(validation & Utils.Validate.TextLowercaseLettersNumberAndDashes && !isValidChannelName(str)) {
|
if(validation & Utils.Validate.TextLowercaseLettersNumberAndDashes && !isValidChannelName(str)) {
|
||||||
|
//% "Use only lowercase letters (a to z), numbers & dashes (-). Do not use chat keys."
|
||||||
errMsg = qsTrId("use-only-lowercase-letters--a-to-z---numbers---dashes------do-not-use-chat-keys-")
|
errMsg = qsTrId("use-only-lowercase-letters--a-to-z---numbers---dashes------do-not-use-chat-keys-")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue