From 331cb72a67ed853a553d04266ac33eb3509d0345 Mon Sep 17 00:00:00 2001 From: Alexander Cerutti Date: Tue, 28 Sep 2021 21:52:13 +0200 Subject: [PATCH] Moved translationsFile regex --- src/PKPass.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/PKPass.ts b/src/PKPass.ts index 787fe8a..878e348 100644 --- a/src/PKPass.ts +++ b/src/PKPass.ts @@ -22,9 +22,6 @@ interface NamedBuffers { [key: string]: Buffer; } - -const LOCALIZED_FILE_REGEX_BASE = "(?[a-zA-Z-]{2,}).lproj/"; - export default class PKPass extends Bundle { private certificates: Schemas.CertificatesSchema; private [fieldKeysPoolSymbol] = new Set(); @@ -336,13 +333,12 @@ export default class PKPass extends Bundle { /** * If a new pass.strings file is added, we want to - * prevent if from being merged and, instead, save + * prevent it from being merged and, instead, save * its translations for later */ - const translationsFileRegexp = new RegExp( - `${LOCALIZED_FILE_REGEX_BASE}pass.strings`, - ); + const translationsFileRegexp = + /(?[a-zA-Z-]{2,}).lproj\/pass\.strings/; let match: RegExpMatchArray;