[WebUI]Make the context obligatory for translatable strings. Also delete duplicate strings from extra translations.

This commit is contained in:
sledgehammer999 2017-05-01 01:45:02 +03:00
parent fc0c28d376
commit e177799ada
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2
29 changed files with 393 additions and 438 deletions

View file

@ -47,7 +47,7 @@ initializeWindows = function() {
new Event(e).stop();
new MochaUI.Window({
id: 'downloadPage',
title: "QBT_TR(Download from URLs)QBT_TR",
title: "QBT_TR(Download from URLs)QBT_TR[CONTEXT=downloadFromURL]",
loadMethod: 'iframe',
contentURL: 'download.html',
scrollbars: true,
@ -66,7 +66,7 @@ initializeWindows = function() {
new Event(e).stop();
new MochaUI.Window({
id: 'preferencesPage',
title: "QBT_TR(Options)QBT_TR",
title: "QBT_TR(Options)QBT_TR[CONTEXT=OptionsDialog]",
loadMethod: 'xhr',
toolbar: true,
contentURL: 'preferences_content.html',
@ -88,7 +88,7 @@ initializeWindows = function() {
new Event(e).stop();
new MochaUI.Window({
id: 'uploadPage',
title: "QBT_TR(Upload local torrent)QBT_TR",
title: "QBT_TR(Upload local torrent)QBT_TR[CONTEXT=HttpServer]",
loadMethod: 'iframe',
contentURL: 'upload.html',
scrollbars: true,
@ -105,7 +105,7 @@ initializeWindows = function() {
globalUploadLimitFN = function() {
new MochaUI.Window({
id: 'uploadLimitPage',
title: "QBT_TR(Global Upload Speed Limit)QBT_TR",
title: "QBT_TR(Global Upload Speed Limit)QBT_TR[CONTEXT=MainWindow]",
loadMethod: 'iframe',
contentURL: 'uploadlimit.html?hashes=global',
scrollbars: false,
@ -124,7 +124,7 @@ initializeWindows = function() {
var hash = h[0];
new MochaUI.Window({
id: 'uploadLimitPage',
title: "QBT_TR(Torrent Upload Speed Limiting)QBT_TR",
title: "QBT_TR(Torrent Upload Speed Limiting)QBT_TR[CONTEXT=TransferListWidget]",
loadMethod: 'iframe',
contentURL: 'uploadlimit.html?hashes=' + h.join("|"),
scrollbars: false,
@ -199,7 +199,7 @@ initializeWindows = function() {
globalDownloadLimitFN = function() {
new MochaUI.Window({
id: 'downloadLimitPage',
title: "QBT_TR(Global Download Speed Limit)QBT_TR",
title: "QBT_TR(Global Download Speed Limit)QBT_TR[CONTEXT=MainWindow]",
loadMethod: 'iframe',
contentURL: 'downloadlimit.html?hashes=global',
scrollbars: false,
@ -215,7 +215,7 @@ initializeWindows = function() {
StatisticsLinkFN = function() {
new MochaUI.Window({
id: 'statisticspage',
title: 'QBT_TR(Statistics)QBT_TR',
title: 'QBT_TR(Statistics)QBT_TR[CONTEXT=StatsDialog]',
loadMethod: 'xhr',
contentURL: 'statistics.html',
scrollbars: false,
@ -233,7 +233,7 @@ initializeWindows = function() {
var hash = h[0];
new MochaUI.Window({
id: 'downloadLimitPage',
title: "QBT_TR(Torrent Download Speed Limiting)QBT_TR",
title: "QBT_TR(Torrent Download Speed Limiting)QBT_TR[CONTEXT=TransferListWidget]",
loadMethod: 'iframe',
contentURL: 'downloadlimit.html?hashes=' + h.join("|"),
scrollbars: false,
@ -252,7 +252,7 @@ initializeWindows = function() {
if (h.length) {
new MochaUI.Window({
id: 'confirmDeletionPage',
title: "QBT_TR(Deletion confirmation)QBT_TR",
title: "QBT_TR(Deletion confirmation)QBT_TR[CONTEXT=confirmDeletionDlg]",
loadMethod: 'iframe',
contentURL: 'confirmdeletion.html?hashes=' + h.join("|"),
scrollbars: false,
@ -324,7 +324,7 @@ initializeWindows = function() {
if (h.length) {
new MochaUI.Window({
id: 'newCategoryPage',
title: "QBT_TR(New Category)QBT_TR",
title: "QBT_TR(New Category)QBT_TR[CONTEXT=TransferListWidget]",
loadMethod: 'iframe',
contentURL: 'newcategory.html?hashes=' + h.join('|'),
scrollbars: false,
@ -358,7 +358,7 @@ initializeWindows = function() {
createCategoryFN = function () {
new MochaUI.Window({
id: 'newCategoryPage',
title: "QBT_TR(New Category)QBT_TR",
title: "QBT_TR(New Category)QBT_TR[CONTEXT=CategoryFilterWidget]",
loadMethod: 'iframe',
contentURL: 'newcategory.html',
scrollbars: false,
@ -437,7 +437,7 @@ initializeWindows = function() {
if (h.length) {
new MochaUI.Window({
id: 'confirmDeletionPage',
title: "QBT_TR(Deletion confirmation)QBT_TR",
title: "QBT_TR(Deletion confirmation)QBT_TR[CONTEXT=confirmDeletionDlg]",
loadMethod: 'iframe',
contentURL: 'confirmdeletion.html?hashes=' + h.join("|"),
scrollbars: false,
@ -505,7 +505,7 @@ initializeWindows = function() {
new Event(e).stop();
new MochaUI.Window({
id: 'aboutpage',
title: 'QBT_TR(About)QBT_TR',
title: 'QBT_TR(About)QBT_TR[CONTEXT=AboutDlg]',
loadMethod: 'xhr',
contentURL: 'about.html',
width: 550,
@ -527,11 +527,11 @@ initializeWindows = function() {
addClickEvent('shutdown', function(e) {
new Event(e).stop();
if (confirm('QBT_TR(Are you sure you want to quit qBittorrent?)QBT_TR')) {
if (confirm('QBT_TR(Are you sure you want to quit qBittorrent?)QBT_TR[CONTEXT=MainWindow]')) {
new Request({
url: 'command/shutdown',
onSuccess: function() {
document.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>QBT_TR(qBittorrent has been shutdown.)QBT_TR</title><style type=\"text/css\">body { text-align: center; }</style></head><body><h1>QBT_TR(qBittorrent has been shutdown.)QBT_TR</h1></body></html>");
document.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>QBT_TR(qBittorrent has been shutdown.)QBT_TR[CONTEXT=HttpServer]</title><style type=\"text/css\">body { text-align: center; }</style></head><body><h1>QBT_TR(qBittorrent has been shutdown.)QBT_TR[CONTEXT=HttpServer]</h1></body></html>");
stop();
}
}).send();