-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added the ability to translate interface into other languages (#9). - Added Polish language. - Improved the way classes are named
- Loading branch information
1 parent
2551b2e
commit 4200579
Showing
14 changed files
with
241 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
# 1.0.3 (25012) | ||
# 1.0.4 (25013) | ||
|
||
## Release Notes | ||
|
||
- Added the ability to change the icon on the toolbar. | ||
- Added welcome screen (#5). | ||
- Updated UI. | ||
- Added the ability to translate interface into other languages (#9). | ||
- Added Polish language. | ||
|
||
> [!WARNING] | ||
> File `-unsigned.xpi` will most likely not work in your browser. Use the signed version (`-signed.xpi`) or download from [Mozilla Add-ons](https://addons.mozilla.org/firefox/addon/redirecttube/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"ui": { | ||
"close": "Close", | ||
"createdby": "Created with ❤️ by <a href=\"https://www.stankiewiczm.eu\" target=\"_blank\">Michał Stankiewicz</a>", | ||
"button": { | ||
"redirect": "Open this site in FreeTube", | ||
"options": "Options", | ||
"opinion": "Give your opinion", | ||
"suggestion": "Make a suggestion", | ||
"issue": "Report an issue" | ||
}, | ||
"contextMenu": { | ||
"redirect": "Open in FreeTube" | ||
}, | ||
"error": { | ||
"e404": "Cannot open this page in FreeTube." | ||
} | ||
}, | ||
"introduction": { | ||
"page": { | ||
"title": "RedirectTube • Introduction" | ||
}, | ||
"usage": { | ||
"title": "Usage", | ||
"toolbar": "Click the icon when you are on a YouTube video page", | ||
"contextMenu": "or right-click on the url of a YouTube video" | ||
} | ||
}, | ||
"options": { | ||
"page": { | ||
"title": "RedirectTube" | ||
}, | ||
"options": { | ||
"title": "Options" | ||
}, | ||
"popupBehavior": { | ||
"label": "When clicking the extension icon:", | ||
"showPopup": "Show menu", | ||
"redirect": "Redirect to FreeTube" | ||
}, | ||
"extensionIcon": { | ||
"label": "Extension icon:" | ||
}, | ||
"footer": { | ||
"version": "RedirectTube v<span id=\"version\">X.Y.Z</span>", | ||
"kofi": "If you like this extension, consider <a href=\"https://ko-fi.com/mstankiewicz\" target=\"_blank\">buying me a tea</a> 🍵", | ||
"affiliation": "RedirectTube is not affiliated with FreeTube or its creators.<br>FreeTube is licensed under the <a href=\"https://github.com/FreeTubeApp/FreeTube/blob/master/LICENSE\">AGPL-3.0 licence</a>.<br>The name \"FreeTube\" and FreeTube logo are the property of the <a href=\"https://docs.freetubeapp.io/credits/\">creators of FreeTube</a>." | ||
} | ||
}, | ||
"popup": { | ||
"page": { | ||
"title": "RedirectTube" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"ui": { | ||
"close": "Zamknij", | ||
"createdby": "Stworzone z ❤️ przez <a href=\"https://www.stankiewiczm.eu\" target=\"_blank\">Michała Stankiewicza</a>", | ||
"button": { | ||
"redirect": "Otwórz tę stronę we FreeTube", | ||
"options": "Opcje", | ||
"opinion": "Wyraź opinię", | ||
"suggestion": "Napisz sugestię", | ||
"issue": "Zgłoś problem" | ||
}, | ||
"contextMenu": { | ||
"redirect": "Otwórz we FreeTube" | ||
}, | ||
"error": { | ||
"e404": "Nie można otworzyć tej strony we FreeTube." | ||
} | ||
}, | ||
"introduction": { | ||
"page": { | ||
"title": "RedirectTube • Wprowadzenie" | ||
}, | ||
"usage": { | ||
"title": "Korzystanie", | ||
"toolbar": "Kliknij ikonę, gdy jesteś na stronie z filmem na YouTube", | ||
"contextMenu": "lub kliknij prawym przyciskiem link do filmu na YouTube" | ||
} | ||
}, | ||
"options": { | ||
"page": { | ||
"title": "RedirectTube" | ||
}, | ||
"options": { | ||
"title": "Opcje" | ||
}, | ||
"popupBehavior": { | ||
"label": "Po kliknięciu ikony rozszerzenia:", | ||
"showPopup": "Pokaż menu", | ||
"redirect": "Przekieruj do FreeTube" | ||
}, | ||
"extensionIcon": { | ||
"label": "Ikona rozszerzenia:" | ||
}, | ||
"footer": { | ||
"version": "RedirectTube v<span id=\"version\">X.Y.Z</span>", | ||
"kofi": "Jeśli podoba Ci się to rozszerzenie, rozważ <a href=\"https://ko-fi.com/mstankiewicz\" target=\"_blank\">postawienie mi herbaty</a> 🍵", | ||
"affiliation": "RedirectTube nie jest powiązany z FreeTube ani jego twórcami. FreeTube jest licencjonowany na <a href=\"https://github.com/FreeTubeApp/FreeTube/blob/master/LICENSE\">licencji AGPL-3.0</a>. Nazwa \"FreeTube\" oraz logo FreeTube są własnością <a href=\"https://docs.freetubeapp.io/credits/\">twórców FreeTube</a>." | ||
} | ||
}, | ||
"popup": { | ||
"page": { | ||
"title": "RedirectTube" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
let langList = ["en", "pl"] | ||
|
||
let lang = navigator.language.split("-")[0] | ||
if (!langList.includes(lang)) { | ||
lang = "en" | ||
} | ||
|
||
chrome.storage.local.set({ lang: lang }) | ||
|
||
document.documentElement.lang = lang | ||
|
||
let menuTitleRedirect = "" | ||
|
||
fetch(`i18n/locales/${lang}.json`) | ||
.then(response => response.json()) | ||
.then(data => { | ||
let elements = document.querySelectorAll("[data-i18n]") | ||
elements.forEach(element => { | ||
let key = element.getAttribute("data-i18n").split(".") | ||
let value = data | ||
key.forEach(k => { | ||
value = value[k] | ||
}) | ||
element.innerHTML = value | ||
}) | ||
menuTitleRedirect = data.ui.contextMenu.redirect | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.