mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 14:45:24 +00:00
fix: refresh cached plugin translations when only a translation changes (Support#1411)
This commit is contained in:
1 parent
18a594a92d
commit
fbf7598399
2 files changed
+27
-4
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user