-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathpo2json.node_cli.txt
28 lines (24 loc) · 1.31 KB
/
po2json.node_cli.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
┏━━━━━━━━━━━━━┓
┃ PO2JSON ┃
┗━━━━━━━━━━━━━┛
VERSION ==> #0.4.1
PO2JSON.parse #Returns PO file as OBJ2 or JSON_STR
(BUFFER|STR[, OBJ]) #Returned OBJ2 is { KEY: ARR }, where ARR is:
# - [ null, STR ] if no plural
# - [ PLURAL_KEY, PLURAL_VALS... ] if plural
#OBJ:
# - format STR, among "raw" (def), "jed1.x" (for Jed), "mf" (as "KEY:VALUE")
# - domain "DOMAIN": only with Jed format
# - fuzzy BOOL (def: false): include fuzzy translations
# - fallback-to-msgid (def: false): empty translations -> message ID is used
# - stringify BOOL (def: false): returns as JSON_STR if true, as OBJ if false
# - pretty BOOL (def: false): only if stringify true
PO2JSON.parseFile[Sync]
(FILE[, OBJ],
FUNC(ERROR, OBJ|JSON_STR)) #Same with a FILE
po2json PO_FILE JSON_FILE #As command line
--format STR
--domain DOMAIN
--fuzzy
--fallback-to-msgid
--pretty