fix: refresh cached plugin translations when only a translation changes (Support#1411)

This commit is contained in:
LukeGus committed 2026-10-07 16:59:50 -05:00
1 parent 18a594a92d
commit fbf7598399
2 files changed
+27 -4

No files matched your search

+17
View File
@@ -85,6 +85,23 @@ describe("describePluginFrontend", () => {
}
});
it("changes the version when only a translation changes", () => {
const before = describePluginFrontend(plugin).assetVersion;
const locale = path.join(
root,
"gizmo",
"locales",
"translated",
"de_DE.json",
);
fs.writeFileSync(locale, '{"hello":"Hallo"}');
try {
expect(describePluginFrontend(plugin).assetVersion).not.toBe(before);
} finally {
fs.writeFileSync(locale, "{}");
}
});
it("reports nothing for an unknown plugin", () => {
expect(describePluginFrontend(undefined)).toEqual({
frontend: false,