Skip to content

Commit

Permalink
Merge pull request #2769
Browse files Browse the repository at this point in the history
98ab4ea misc: strip html out of translatable strings (selsta)
  • Loading branch information
luigi1111 committed Feb 20, 2020
2 parents 4c09968 + 98ab4ea commit d1e431c
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 22 deletions.
6 changes: 3 additions & 3 deletions main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1982,11 +1982,11 @@ ApplicationWindow {
var version = parts[0]
var hash = parts[1]
var user_url = parts[2]
var msg = ""
var msg = qsTr("New version of Monero v%1 is available.").arg(version)
if (isMac || isWindows || isLinux) {
msg = qsTr("New version of Monero v%1 is available.<br><br>Download:<br>%2<br><br>SHA256 Hash:<br>%3").arg(version).arg(user_url).arg(hash) + translationManager.emptyString
msg += "<br><br>%1:<br>%2<br><br>%3:<br>%4".arg(qsTr("Download")).arg(user_url).arg(qsTr("SHA256 Hash")).arg(hash) + translationManager.emptyString
} else {
msg = qsTr("New version of Monero v%1 is available. Check out getmonero.org").arg(version) + translationManager.emptyString
msg += " " + qsTr("Check out getmonero.org") + translationManager.emptyString
}
notifier.show(msg)
} else {
Expand Down
8 changes: 4 additions & 4 deletions pages/AddressBook.qml
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ Rectangle {
MoneroComponents.LineEditMulti {
id: addressLine
Layout.topMargin: 20
labelText: qsTr("<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\
Address") + translationManager.emptyString
labelText: "<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style> %1"
.arg(qsTr("Address")) + translationManager.emptyString
placeholderText: {
if(persistentSettings.nettype == NetworkType.MAINNET){
return "4.. / 8.. / OpenAlias";
Expand Down Expand Up @@ -384,8 +384,8 @@ Rectangle {
MoneroComponents.LineEditMulti {
id: descriptionLine
Layout.topMargin: 20
labelText: qsTr("<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\
Description") + translationManager.emptyString
labelText: "<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style> %1"
.arg(qsTr("Description")) + translationManager.emptyString
placeholderText: qsTr("Add a name...") + translationManager.emptyString
}
RowLayout {
Expand Down
8 changes: 4 additions & 4 deletions pages/Transfer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Rectangle {

return "";
}
property string startLinkText: qsTr("<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style><font size='2'> (</font><a href='#'>Start daemon</a><font size='2'>)</font>") + translationManager.emptyString
property string startLinkText: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style><a href='#'>(%1)</a>".arg(qsTr("Start daemon")) + translationManager.emptyString
property bool warningLongPidDescription: descriptionLine.text.match(/^[0-9a-f]{64}$/i)

Clipboard { id: clipboard }
Expand Down Expand Up @@ -176,8 +176,8 @@ Rectangle {
id: amountLine
Layout.fillWidth: true
inlineIcon: true
labelText: qsTr("<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\
Amount <font size='2'> ( </font> <a href='#'>Change account</a><font size='2'> )</font>")
labelText: "<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\
%1 <a href='#'>(%2)</a>".arg(qsTr("Amount")).arg(qsTr("Change account"))
+ translationManager.emptyString
copyButton: !isNaN(amountLine.text) && persistentSettings.fiatPriceEnabled
copyButtonText: fiatApiCurrencySymbol() + " ~" + fiatApiConvertToFiat(amountLine.text)
Expand Down Expand Up @@ -262,7 +262,7 @@ Rectangle {
spacing: 0
fontBold: true
labelText: qsTr("<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\
Address <font size='2'> ( </font> <a href='#'>Address book</a><font size='2'> )</font>")
%1 <a href='#'>(%2)</a>").arg(qsTr("Address")).arg(qsTr("Address book"))
+ translationManager.emptyString
labelButtonText: qsTr("Resolve") + translationManager.emptyString
placeholderText: {
Expand Down
12 changes: 4 additions & 8 deletions pages/merchant/Merchant.qml
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,10 @@ Item {
model: trackingModel
message: {
if(!root.enableTracking){
return qsTr(
"<style>p{font-size:14px;}</style>" +
"<p>This page will automatically scan the blockchain and the tx pool " +
"for incoming transactions using the QR code.</p>" +
"<p>It's up to you whether to accept unconfirmed transactions or not. It is likely they'll be " +
"confirmed in short order, but there is still a possibility they might not, so for larger " +
"values you may want to wait for one or more confirmation(s).</p>"
) + translationManager.emptyString;
return "<style>p{font-size:14px;}</style> <p>%1</p> <p>%2</p>"
.arg(qsTr("This page will automatically scan the blockchain and the tx pool for incoming transactions using the QR code."))
.arg(qsTr("It's up to you whether to accept unconfirmed transactions or not. It is likely they'll be confirmed in short order, but there is still a possibility they might not, so for larger values you may want to wait for one or more confirmation(s)"))
+ translationManager.emptyString;
} else if(root.trackingError !== ""){
return root.trackingError;
} else if(trackingModel.count < 1){
Expand Down
2 changes: 1 addition & 1 deletion pages/settings/SettingsInfo.qml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ Rectangle {
color: MoneroComponents.Style.dimmedFontColor
font.pixelSize: 14
property var style: "<style type='text/css'>a {cursor:pointer;text-decoration: none; color: #FF6C3C}</style>"
text: (currentWallet ? currentWallet.walletCreationHeight : "") + style + qsTr(" <a href='#'> (Click to change)</a>") + translationManager.emptyString
text: (currentWallet ? currentWallet.walletCreationHeight : "") + style + " <a href='#'> (%1)</a>".arg(qsTr("Change")) + translationManager.emptyString
onLinkActivated: {
inputDialog.labelText = qsTr("Set a new restore height.\nYou can enter a block height or a date (YYYY-MM-DD):") + translationManager.emptyString;
inputDialog.onAcceptedCallback = function() {
Expand Down
2 changes: 1 addition & 1 deletion pages/settings/SettingsNode.qml
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ Rectangle{
fontSize: 15
labelFontSize: 14
property string style: "<style type='text/css'>a {cursor:pointer;text-decoration: none; color: #FF6C3C}</style>"
labelText: qsTr("Blockchain location") + style + qsTr(" <a href='#'> (change)</a>") + translationManager.emptyString
labelText: qsTr("Blockchain location") + style + " <a href='#'> (%1)</a>".arg(qsTr("Change")) + translationManager.emptyString
placeholderText: qsTr("(default)") + translationManager.emptyString
placeholderFontSize: 15
readOnly: true
Expand Down
2 changes: 1 addition & 1 deletion wizard/WizardAskPassword.qml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ ColumnLayout {
}

MoneroComponents.WarningBox {
text: qsTr("<b>Enter a strong password</b> (Using letters, numbers, and/or symbols).") + translationManager.emptyString
text: "<b>%1</b> (%2).".arg(qsTr("Enter a strong password")).arg(qsTr("Using letters, numbers, and/or symbols")) + translationManager.emptyString
}

ColumnLayout {
Expand Down

0 comments on commit d1e431c

Please sign in to comment.