forked from kobotoolbox/collect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kobo-string-replace.js
71 lines (61 loc) · 1.67 KB
/
kobo-string-replace.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
66
67
68
69
70
// Replace string occurrences with their Kobo equivalents
// run "npm install"
// and then "node string-replace.js"
var replace = require("replace");
replace({
regex: "<string name=\"main_menu_details\">.*<",
replacement: "<string name=\"main_menu_details\">Part of KoBoToolbox<",
paths: ['collect_app/src/main/res'],
recursive: true,
silent: true
});
replace({
regex: "<string name=\"click_to_web\">.*<",
replacement: "<string name=\"click_to_web\">KoBoCollect is part of KoBoToolbox (kobotoolbox.org)\\n\\nKoBoCollect is based on the OpenDataKit<",
paths: ['collect_app/src/main/res'],
recursive: true,
silent: true
});
replace({
regex: "https://opendatakit.org",
replacement: "http://www.kobotoolbox.org",
paths: ['collect_app/src/main/java/org/koboc/collect/android/activities/AboutActivity.java'],
recursive: true,
silent: true
});
replace({
regex: "ODK Aggregate",
replacement: "KoBoToolbox",
paths: ['collect_app/src/main/res'],
recursive: true,
silent: true
});
replace({
regex: "ODK Collect",
replacement: "KoBoCollect",
paths: ['collect_app/src/main/res'],
recursive: true,
silent: true
});
replace({
regex: 'Open Data Kit .ODK.',
replacement: "KoBoToolbox",
paths: ['collect_app/src/main/res'],
recursive: true,
silent: true
});
replace({
regex: 'ODK',
replacement: "KoBoToolbox",
paths: ['collect_app/src/main/res'],
recursive: true,
silent: true
});
// This is likely too broad
// replace({
// regex: "ODK",
// replacement: "KoboToolbox",
// paths: ['collect_app/src/main/res'],
// recursive: true,
// silent: true
// });