mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 04:27:15 +03:00
Fix quotations not working in localisation
This commit is contained in:
@@ -268,8 +268,10 @@ export default class Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getLocalizedMessage(text: string): string | false {
|
getLocalizedMessage(text: string): string | false {
|
||||||
|
console.log(chrome.i18n.getMessage("forceChannelCheckPopup"));
|
||||||
const valNewH = text.replace(/__MSG_(\w+)__/g, function(match, v1) {
|
const valNewH = text.replace(/__MSG_(\w+)__/g, function(match, v1) {
|
||||||
return v1 ? chrome.i18n.getMessage(v1).replace("\n", "<br/>") : "";
|
return v1 ? chrome.i18n.getMessage(v1).replaceAll("<", "<")
|
||||||
|
.replaceAll('"', """).replaceAll("\n", "<br/>") : "";
|
||||||
});
|
});
|
||||||
|
|
||||||
if(valNewH != text) {
|
if(valNewH != text) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es6",
|
"target": "es2021",
|
||||||
"noImplicitAny": false,
|
"noImplicitAny": false,
|
||||||
"sourceMap": false,
|
"sourceMap": false,
|
||||||
"outDir": "dist/js",
|
"outDir": "dist/js",
|
||||||
|
|||||||
Reference in New Issue
Block a user