mirror of
https://gitlab.com/TheOneWithTheBraid/dart_pkpass.git
synced 2025-07-06 05:18:47 +00:00
feat: add String localization support
Signed-off-by: The one with the braid <the-one@with-the-braid.cf>
This commit is contained in:
parent
78f88305ec
commit
e345763813
10 changed files with 173 additions and 13 deletions
10
lib/src/utils/lproj_parser.dart
Normal file
10
lib/src/utils/lproj_parser.dart
Normal file
|
@ -0,0 +1,10 @@
|
|||
abstract class LProjParser {
|
||||
const LProjParser._();
|
||||
static Map<String, String> parse(String stringsFile) => Map.fromEntries(
|
||||
RegExp(r'"((?:\\"|[^"])*)"\s?=\s?"((?:\\"|[^"])*)"\s?;')
|
||||
.allMatches(stringsFile)
|
||||
.map(
|
||||
(match) => MapEntry(match.group(1)!, match.group(2)!),
|
||||
),
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue