release: WRNexusJS 0.8.0
This commit is contained in:
1 parent
87507edf59
commit
586a6db8ff
625 files changed
+243608
-11210
No files matched your search
@@ -38,3 +38,13 @@ test("translateHtml is a no-op without markers", () => {
|
||||
const t = makeT(i18n, "en");
|
||||
expect(translateHtml("<p>plain</p>", t)).toBe("<p>plain</p>");
|
||||
});
|
||||
|
||||
test("translateHtml preserves authored fallback text when a key is unavailable", () => {
|
||||
const t = (key: string) => key;
|
||||
expect(translateHtml('<h1 data-t="missing.title">Readable fallback</h1>', t)).toBe(
|
||||
'<h1 data-t="missing.title">Readable fallback</h1>',
|
||||
);
|
||||
expect(translateHtml('<input t:placeholder="missing.placeholder" />', t)).toBe(
|
||||
'<input placeholder="" />',
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user