Add angular-translate plugin into FE-os 07/83907/1
authorshentao999 <shentao@chinamobile.com>
Tue, 2 Apr 2019 01:18:32 +0000 (09:18 +0800)
committershentao999 <shentao@chinamobile.com>
Tue, 2 Apr 2019 01:18:34 +0000 (09:18 +0800)
Change-Id: I8f443ed760a4522e0bc83f5fcfb359f3316da3b1
Issue-ID: PORTAL-377
Signed-off-by: shentao999 <shentao@chinamobile.com>
ecomp-portal-FE-os/Gruntfile.js
ecomp-portal-FE-os/bower.json

index 812fc80..6bb5102 100644 (file)
@@ -280,6 +280,7 @@ module.exports = function (grunt) {
                         '<%= yeoman.dist %>/public/{,*/}*.css',
                         '<%= yeoman.dist %>/public/assets/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',
                         '<%= yeoman.dist %>/public/assets/fonts/*',
+                        '<%= yeoman.dist %>/public/assets/i18n/{,*/}*.{json}',
                         '!<%= yeoman.dist %>/public/assets/images/tmp/*'
                     ]
                 }
@@ -326,6 +327,16 @@ module.exports = function (grunt) {
                 }]
             }
         },
+        jsonmin: {
+            dist: {
+                files: [{
+                    expand: true,
+                    cwd: '<%= yeoman.client %>/assets/i18n',
+                    src: '{,*/}*.{json}',
+                    dest: '<%= yeoman.dist %>/public/assets/i18n'
+                }]
+            }
+        },
 
         svgmin: {
             dist: {
@@ -405,6 +416,7 @@ module.exports = function (grunt) {
                         'bower_components/**/*',
                         'bower_components_external/**/*',
                         'assets/images/**/*',
+                        'assets/i18n/**/*',
                         'assets/fonts/**/*',
                         'index.html'
                     ]
@@ -413,6 +425,14 @@ module.exports = function (grunt) {
                     cwd: '.tmp/images',
                     dest: '<%= yeoman.dist %>/public/assets/images',
                     src: ['generated/*']
+                }, {
+                    expand: true,
+                    cwd: '.tmp/i18n',
+                    dest: '<%= yeoman.dist %>/public/assets/i18n',
+                    src: [
+                        'CN.json',
+                        'EN.json'
+                    ]
                 }, {
                     expand: true,
                     dest: '<%= yeoman.dist %>',
index b5c8f75..bd176a0 100644 (file)
@@ -28,7 +28,9 @@
     "jquery.newstape": "1.0.0",
     "oclazyload": "1.0.9",
     "d3" : "3.1.5",
-    "angular-gridster": "^0.13.15"
+    "angular-gridster": "^0.13.15",
+    "angular-translate": "^2.18.1",
+    "angular-translate-loader-static-files": "^2.18.1"
 
   },
   "devDependencies": {