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

[WIP] Convert private WebUI strings to i18next #20610

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
12 changes: 6 additions & 6 deletions src/webui/www/private/addpeers.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<head>
<meta charset="UTF-8" />
<title>QBT_TR(Add Peers)QBT_TR[CONTEXT=PeersAdditionDialog]</title>
<title class="qbt-translatable" data-i18n="Add Peers">Add Peers</title>
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css" />
<script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
Expand Down Expand Up @@ -46,7 +46,7 @@
peers: peers.join('|')
},
onFailure: function() {
alert("QBT_TR(Unable to add peers. Please ensure you are adhering to the IP:port format.)QBT_TR[CONTEXT=HttpServer]");
alert(i18next.t("Unable to add peers. Please ensure you are adhering to the IP:port format."));
},
onSuccess: function() {
window.parent.qBittorrent.Client.closeWindows();
Expand All @@ -59,11 +59,11 @@

<body>
<div style="padding: 10px 10px 0px 10px;">
<p>QBT_TR(List of peers to add (one IP per line):)QBT_TR[CONTEXT=PeersAdditionDialog]</p>
<textarea id="peers" rows="10" style="width: 100%;" placeholder="QBT_TR(Format: IPv4:port / [IPv6]:port)QBT_TR[CONTEXT=PeersAdditionDialog]"></textarea>
<p class="qbt-translatable" data-i18n="List of peers to add (one IP per line):">List of peers to add (one IP per line):</p>
<textarea id="peers" rows="10" style="width: 100%;" class="qbt-translatable" data-i18n="[placeholder]Format: IPv4:port / [IPv6]:port" placeholder="Format: IPv4:port / [IPv6]:port"></textarea>
<div style="margin-top: 10px; text-align: center;">
<button type="button" onclick="parent.qBittorrent.Client.closeWindows();">QBT_TR(Cancel)QBT_TR[CONTEXT=PeersAdditionDialog]</button>
<button type="button" id="addPeersOk">QBT_TR(Ok)QBT_TR[CONTEXT=PeersAdditionDialog]</button>
<button type="button" onclick="parent.qBittorrent.Client.closeWindows();" class="qbt-translatable" data-i18n="Cancel">Cancel</button>
<button type="button" id="addPeersOk" class="qbt-translatable" data-i18n="Ok">Ok</button>
</div>
</div>
</body>
Expand Down
6 changes: 3 additions & 3 deletions src/webui/www/private/addtrackers.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<head>
<meta charset="UTF-8" />
<title>QBT_TR(Add trackers)QBT_TR[CONTEXT=TrackersAdditionDialog]</title>
<title class="qbt-translatable" data-i18n="Add trackers">Add trackers</title>
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css" />
<script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
Expand Down Expand Up @@ -48,10 +48,10 @@
<body>
<div style="text-align: center;">
<br />
<h2 class="vcenter">QBT_TR(List of trackers to add (one per line):)QBT_TR[CONTEXT=TrackersAdditionDialog]</h2>
<h2 class="vcenter qbt-translatable" data-i18n="List of trackers to add (one per line):">List of trackers to add (one per line):</h2>
<textarea name="list" id="trackersUrls" rows="10" cols="1"></textarea>
<br />
<input type="button" value="QBT_TR(Add)QBT_TR[CONTEXT=HttpServer]" id="addTrackersButton" />
<input type="button" class="qbt-translatable" data-i18n="[value]Add" value="Add" id="addTrackersButton" />
</div>
</body>

Expand Down
6 changes: 3 additions & 3 deletions src/webui/www/private/confirmdeletion.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<head>
<meta charset="UTF-8" />
<title>QBT_TR(Remove torrent(s))QBT_TR[CONTEXT=confirmDeletionDlg]</title>
<title class="qbt-translatable" data-i18n="Remove torrent(s)">Remove torrent(s)</title>
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css" />
<script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
Expand Down Expand Up @@ -91,9 +91,9 @@
<p>&nbsp;&nbsp;QBT_TR(Are you sure you want to remove the selected torrents from the transfer list?)QBT_TR[CONTEXT=HttpServer]</p>
&nbsp;&nbsp;&nbsp;&nbsp;<button id="rememberBtn" type="button" title="Remember choice" style="vertical-align: middle; padding: 4px 6px;">
</button>
<input type="checkbox" id="deleteFromDiskCB" /> <label for="deleteFromDiskCB"><i>QBT_TR(Also permanently delete the files)QBT_TR[CONTEXT=confirmDeletionDlg]</i></label><br /><br />
<input type="checkbox" id="deleteFromDiskCB" /> <label for="deleteFromDiskCB"><i class="qbt-translatable" data-i18n="Also permanently delete the files">Also permanently delete the files</i></label><br /><br />
<div style="text-align: right;">
<input type="button" id="cancelBtn" value="QBT_TR(Cancel)QBT_TR[CONTEXT=MainWindow]" />&nbsp;&nbsp;<input type="button" id="confirmBtn" value="QBT_TR(Remove)QBT_TR[CONTEXT=MainWindow]" />&nbsp;&nbsp;
<input type="button" id="cancelBtn" class="qbt-translatable" data-i18n="[value]Cancel" value="Cancel" />&nbsp;&nbsp;<input type="button" id="confirmBtn" class="qbt-translatable" data-i18n="[value]Remove" value="Remove" />&nbsp;&nbsp;
</div>
</body>

Expand Down
8 changes: 4 additions & 4 deletions src/webui/www/private/confirmfeeddeletion.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<head>
<meta charset="UTF-8" />
<title>QBT_TR(Deletion confirmation)QBT_TR[CONTEXT=RSSWidget]</title>
<title class="qbt-translatable" data-i18n="Deletion confirmation">Deletion confirmation</title>
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css" />
<script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
Expand Down Expand Up @@ -43,10 +43,10 @@

<body>
<div style="padding: 10px 10px 0px 10px;">
<p>QBT_TR(Are you sure you want to delete the selected RSS feeds?)QBT_TR[CONTEXT=RSSWidget]</p>
<p class="qbt-translatable" data-i18n="Are you sure you want to delete the selected RSS feeds?">Are you sure you want to delete the selected RSS feeds?</p>
<div style="text-align: right;">
<input type="button" id="cancelBtn" value="QBT_TR(No)QBT_TR[CONTEXT=MainWindow]" />
<input type="button" id="confirmBtn" value="QBT_TR(Yes)QBT_TR[CONTEXT=MainWindow]" />
<input type="button" id="cancelBtn" class="qbt-translatable" data-i18n="[value]No" value="No" />
<input type="button" id="confirmBtn" class="qbt-translatable" data-i18n="[value]Yes" value="Yes" />
</div>
</div>
</body>
Expand Down
8 changes: 4 additions & 4 deletions src/webui/www/private/confirmruleclear.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<head>
<meta charset="UTF-8" />
<title>QBT_TR(Clear downloaded episodes)QBT_TR[CONTEXT=AutomatedRssDownloader]</title>
<title class="qbt-translatable" data-i18n="Clear downloaded episodes">Clear downloaded episodes</title>
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css" />
<script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
Expand Down Expand Up @@ -37,10 +37,10 @@

<body>
<div style="padding: 10px 10px 0px 10px;">
<p>QBT_TR(Are you sure you want to clear the list of downloaded episodes for the selected rule?)QBT_TR[CONTEXT=AutomatedRssDownloader]</p>
<p class="qbt-translatable" data-i18n="Are you sure you want to clear the list of downloaded episodes for the selected rule?">Are you sure you want to clear the list of downloaded episodes for the selected rule?</p>
<div style="text-align: right;">
<input type="button" id="cancelBtn" value="QBT_TR(No)QBT_TR[CONTEXT=MainWindow]" />
<input type="button" id="confirmBtn" value="QBT_TR(Yes)QBT_TR[CONTEXT=MainWindow]" />
<input type="button" id="cancelBtn" class="qbt-translatable" data-i18n="[value]No" value="No" />
<input type="button" id="confirmBtn" class="qbt-translatable" data-i18n="[value]Yes" value="Yes" />
</div>
</div>
</body>
Expand Down
8 changes: 4 additions & 4 deletions src/webui/www/private/confirmruledeletion.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<head>
<meta charset="UTF-8" />
<title>QBT_TR(Rule deletion confirmation)QBT_TR[CONTEXT=AutomatedRssDownloader]</title>
<title class="qbt-translatable" data-i18n="Rule deletion confirmation">Rule deletion confirmation</title>
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css" />
<script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
Expand Down Expand Up @@ -44,10 +44,10 @@

<body>
<div style="padding: 10px 10px 0px 10px;">
<p>QBT_TR(Are you sure you want to remove the selected download rules?)QBT_TR[CONTEXT=AutomatedRssDownloader]</p>
<p class="qbt-translatable" data-i18n="Are you sure you want to remove the selected download rules?">Are you sure you want to remove the selected download rules?</p>
<div style="text-align: right;">
<input type="button" id="cancelBtn" value="QBT_TR(No)QBT_TR[CONTEXT=MainWindow]" />
<input type="button" id="confirmBtn" value="QBT_TR(Yes)QBT_TR[CONTEXT=MainWindow]" />
<input type="button" id="cancelBtn" class="qbt-translatable" data-i18n="[value]No" value="No" />
<input type="button" id="confirmBtn" class="qbt-translatable" data-i18n="[value]Yes" value="Yes" />
</div>
</div>
</body>
Expand Down