aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2022-01-26 16:47:08 -0500
committerGitHub <[email protected]>2022-01-26 16:47:08 -0500
commit2a7f08f3600063404ba4cd83721e8f07f957c9ca (patch)
tree46f48ccc50ded5b317404f42bac1d42332185118
parent8922c6cb679e4f02beb7ad401c2bfc4607a2432b (diff)
parentb02e4c1b4f286ce2323efda454b4a7af4c4fdf40 (diff)
downloadSponsorBlock-2a7f08f3600063404ba4cd83721e8f07f957c9ca.tar.gz
SponsorBlock-2a7f08f3600063404ba4cd83721e8f07f957c9ca.zip
Merge pull request #1154 from AronHK/localization
Add missing localizations
-rw-r--r--public/options/options.html2
-rw-r--r--src/content.ts2
-rw-r--r--src/utils.ts2
3 files changed, 4 insertions, 2 deletions
diff --git a/public/options/options.html b/public/options/options.html
index 189f23ad..982ac361 100644
--- a/public/options/options.html
+++ b/public/options/options.html
@@ -2,7 +2,7 @@
<!-- Link to specific tabs by using their ID in the URL like: options.html#keybinds -->
<head>
- <title>Options - SponsorBlock</title>
+ <title>__MSG_Options__ - SponsorBlock</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="../icons/IconSponsorBlocker32px.png" type="image/png">
diff --git a/src/content.ts b/src/content.ts
index b321df38..87894f7a 100644
--- a/src/content.ts
+++ b/src/content.ts
@@ -1873,7 +1873,7 @@ function getSegmentsMessage(sponsorTimes: SponsorTime[]): string {
let timeMessage = utils.getFormattedTime(sponsorTimes[i].segment[s]);
//if this is an end time
if (s == 1) {
- timeMessage = " to " + timeMessage;
+ timeMessage = " " + chrome.i18n.getMessage("to") + " " + timeMessage;
} else if (i > 0) {
//add commas if necessary
timeMessage = ", " + timeMessage;
diff --git a/src/utils.ts b/src/utils.ts
index e3c612bc..5b3c71dc 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -258,6 +258,8 @@ export default class Utils {
localizeHtmlPage(): void {
//Localize by replacing __MSG_***__ meta tags
+ const localizedMessage = this.getLocalizedMessage(document.title);
+ if (localizedMessage) document.title = localizedMessage;
const objects = document.getElementsByClassName("sponsorBlockPageBody")[0].children;
for (let j = 0; j < objects.length; j++) {
const obj = objects[j];