mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 23:24:52 +09:00
Map locale from modules into the save's locale
Map locale files located at locale/{lang}/{file} in a module to
locale/{lang}/{module-name}-{file} in the save. This additionally
support a shorthand notation by mapping locale/{lange}.cfg to
locale/{lang}/{module-name}.cfg.
Resolves #500.
This commit is contained in:
1 parent
a1148c7ec9
commit
cc8ec36e5a
5 files changed
+47
-1
No files matched your search
@@ -27,6 +27,14 @@ describe("Integration of lib/factorio/patch", function() {
|
||||
let zip = await JSZip.loadAsync(await fs.readFile(savePath));
|
||||
assert.equal(await zip.file("test/modules/test/test.lua").async("string"), "-- test\n");
|
||||
assert.equal(await zip.file("test/modules/subdir/dir/test.lua").async("string"), "-- test\n");
|
||||
assert.equal(
|
||||
await zip.file("test/locale/en/test.cfg").async("string"),
|
||||
"module-test=A Test\n"
|
||||
);
|
||||
assert.equal(
|
||||
await zip.file("test/locale/en/test-locale.cfg").async("string"),
|
||||
"module-test-locale=Test Locale\n"
|
||||
);
|
||||
});
|
||||
it("should remove old modules in a save", async function() {
|
||||
slowTest(this);
|
||||
|
||||
Reference in new issue
Block a user