Fix typos

This commit is contained in:
Chocobo1
2023-06-25 15:45:18 +08:00
parent 88bd4f270f
commit 6680fdda18
71 changed files with 164 additions and 164 deletions

View File

@@ -103,9 +103,9 @@
fileRenamer.useRegex = multirename_useRegex === 'true';
$('use_regex_search').checked = fileRenamer.useRegex;
var multirename_matchAllOccurences = LocalPreferences.get('multirename_matchAllOccurences', false);
fileRenamer.matchAllOccurences = multirename_matchAllOccurences === 'true';
$('match_all_occurences').checked = fileRenamer.matchAllOccurences;
var multirename_matchAllOccurrences = LocalPreferences.get('multirename_matchAllOccurrences', false);
fileRenamer.matchAllOccurrences = multirename_matchAllOccurrences === 'true';
$('match_all_occurrences').checked = fileRenamer.matchAllOccurrences;
var multirename_caseSensitive = LocalPreferences.get('multirename_caseSensitive', false);
fileRenamer.caseSensitive = multirename_caseSensitive === 'true';
@@ -138,7 +138,7 @@
$('renameButton').set('value', renameButtonValue);
}
// Fires everytime a row's selection changes
// Fires every time a row's selection changes
bulkRenameFilesTable.onRowSelectionChange = function(row) {
fileRenamer.selectedFiles = bulkRenameFilesTable.getSelectedRows();
fileRenamer.update();
@@ -159,9 +159,9 @@
LocalPreferences.set('multirename_useRegex', e.target.checked);
fileRenamer.update();
});
$('match_all_occurences').addEvent('change', function(e) {
fileRenamer.matchAllOccurences = e.target.checked;
LocalPreferences.set('multirename_matchAllOccurences', e.target.checked);
$('match_all_occurrences').addEvent('change', function(e) {
fileRenamer.matchAllOccurrences = e.target.checked;
LocalPreferences.set('multirename_matchAllOccurrences', e.target.checked);
fileRenamer.update();
});
$('case_sensitive').addEvent('change', function(e) {
@@ -232,7 +232,7 @@
// Disable Search Options
$('multiRenameSearch').disabled = true;
$('use_regex_search').disabled = true;
$('match_all_occurences').disabled = true;
$('match_all_occurrences').disabled = true;
$('case_sensitive').disabled = true;
// Disable Replace Options
$('multiRenameReplace').disabled = true;
@@ -251,7 +251,7 @@
// Disable Search Options
$('multiRenameSearch').disabled = false;
$('use_regex_search').disabled = false;
$('match_all_occurences').disabled = false;
$('match_all_occurrences').disabled = false;
$('case_sensitive').disabled = false;
// Disable Replace Options
$('multiRenameReplace').disabled = false;
@@ -427,8 +427,8 @@
<label for="use_regex_search">QBT_TR(Use regular expressions)QBT_TR[CONTEXT=PropertiesWidget]</label>
</div>
<div class="formRow">
<input type="checkbox" id="match_all_occurences" />
<label for="match_all_occurences">QBT_TR(Match all occurrences)QBT_TR[CONTEXT=PropertiesWidget]</label>
<input type="checkbox" id="match_all_occurrences" />
<label for="match_all_occurrences">QBT_TR(Match all occurrences)QBT_TR[CONTEXT=PropertiesWidget]</label>
</div>
<div class="formRow">
<input type="checkbox" id="case_sensitive" />

View File

@@ -1135,9 +1135,9 @@ window.qBittorrent.DynamicTable = (function() {
// progress
this.columns['progress'].updateTd = function(td, row) {
const progress = this.getRowValue(row);
let progressFormated = (progress * 100).round(1);
if (progressFormated == 100.0 && progress != 1.0)
progressFormated = 99.9;
let progressFormatted = (progress * 100).round(1);
if (progressFormatted == 100.0 && progress != 1.0)
progressFormatted = 99.9;
if (td.getChildren('div').length > 0) {
const div = td.getChildren('div')[0];
@@ -1145,13 +1145,13 @@ window.qBittorrent.DynamicTable = (function() {
td.resized = false;
div.setWidth(ProgressColumnWidth - 5);
}
if (div.getValue() != progressFormated)
div.setValue(progressFormated);
if (div.getValue() != progressFormatted)
div.setValue(progressFormatted);
}
else {
if (ProgressColumnWidth < 0)
ProgressColumnWidth = td.offsetWidth;
td.adopt(new window.qBittorrent.ProgressBar.ProgressBar(progressFormated.toFloat(), {
td.adopt(new window.qBittorrent.ProgressBar.ProgressBar(progressFormatted.toFloat(), {
'width': ProgressColumnWidth - 5
}));
td.resized = false;
@@ -1592,12 +1592,12 @@ window.qBittorrent.DynamicTable = (function() {
// progress
this.columns['progress'].updateTd = function(td, row) {
const progress = this.getRowValue(row);
let progressFormated = (progress * 100).round(1);
if (progressFormated == 100.0 && progress != 1.0)
progressFormated = 99.9;
progressFormated += "%";
td.set('text', progressFormated);
td.set('title', progressFormated);
let progressFormatted = (progress * 100).round(1);
if (progressFormatted == 100.0 && progress != 1.0)
progressFormatted = 99.9;
progressFormatted += "%";
td.set('text', progressFormatted);
td.set('title', progressFormatted);
};
// dl_speed, up_speed
@@ -3064,7 +3064,7 @@ window.qBittorrent.DynamicTable = (function() {
filterText: '',
filterdLength: function() {
filteredLength: function() {
return this.tableBody.getElements('tr').length;
},

View File

@@ -31,7 +31,7 @@ window.qBittorrent.MultiRename = (function() {
this.onChanged(this.matchedFiles);
},
useRegex: false,
matchAllOccurences: false,
matchAllOccurrences: false,
caseSensitive: false,
// Replacement Options
@@ -129,7 +129,7 @@ window.qBittorrent.MultiRename = (function() {
// Setup regex flags
let regexFlags = "";
if (this.matchAllOccurences) { regexFlags += "g"; }
if (this.matchAllOccurrences) { regexFlags += "g"; }
if (!this.caseSensitive) { regexFlags += "i"; }
// Setup regex search

View File

@@ -184,7 +184,7 @@
let customSyncLogDataInterval = null;
let logFilterTimer;
let inputedFilterText = "";
let inputtedFilterText = "";
let selectBox;
let selectedLogLevels = JSON.parse(LocalPreferences.get('qbt_selected_log_levels')) || ['1', '2', '4', '8'];
@@ -220,7 +220,7 @@
tableInfo[currentSelectedTab].instance.removeRow(rowId);
});
updateLableCount();
updateLabelCount();
}
},
offsets: {
@@ -264,7 +264,7 @@
};
const getFilterText = () => {
return inputedFilterText;
return inputtedFilterText;
};
const getSelectedLevels = () => {
@@ -288,8 +288,8 @@
const filterTextChanged = () => {
const value = $('filterTextInput').get('value').trim();
if (inputedFilterText !== value) {
inputedFilterText = value;
if (inputtedFilterText !== value) {
inputtedFilterText = value;
logFilterChanged();
}
};
@@ -298,7 +298,7 @@
clearTimeout(logFilterTimer);
logFilterTimer = setTimeout((curTab) => {
tableInfo[curTab].instance.updateTable(false);
updateLableCount(curTab);
updateLabelCount(curTab);
}, 400, currentSelectedTab);
};
@@ -326,14 +326,14 @@
if (tableInfo[currentSelectedTab].instance.filterText !== getFilterText()) {
tableInfo[currentSelectedTab].instance.updateTable();
}
updateLableCount();
updateLabelCount();
};
const updateLableCount = (curTab) => {
const updateLabelCount = (curTab) => {
if (curTab === undefined)
curTab = currentSelectedTab;
$('numFilteredLogs').set('text', tableInfo[curTab].instance.filterdLength());
$('numFilteredLogs').set('text', tableInfo[curTab].instance.filteredLength());
$('numTotalLogs').set('text', tableInfo[curTab].instance.getRowIds().length);
};
@@ -402,7 +402,7 @@
tableInfo[curTab].instance.updateTable();
tableInfo[curTab].instance.altRow();
updateLableCount(curTab);
updateLabelCount(curTab);
}
tableInfo[curTab].progress = false;