mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 13:07:05 +03:00
Merge pull request #1154 from AronHK/localization
Add missing localizations
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<!-- Link to specific tabs by using their ID in the URL like: options.html#keybinds -->
|
<!-- Link to specific tabs by using their ID in the URL like: options.html#keybinds -->
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>Options - SponsorBlock</title>
|
<title>__MSG_Options__ - SponsorBlock</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<link rel="icon" href="../icons/IconSponsorBlocker32px.png" type="image/png">
|
<link rel="icon" href="../icons/IconSponsorBlocker32px.png" type="image/png">
|
||||||
|
|||||||
@@ -1873,7 +1873,7 @@ function getSegmentsMessage(sponsorTimes: SponsorTime[]): string {
|
|||||||
let timeMessage = utils.getFormattedTime(sponsorTimes[i].segment[s]);
|
let timeMessage = utils.getFormattedTime(sponsorTimes[i].segment[s]);
|
||||||
//if this is an end time
|
//if this is an end time
|
||||||
if (s == 1) {
|
if (s == 1) {
|
||||||
timeMessage = " to " + timeMessage;
|
timeMessage = " " + chrome.i18n.getMessage("to") + " " + timeMessage;
|
||||||
} else if (i > 0) {
|
} else if (i > 0) {
|
||||||
//add commas if necessary
|
//add commas if necessary
|
||||||
timeMessage = ", " + timeMessage;
|
timeMessage = ", " + timeMessage;
|
||||||
|
|||||||
@@ -258,6 +258,8 @@ export default class Utils {
|
|||||||
|
|
||||||
localizeHtmlPage(): void {
|
localizeHtmlPage(): void {
|
||||||
//Localize by replacing __MSG_***__ meta tags
|
//Localize by replacing __MSG_***__ meta tags
|
||||||
|
const localizedMessage = this.getLocalizedMessage(document.title);
|
||||||
|
if (localizedMessage) document.title = localizedMessage;
|
||||||
const objects = document.getElementsByClassName("sponsorBlockPageBody")[0].children;
|
const objects = document.getElementsByClassName("sponsorBlockPageBody")[0].children;
|
||||||
for (let j = 0; j < objects.length; j++) {
|
for (let j = 0; j < objects.length; j++) {
|
||||||
const obj = objects[j];
|
const obj = objects[j];
|
||||||
|
|||||||
Reference in New Issue
Block a user