@coolon/i18n-resource-generator 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/build/main/lib/arguments.class.d.ts +6 -8
- package/build/main/lib/arguments.class.js +9 -2
- package/build/main/lib/ast/abstractContainerElement.d.ts +4 -4
- package/build/main/lib/ast/abstractContainerElement.js +3 -2
- package/build/main/lib/ast/abstractElement.d.ts +2 -2
- package/build/main/lib/ast/abstractElement.js +1 -1
- package/build/main/lib/ast/containerElement.class.d.ts +11 -10
- package/build/main/lib/ast/jsonModule.class.d.ts +8 -0
- package/build/main/lib/ast/jsonModule.class.js +21 -0
- package/build/main/lib/ast/namespaceDef.class.d.ts +1 -0
- package/build/main/lib/ast/namespaceDef.class.js +8 -1
- package/build/main/lib/ast/objectDef.class.d.ts +9 -8
- package/build/main/lib/ast/objectDef.class.js +11 -7
- package/build/main/lib/ast/statementDef.class.d.ts +7 -0
- package/build/main/lib/ast/statementDef.class.js +14 -0
- package/build/main/lib/bin/cli.js +21 -17
- package/build/main/lib/customTypeArrayNode.class.d.ts +6 -6
- package/build/main/lib/customTypeArrayNode.class.js +8 -11
- package/build/main/lib/customTypeNode.class.d.ts +6 -20
- package/build/main/lib/customTypeNode.class.js +18 -20
- package/build/main/lib/enumNode.class.d.ts +6 -6
- package/build/main/lib/enumNode.class.js +28 -45
- package/build/main/lib/i18nGenerator.d.ts +2 -10
- package/build/main/lib/i18nGenerator.js +39 -78
- package/build/main/lib/i18nNode.class.d.ts +10 -12
- package/build/main/lib/i18nNode.class.js +30 -44
- package/build/main/lib/namespaceNode.class.d.ts +5 -4
- package/build/main/lib/namespaceNode.class.js +4 -4
- package/build/main/lib/nodeName.d.ts +13 -0
- package/build/main/lib/nodeName.js +90 -0
- package/build/main/lib/rootNode.class.d.ts +10 -1
- package/build/main/lib/rootNode.class.js +42 -7
- package/build/main/lib/textArrayNode.class.d.ts +4 -3
- package/build/main/lib/textArrayNode.class.js +6 -5
- package/build/main/lib/textNode.class.d.ts +4 -2
- package/build/main/lib/textNode.class.js +9 -13
- package/build/main/lib/valueNode.class.d.ts +5 -4
- package/build/main/lib/valueNode.class.js +5 -5
- package/build/main/lib/writer.class.js +2 -2
- package/build/module/lib/arguments.class.d.ts +6 -8
- package/build/module/lib/arguments.class.js +10 -3
- package/build/module/lib/ast/abstractContainerElement.d.ts +4 -4
- package/build/module/lib/ast/abstractContainerElement.js +4 -3
- package/build/module/lib/ast/abstractElement.d.ts +2 -2
- package/build/module/lib/ast/abstractElement.js +1 -1
- package/build/module/lib/ast/containerElement.class.d.ts +11 -10
- package/build/module/lib/ast/jsonModule.class.d.ts +8 -0
- package/build/module/lib/ast/jsonModule.class.js +18 -0
- package/build/module/lib/ast/namespaceDef.class.d.ts +1 -0
- package/build/module/lib/ast/namespaceDef.class.js +8 -1
- package/build/module/lib/ast/objectDef.class.d.ts +9 -8
- package/build/module/lib/ast/objectDef.class.js +12 -8
- package/build/module/lib/ast/statementDef.class.d.ts +7 -0
- package/build/module/lib/ast/statementDef.class.js +11 -0
- package/build/module/lib/bin/cli.js +21 -17
- package/build/module/lib/customTypeArrayNode.class.d.ts +6 -6
- package/build/module/lib/customTypeArrayNode.class.js +9 -12
- package/build/module/lib/customTypeNode.class.d.ts +6 -20
- package/build/module/lib/customTypeNode.class.js +18 -20
- package/build/module/lib/enumNode.class.d.ts +6 -6
- package/build/module/lib/enumNode.class.js +30 -47
- package/build/module/lib/i18nGenerator.d.ts +2 -10
- package/build/module/lib/i18nGenerator.js +49 -87
- package/build/module/lib/i18nNode.class.d.ts +10 -12
- package/build/module/lib/i18nNode.class.js +30 -41
- package/build/module/lib/namespaceNode.class.d.ts +5 -4
- package/build/module/lib/namespaceNode.class.js +5 -5
- package/build/module/lib/nodeName.d.ts +13 -0
- package/build/module/lib/nodeName.js +77 -0
- package/build/module/lib/rootNode.class.d.ts +10 -1
- package/build/module/lib/rootNode.class.js +42 -7
- package/build/module/lib/textArrayNode.class.d.ts +4 -3
- package/build/module/lib/textArrayNode.class.js +7 -6
- package/build/module/lib/textNode.class.d.ts +4 -2
- package/build/module/lib/textNode.class.js +9 -13
- package/build/module/lib/valueNode.class.d.ts +5 -4
- package/build/module/lib/valueNode.class.js +5 -5
- package/build/module/lib/writer.class.js +2 -2
- package/fixtures/config.json +1 -0
- package/fixtures/ui.alarms.en.yml +108 -0
- package/fixtures/ui.common.en.yml +23 -0
- package/fixtures/ui.date_time.en.yml +94 -0
- package/fixtures/ui.devices.en.yml +288 -0
- package/fixtures/ui.lux.en.yml +44 -0
- package/fixtures/ui.notification.en.yml +238 -0
- package/fixtures/ui.places.en.yml +104 -0
- package/fixtures/ui.reports.en.yml +138 -0
- package/fixtures/ui.scene.en.yml +11 -0
- package/fixtures/ui.schedule.en.yml +7 -0
- package/fixtures/ui.search.en.yml +73 -0
- package/fixtures/ui.validation.en.yml +63 -0
- package/fixtures/ui.zones.en.yml +121 -0
- package/package.json +7 -4
- package/fixtures/test.yml +0 -20
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
ui:
|
|
2
|
+
zones:
|
|
3
|
+
calibrate:
|
|
4
|
+
introduction_step:
|
|
5
|
+
label: "Introduction"
|
|
6
|
+
|
|
7
|
+
light_sensor_step:
|
|
8
|
+
label: "Light Sensors"
|
|
9
|
+
images(Enum):
|
|
10
|
+
offices:
|
|
11
|
+
label: "Offices and work areas"
|
|
12
|
+
image_url: "assets/images/calibration/sensor/office.svg"
|
|
13
|
+
thoroughfares:
|
|
14
|
+
label: "Walkways and thoroughfares"
|
|
15
|
+
image_url: "assets/images/calibration/sensor/thoroughfare.svg"
|
|
16
|
+
security:
|
|
17
|
+
label: "Outdoor and security lights"
|
|
18
|
+
image_url: "assets/images/calibration/sensor/security.svg"
|
|
19
|
+
|
|
20
|
+
reference_step:
|
|
21
|
+
label: "Reference Surface"
|
|
22
|
+
images(Enum):
|
|
23
|
+
offices:
|
|
24
|
+
label: "Offices and work areas"
|
|
25
|
+
image_url: "assets/images/calibration/reference/office.svg"
|
|
26
|
+
thoroughfares:
|
|
27
|
+
label: "Walkways and thoroughfares"
|
|
28
|
+
image_url: "assets/images/calibration/reference/thoroughfare.svg"
|
|
29
|
+
security:
|
|
30
|
+
label: "Outdoor and security lights"
|
|
31
|
+
image_url: "assets/images/calibration/reference/security.svg"
|
|
32
|
+
|
|
33
|
+
measure_step:
|
|
34
|
+
label: "Measure Levels"
|
|
35
|
+
percentage_level: "{level, number, integer}%"
|
|
36
|
+
all_off: "Ambient"
|
|
37
|
+
|
|
38
|
+
busy_messages:
|
|
39
|
+
initializing_session: 'Initializing...'
|
|
40
|
+
acquiring_sensor: 'Acquiring sensor...'
|
|
41
|
+
adjusting_levels: 'Adjusting levels...'
|
|
42
|
+
reading_sensor: 'Reading sensor...'
|
|
43
|
+
preparing: 'Preparing room...'
|
|
44
|
+
|
|
45
|
+
validation:
|
|
46
|
+
sample_errors:
|
|
47
|
+
level_greater_than_next: 'This reading is higher than one below'
|
|
48
|
+
level_less_than_previous: 'This reading is lower than one above'
|
|
49
|
+
errors(Enum):
|
|
50
|
+
ambient_changes:
|
|
51
|
+
title: "There are some readings that didn't increase as the levels increased."
|
|
52
|
+
description:
|
|
53
|
+
- 'This is most likely caused by changes in the ambient levels during the calibration process.'
|
|
54
|
+
- "If this is the case you're best to take all the samples again during a time where the ambient levels are steady."
|
|
55
|
+
reference_surface_delta_too_small:
|
|
56
|
+
title: "The level changes recorded on the reference surface were too low"
|
|
57
|
+
description:
|
|
58
|
+
- "We need to get a change of at least 40 lux."
|
|
59
|
+
- "It looks like lights aren't bright enough for the reference surface you're using."
|
|
60
|
+
warnings(Confirm[]):
|
|
61
|
+
low_sensor_readings:
|
|
62
|
+
content:
|
|
63
|
+
- "The level changes detected by the sensor were very small"
|
|
64
|
+
- "We can continue but the room will be capable of gated daylight harvesting (i.e. simple on/off but no dimming)"
|
|
65
|
+
ok: "Save as they are?"
|
|
66
|
+
cancel: "No, don't save yet"
|
|
67
|
+
|
|
68
|
+
chart:
|
|
69
|
+
reference_series_name: "Surface Lux"
|
|
70
|
+
sensor_series_name: "Sensor Lux"
|
|
71
|
+
|
|
72
|
+
session_errors(Enum):
|
|
73
|
+
server_session_missing:
|
|
74
|
+
content:
|
|
75
|
+
- "server_session_missing"
|
|
76
|
+
ok: "Ok"
|
|
77
|
+
race_condition:
|
|
78
|
+
content:
|
|
79
|
+
- "race_condition"
|
|
80
|
+
ok: "Ok"
|
|
81
|
+
unexpected_validation_error:
|
|
82
|
+
content:
|
|
83
|
+
- "unexpected_validation_error"
|
|
84
|
+
ok: "Ok"
|
|
85
|
+
facility_controller_not_synchronized:
|
|
86
|
+
content:
|
|
87
|
+
- "facility_controller_not_synchronized"
|
|
88
|
+
ok: "Ok"
|
|
89
|
+
light_sensor_acquisition_failed:
|
|
90
|
+
content:
|
|
91
|
+
- "light_sensor_acquisition_failed"
|
|
92
|
+
ok: "Ok"
|
|
93
|
+
light_sensor_read_failed:
|
|
94
|
+
content:
|
|
95
|
+
- "light_sensor_read_failed"
|
|
96
|
+
ok: "Ok"
|
|
97
|
+
room_missing:
|
|
98
|
+
content:
|
|
99
|
+
- "room_missing"
|
|
100
|
+
ok: "Ok"
|
|
101
|
+
lights_have_alarms:
|
|
102
|
+
content:
|
|
103
|
+
- "Some of the lights in this room have alarms which may interfer with the calibration process."
|
|
104
|
+
- "You'll need to sort out the issues and then try calibrating again."
|
|
105
|
+
ok: "Ok"
|
|
106
|
+
unknown_session_state:
|
|
107
|
+
content:
|
|
108
|
+
- "Hmmm, dang. We've had an error we weren't expecting."
|
|
109
|
+
ok: "Ok, Bugger"
|
|
110
|
+
device_list_changed:
|
|
111
|
+
content:
|
|
112
|
+
- "device list has changed"
|
|
113
|
+
ok: "Ok"
|
|
114
|
+
area_calibration_session_exists:
|
|
115
|
+
content:
|
|
116
|
+
- "area_calibration_session_exists"
|
|
117
|
+
ok: "Ok"
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coolon/i18n-resource-generator",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Generates typescript classes from yml resource bundles using the icu message format",
|
|
5
5
|
"main": "build/main/index.js",
|
|
6
6
|
"typings": "build/main/index.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"all": "run-s reset test cov:check doc:html",
|
|
40
40
|
"prepare-release": "run-s all version doc:publish",
|
|
41
41
|
"publish-release": " git push --follow-tags origin master && npm publish",
|
|
42
|
-
"debug": "node build/main/lib/bin/cli.js 'fixtures' fixtures/
|
|
42
|
+
"debug": "node build/main/lib/bin/cli.js 'fixtures' fixtures/dist"
|
|
43
43
|
},
|
|
44
44
|
"scripts-info": {
|
|
45
45
|
"info": "Display information about the package scripts",
|
|
@@ -58,15 +58,18 @@
|
|
|
58
58
|
"node": ">=8.9"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
+
"@coolon/typescript-utilities": "^2.0.0",
|
|
62
|
+
"@typescript-plus/fast-memoize-decorator": "^0.1.0",
|
|
61
63
|
"barrelsby": "^2.1.1",
|
|
62
|
-
"format-message": "^6.2.3",
|
|
64
|
+
"format-message-interpret": "^6.2.3",
|
|
63
65
|
"format-message-parse": "^6.2.3",
|
|
64
|
-
"format-message-cli": "^6.2.3",
|
|
65
66
|
"glob": "^7.1.3",
|
|
66
67
|
"js-yaml": "^3.7.0",
|
|
67
68
|
"lodash": "^4.17.2",
|
|
69
|
+
"message-format": "^6.2.3",
|
|
68
70
|
"string": "^3.3.3",
|
|
69
71
|
"through2": "^2.0.3",
|
|
72
|
+
"ts-morph": "^3.1.3",
|
|
70
73
|
"vinyl": "^2.0.1"
|
|
71
74
|
},
|
|
72
75
|
"devDependencies": {
|
package/fixtures/test.yml
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
alerts: !List(Alert)
|
|
2
|
-
unknown_error:
|
|
3
|
-
content:
|
|
4
|
-
- "Yikes, this is a bit embarrassing, we've had an error condition we weren't expecting."
|
|
5
|
-
- "It's with great shame an loathing that we can only suggest reloading the page to see if that helps..."
|
|
6
|
-
ok: "Ok, try reloading it..."
|
|
7
|
-
no_response:
|
|
8
|
-
content:
|
|
9
|
-
- "Couldn't connect to server"
|
|
10
|
-
ok: "Ok"
|
|
11
|
-
|
|
12
|
-
confirm: !List(Confirm)
|
|
13
|
-
discard_changes:
|
|
14
|
-
destructive: true
|
|
15
|
-
content:
|
|
16
|
-
- "You have unsaved changes."
|
|
17
|
-
ok: "Discard Changes"
|
|
18
|
-
cancel: "Continue Editing"
|
|
19
|
-
|
|
20
|
-
|