forked from Theme-Fusion/Localization-l10n
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
102 lines (99 loc) · 2.31 KB
/
Gruntfile.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
msgInitMerge: {
theme: {
src: ['Avada/Avada.pot'],
options: {
locales: ['ar', 'ca', 'bg_BG', 'cs_CZ', 'da_DK', 'de_DE','el', 'es_ES', 'fa', 'fa_IR', 'fi', 'fr_FR', 'he', 'hr_HR', 'hu_HU', 'it_IT', 'ja', 'ko', 'mk_MK', 'nb_NO', 'nl_NL', 'pl_PL', 'pt_BR', 'pt_PT', 'ro', 'ru_RU', 'sv_SE', 'tr_TR', 'uk_UA', 'zh_CN', 'zh_TW' ],
poFilesPath: 'Avada/Avada-<%= locale%>.po',
msgInit: {
cmd: 'msginit',
opts: {}
},
msgMerge: {
cmd: 'msgmerge',
opts: {
'no-fuzzy-matching': true,
'backup': 'none',
}
}
}
},
plugin: {
src: ['fusion-core/fusion-core.pot'],
options: {
locales: ['de_DE','es_ES', 'fi', 'fr_FR', 'he', 'it_IT', 'ja', 'ko', 'mk_MK', 'nb_NO', 'nl_NL', 'pl_PL', 'pt_BR', 'ru_RU'],
poFilesPath: 'fusion-core/fusion-core-<%= locale%>.po',
msgInit: {
cmd: 'msginit',
opts: {}
},
msgMerge: {
cmd: 'msgmerge',
opts: {
'no-fuzzy-matching': true,
'backup': 'none',
}
}
}
},
plugin2: {
src: ['fusion-builder/fusion-builder.pot'],
options: {
locales: ['de_DE','es_ES', 'fi', 'fr_FR', 'he', 'it_IT', 'ja', 'ko', 'mk_MK', 'nb_NO', 'nl_NL', 'pl_PL', 'pt_BR', 'ru_RU'],
poFilesPath: 'fusion-builder/fusion-builder-<%= locale%>.po',
msgInit: {
cmd: 'msginit',
opts: {}
},
msgMerge: {
cmd: 'msgmerge',
opts: {
'no-fuzzy-matching': true,
'backup': 'none',
}
}
}
}
},
potomo: {
theme: {
options: { poDel: false },
files: [{
expand: true,
cwd: 'Avada',
src: ['*.po'],
dest: 'Avada',
ext: '.mo',
nonull: true
}]
},
plugin: {
options: { poDel: false },
files: [{
expand: true,
cwd: 'fusion-core',
src: ['*.po'],
dest: 'fusion-core',
ext: '.mo',
nonull: true
}]
},
plugin2: {
options: { poDel: false },
files: [{
expand: true,
cwd: 'fusion-builder',
src: ['*.po'],
dest: 'fusion-builder',
ext: '.mo',
nonull: true
}]
}
},
});
grunt.loadNpmTasks( 'grunt-potomo' );
grunt.loadNpmTasks( 'grunt-msg-init-merge' );
grunt.registerTask('default', ['msgInitMerge', 'potomo'] );
};