mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 17:25:21 +00:00
Edited generate method to include pass.string translations for each specified language
This commit is contained in:
9
index.js
9
index.js
@@ -70,7 +70,14 @@ class Pass {
|
|||||||
.then(listByFolder => {
|
.then(listByFolder => {
|
||||||
listByFolder.forEach((folder, index) => bundle.push(...folder.map(f => path.join(L10N[index], f))));
|
listByFolder.forEach((folder, index) => bundle.push(...folder.map(f => path.join(L10N[index], f))));
|
||||||
|
|
||||||
return Promise.all([...bundle.map(f => readFile(path.resolve(this.model, f))), _passExtractor()]).then(buffers => [buffers, bundle]);
|
return Promise.all([...bundle.map(f => readFile(path.resolve(this.model, f))), _passExtractor()]).then(buffers => {
|
||||||
|
Object.keys(this.l10n).forEach(l => {
|
||||||
|
buffers.push(this._generateStringFile(l));
|
||||||
|
bundle.push(path.join(`${l}.lproj`, `pass.strings`));
|
||||||
|
});
|
||||||
|
|
||||||
|
return [buffers, bundle];
|
||||||
|
});
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.then(([buffers, bundle]) => {
|
.then(([buffers, bundle]) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user