misc: strip html out of translatable strings

This commit is contained in:
selsta 2019-12-08 22:06:31 +01:00
parent d5469c8247
commit 98ab4ea2aa
No known key found for this signature in database
GPG key ID: 2EA0A99A8B07AE5E
7 changed files with 18 additions and 22 deletions

View file

@ -1982,11 +1982,11 @@ ApplicationWindow {
var version = parts[0] var version = parts[0]
var hash = parts[1] var hash = parts[1]
var user_url = parts[2] var user_url = parts[2]
var msg = "" var msg = qsTr("New version of Monero v%1 is available.").arg(version)
if (isMac || isWindows || isLinux) { 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 { } 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) notifier.show(msg)
} else { } else {

View file

@ -306,8 +306,8 @@ Rectangle {
MoneroComponents.LineEditMulti { MoneroComponents.LineEditMulti {
id: addressLine id: addressLine
Layout.topMargin: 20 Layout.topMargin: 20
labelText: qsTr("<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\ labelText: "<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style> %1"
Address") + translationManager.emptyString .arg(qsTr("Address")) + translationManager.emptyString
placeholderText: { placeholderText: {
if(persistentSettings.nettype == NetworkType.MAINNET){ if(persistentSettings.nettype == NetworkType.MAINNET){
return "4.. / 8.. / OpenAlias"; return "4.. / 8.. / OpenAlias";
@ -384,8 +384,8 @@ Rectangle {
MoneroComponents.LineEditMulti { MoneroComponents.LineEditMulti {
id: descriptionLine id: descriptionLine
Layout.topMargin: 20 Layout.topMargin: 20
labelText: qsTr("<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\ labelText: "<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style> %1"
Description") + translationManager.emptyString .arg(qsTr("Description")) + translationManager.emptyString
placeholderText: qsTr("Add a name...") + translationManager.emptyString placeholderText: qsTr("Add a name...") + translationManager.emptyString
} }
RowLayout { RowLayout {

View file

@ -78,7 +78,7 @@ Rectangle {
return ""; 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) property bool warningLongPidDescription: descriptionLine.text.match(/^[0-9a-f]{64}$/i)
Clipboard { id: clipboard } Clipboard { id: clipboard }
@ -176,8 +176,8 @@ Rectangle {
id: amountLine id: amountLine
Layout.fillWidth: true Layout.fillWidth: true
inlineIcon: true inlineIcon: true
labelText: qsTr("<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\ labelText: "<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>") %1 <a href='#'>(%2)</a>".arg(qsTr("Amount")).arg(qsTr("Change account"))
+ translationManager.emptyString + translationManager.emptyString
copyButton: !isNaN(amountLine.text) && persistentSettings.fiatPriceEnabled copyButton: !isNaN(amountLine.text) && persistentSettings.fiatPriceEnabled
copyButtonText: fiatApiCurrencySymbol() + " ~" + fiatApiConvertToFiat(amountLine.text) copyButtonText: fiatApiCurrencySymbol() + " ~" + fiatApiConvertToFiat(amountLine.text)
@ -262,7 +262,7 @@ Rectangle {
spacing: 0 spacing: 0
fontBold: true fontBold: true
labelText: qsTr("<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\ 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 + translationManager.emptyString
labelButtonText: qsTr("Resolve") + translationManager.emptyString labelButtonText: qsTr("Resolve") + translationManager.emptyString
placeholderText: { placeholderText: {

View file

@ -151,14 +151,10 @@ Item {
model: trackingModel model: trackingModel
message: { message: {
if(!root.enableTracking){ if(!root.enableTracking){
return qsTr( return "<style>p{font-size:14px;}</style> <p>%1</p> <p>%2</p>"
"<style>p{font-size:14px;}</style>" + .arg(qsTr("This page will automatically scan the blockchain and the tx pool for incoming transactions using the QR code."))
"<p>This page will automatically scan the blockchain and the tx pool " + .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)"))
"for incoming transactions using the QR code.</p>" + + translationManager.emptyString;
"<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;
} else if(root.trackingError !== ""){ } else if(root.trackingError !== ""){
return root.trackingError; return root.trackingError;
} else if(trackingModel.count < 1){ } else if(trackingModel.count < 1){

View file

@ -182,7 +182,7 @@ Rectangle {
color: MoneroComponents.Style.dimmedFontColor color: MoneroComponents.Style.dimmedFontColor
font.pixelSize: 14 font.pixelSize: 14
property var style: "<style type='text/css'>a {cursor:pointer;text-decoration: none; color: #FF6C3C}</style>" 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: { onLinkActivated: {
inputDialog.labelText = qsTr("Set a new restore height.\nYou can enter a block height or a date (YYYY-MM-DD):") + translationManager.emptyString; 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() { inputDialog.onAcceptedCallback = function() {

View file

@ -381,7 +381,7 @@ Rectangle{
fontSize: 15 fontSize: 15
labelFontSize: 14 labelFontSize: 14
property string style: "<style type='text/css'>a {cursor:pointer;text-decoration: none; color: #FF6C3C}</style>" 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 placeholderText: qsTr("(default)") + translationManager.emptyString
placeholderFontSize: 15 placeholderFontSize: 15
readOnly: true readOnly: true

View file

@ -87,7 +87,7 @@ ColumnLayout {
} }
MoneroComponents.WarningBox { 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 { ColumnLayout {