mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 22:25:24 +00:00
Added tests for addBuffer and improved handling of empty strings files
This commit is contained in:
@@ -403,9 +403,15 @@ export default class PKPass extends Bundle {
|
||||
if ((match = pathName.match(translationsFileRegexp))) {
|
||||
const [, lang] = match;
|
||||
|
||||
const parsedTranslations = Strings.parse(buffer).translations;
|
||||
|
||||
if (!parsedTranslations.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
Object.assign(
|
||||
(this[localizationSymbol][lang] ??= {}),
|
||||
Object.fromEntries(Strings.parse(buffer).translations),
|
||||
Object.fromEntries(parsedTranslations),
|
||||
);
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user