@gentbajko/slopify 3.6.2 → 3.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -66,8 +66,38 @@ export function respoken(word, observed, formsOf = wordForms) {
|
|
|
66
66
|
function pick(forms, observed) {
|
|
67
67
|
return (forms.find((form) => form !== "" && ` ${observed} `.includes(` ${form} `)) ?? forms[0] ?? "");
|
|
68
68
|
}
|
|
69
|
+
// Latin letters with no accent to strip, spelled the way an English reader says them:
|
|
70
|
+
// "Asbjørnsen" is read "Asbjornsen", "Ægir" "Aegir", "Straße" "Strasse".
|
|
71
|
+
const plainLatin = {
|
|
72
|
+
ø: "o",
|
|
73
|
+
Ø: "O",
|
|
74
|
+
æ: "ae",
|
|
75
|
+
Æ: "AE",
|
|
76
|
+
œ: "oe",
|
|
77
|
+
Œ: "OE",
|
|
78
|
+
ß: "ss",
|
|
79
|
+
ẞ: "SS",
|
|
80
|
+
ð: "d",
|
|
81
|
+
Ð: "D",
|
|
82
|
+
þ: "th",
|
|
83
|
+
Þ: "TH",
|
|
84
|
+
ł: "l",
|
|
85
|
+
Ł: "L",
|
|
86
|
+
đ: "d",
|
|
87
|
+
Đ: "D",
|
|
88
|
+
ħ: "h",
|
|
89
|
+
Ħ: "H",
|
|
90
|
+
ı: "i",
|
|
91
|
+
ŋ: "ng",
|
|
92
|
+
Ŋ: "NG",
|
|
93
|
+
};
|
|
94
|
+
const plainLatinPattern = new RegExp(`[${Object.keys(plainLatin).join("")}]`, "gu");
|
|
69
95
|
function wordForms(raw) {
|
|
70
|
-
const plain = raw
|
|
96
|
+
const plain = raw
|
|
97
|
+
.normalize("NFKD")
|
|
98
|
+
.replace(/\p{M}/gu, "")
|
|
99
|
+
.replace(plainLatinPattern, (letter) => plainLatin[letter] ?? letter)
|
|
100
|
+
.replace(/[‘’]/g, "'");
|
|
71
101
|
if (/\p{L}/u.test(plain.replace(/[A-Za-z]/g, "")))
|
|
72
102
|
throw new Error("Local subtitles currently support English speech and Latin-script names only.");
|
|
73
103
|
const core = plain.replace(/^[^\p{L}\p{N}$£€]+|[^\p{L}\p{N}%]+$/gu, "");
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Slopify 3.6.3
|
|
2
|
+
|
|
3
|
+
Released 3 October 2026.
|
|
4
|
+
|
|
5
|
+
## Subtitles
|
|
6
|
+
|
|
7
|
+
- **Names with ø, æ, ß, ð, þ or ł no longer stop the video.** Local subtitle timing read a name like Asbjørnsen as a foreign script and failed the Video step. Those Latin letters are now read as their plain spelling (ø as o, æ as ae, ß as ss…). Other scripts, such as Cyrillic, still need another subtitle provider.
|
|
8
|
+
|
|
9
|
+
## Upgrading
|
|
10
|
+
|
|
11
|
+
- A video that stopped with "Local subtitles currently support English speech and Latin-script names only" because of such a name: press **Retry** on its Video step.
|