mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 21:25:26 +00:00
Improved l10n bundle distribution
This commit is contained in:
@@ -151,11 +151,15 @@ async function getModelFolderContents(model: string): Promise<PartitionedBundle>
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const l10nBundle: PartitionedBundle["l10nBundle"] = Object.assign(
|
||||||
|
{},
|
||||||
|
...L10N_FilesListByFolder
|
||||||
|
.map((folder, index) => ({ [l10nFolders[index]]: folder }))
|
||||||
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
bundle: bundleMap,
|
bundle: bundleMap,
|
||||||
l10nBundle: Object.assign({}, ...L10N_FilesListByFolder
|
l10nBundle
|
||||||
.map((folder, index) => ({ [l10nFolders[index]]: folder }))
|
|
||||||
) as PartitionedBundle["l10nBundle"]
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,11 +194,11 @@ function getModelBufferContents(model: BundleUnit): PartitionedBundle {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
const unLocalizedBundle = Object.assign({},
|
const unLocalizedBundle: BundleUnit = Object.assign({},
|
||||||
...bundleKeys
|
...bundleKeys
|
||||||
.filter(file => !file.includes(".lproj"))
|
.filter(file => !file.includes(".lproj"))
|
||||||
.map(file => ({ [file]: bundle[file] }))
|
.map(file => ({ [file]: bundle[file] }))
|
||||||
) as BundleUnit;
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
bundle: unLocalizedBundle,
|
bundle: unLocalizedBundle,
|
||||||
|
|||||||
Reference in New Issue
Block a user