forked from Awesome-Support/Awesome-Support
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile-poeditor.js
78 lines (67 loc) · 1.63 KB
/
Gruntfile-poeditor.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
/* globals module, require */
module.exports = function (grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package-poeditor.json'),
/*
Pull poeditor files
*/
poeditor: {
target2: {
download: {
project_id: process.env.POEDITOR_PROJECT_ID,
type: 'mo',
dest: 'languages/awesome-support-?.mo'
}
},
target3: {
download: {
project_id: process.env.POEDITOR_PROJECT_ID,
type: 'po',
dest: 'languages/awesome-support-?.po'
}
},
options: {
project_id: process.env.POEDITOR_PROJECT_ID,
// matching POEditor's language codes with yours
// applies to uploads & downloads
languages: {
'ar' : 'ar',
'ca' : 'ca',
'da' : 'da_DK',
'de' : 'de_DE',
'el' : 'el',
'en' : 'en_GB',
'es' : 'es_ES',
'es-cl' : 'es_CL',
'es-co' : 'es_CO',
'es_mx' : 'es_MX',
'fa' : 'fa_IR',
'fr' : 'fr_FR',
'he' : 'he_IL',
'hr' : 'hr',
'hu' : 'hu_HU',
'it' : 'it_IT',
'ja' : 'ja',
'my' : 'my_MM',
'nb' : 'nb_NO',
'nl' : 'nl_NL',
'pl' : 'pl_PL',
'pt' : 'pt_PT',
'pt-br' : 'pt_BR',
'ro' : 'ro_RO',
'ru' : 'ru_RU',
'sw' : 'sw',
'sv' : 'sv_SE',
'tr' : 'tr_TR',
'zn-CH' : 'zn-CH'
},
api_token: process.env.POEDITOR_API_TOKEN
}
}
});
// require('load-grunt-tasks')(grunt);
grunt.loadNpmTasks('grunt-poeditor-at');
grunt.registerTask('default', ['poeditor:target2']);
grunt.registerTask('po_editor_pull', ['poeditor:target2','poeditor:target3']);
};