mirror of
https://github.com/ansible/awx.git
synced 2026-05-13 12:27:37 -02:30
Enable message i18n with angular-gettext
Signed-off-by: Takao Fujiwara <tfujiwar@redhat.com>
This commit is contained in:
committed by
jaredevantabor
parent
088e9c0291
commit
40b94a38a8
@@ -1,9 +1,9 @@
|
||||
module.exports = {
|
||||
dev: {
|
||||
tasks: ['copy:vendor', 'copy:assets', 'copy:partials', 'copy:config', 'less:dev'],
|
||||
tasks: ['copy:vendor', 'copy:assets', 'copy:partials', 'copy:languages', 'copy:config', 'less:dev'],
|
||||
},
|
||||
prod: {
|
||||
tasks: ['newer:copy:vendor', 'newer:copy:assets', 'newer:copy:partials', 'newer:copy:config', 'newer:less:prod']
|
||||
tasks: ['newer:copy:vendor', 'newer:copy:assets', 'newer:copy:partials', 'newer:copy:languages', 'newer:copy:config', 'newer:less:prod']
|
||||
},
|
||||
watch: {
|
||||
tasks: ['watch:css', 'watch:partials', 'watch:assets', ['webpack:dev', 'watch:config']],
|
||||
|
||||
@@ -43,6 +43,14 @@ module.exports = {
|
||||
dest: 'static/partials/'
|
||||
}]
|
||||
},
|
||||
languages: {
|
||||
files: [{
|
||||
cwd: 'client/',
|
||||
expand: true,
|
||||
src: 'languages/*.json',
|
||||
dest: 'static/'
|
||||
}]
|
||||
},
|
||||
config: {
|
||||
files: { 'static/config.js': ['client/src/config.js'] }
|
||||
}
|
||||
|
||||
15
awx/ui/grunt-tasks/nggettext_compile.js
Normal file
15
awx/ui/grunt-tasks/nggettext_compile.js
Normal file
@@ -0,0 +1,15 @@
|
||||
module.exports = {
|
||||
all: {
|
||||
options: {
|
||||
format: 'json'
|
||||
},
|
||||
files: [ {
|
||||
expand: true,
|
||||
dot: true,
|
||||
dest: 'client/languages',
|
||||
cwd: 'po',
|
||||
ext: '.json',
|
||||
src: ['*.po']
|
||||
} ]
|
||||
}
|
||||
};
|
||||
11
awx/ui/grunt-tasks/nggettext_extract.js
Normal file
11
awx/ui/grunt-tasks/nggettext_extract.js
Normal file
@@ -0,0 +1,11 @@
|
||||
module.exports = {
|
||||
all: {
|
||||
options: {
|
||||
markerNames: ['_', 'N_']
|
||||
},
|
||||
files: {
|
||||
'po/ansible-tower.pot': ['client/src/**/*.js',
|
||||
'client/src/**/*.html']
|
||||
}
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user