-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
index.js
65 lines (64 loc) · 3.46 KB
/
index.js
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
const fs = require('fs')
const path = require('path')
const fixNewLines = require('../fixNewLines')
module.exports = {
example_standalone: {
js: require('./example_standalone.json'),
xliff: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_standalone.xliff')).toString()),
xliff12: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_standalone12.xliff')).toString())
},
example_standalone_only: {
js: require('./example_standalone_only.json'),
xliff: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_standalone_only.xliff')).toString()),
xliff12: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_standalone_only12.xliff')).toString())
},
example_genericSpan: {
js: require('./example_generic-span.json'),
xliff: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_generic-span.xliff')).toString()),
xliff12: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_generic-span12.xliff')).toString()),
js_source: require('./example_generic-span_source.json'),
js_target: require('./example_generic-span_target.json')
},
example_genericSpanStartEnd: {
js: require('./example_generic-span-start-end.json'),
xliff: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_generic-span-start-end.xliff')).toString()),
xliff12: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_generic-span-start-end12.xliff')).toString())
},
example_nativeSpan: {
js: require('./example_native-span.json'),
xliff: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_native-span.xliff')).toString()),
xliff12: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_native-span12.xliff')).toString()),
js_source: require('./example_native-span_source.json'),
js_target: require('./example_native-span_target.json')
},
example_nativeSpanStartEnd: {
js: require('./example_native-span-start-end.json'),
xliff: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_native-span-start-end.xliff')).toString()),
xliff12: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_native-span-start-end12.xliff')).toString())
},
example_invalidSegment: {
js: require('./example_invalid-segment.json'),
xliff: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_invalid-segment.xliff')).toString()),
xliff12: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_invalid-segment12.xliff')).toString())
},
// Examples showing how this could work with i18next
example_i18next_nativeSpan: {
js: require('./example_i18next_native-span.json'),
xliff12: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_i18next_native-span12.xliff')).toString())
},
example_i18next_unstructured_nativeSpan: {
js: require('./example_i18next_unstructured_native-span.json'),
xliff12: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_i18next_unstructured_native-span12.xliff')).toString())
},
example_marker: {
js: require('./example_marker.json'),
xliff12: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_marker12.xliff')).toString())
},
// angular
example_angular: {
js: require('./example_angular.json'),
xliff: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_angular.xliff')).toString()),
xliff12: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_angular12.xliff')).toString()),
xliff12ident: fixNewLines(fs.readFileSync(path.join(__dirname, 'example_angular12_ident.xliff')).toString())
}
}