Browse Source

Added locales to deploy

master
Igor Zhukov 10 years ago
parent
commit
907ed62772
  1. 9
      app/css/app.css
  2. 2
      app/js/lib/config.js
  3. 22
      gulpfile.js
  4. 1
      package.json

9
app/css/app.css

@ -1414,6 +1414,9 @@ img.im_message_document_thumb { @@ -1414,6 +1414,9 @@ img.im_message_document_thumb {
width: 290px;
padding: 0 0 1px;
}
.im_message_document_actions {
width: 290px;
}
.im_message_document_name {
@ -1500,14 +1503,16 @@ img.im_message_document_thumb { @@ -1500,14 +1503,16 @@ img.im_message_document_thumb {
.im_message_document_thumbed .im_message_document_name_wrap,
.im_message_document_thumbed .im_message_upload_progress_wrap,
.im_message_document_thumbed .im_message_download_progress_wrap {
.im_message_document_thumbed .im_message_download_progress_wrap,
.im_message_document_thumbed .im_message_document_actions {
width: 230px;
}
.im_message_document_thumbed .im_message_document_name {
max-width: 150px;
}
.im_message_video .im_message_document_name_wrap,
.im_message_video .im_message_download_progress_wrap {
.im_message_video .im_message_download_progress_wrap,
.im_message_video .im_message_document_actions {
width: 150px;
}
.im_message_video .im_message_document_name_wrap {

2
app/js/lib/config.js

@ -43,7 +43,7 @@ Config.Navigator = { @@ -43,7 +43,7 @@ Config.Navigator = {
Config.I18n = {
locale: 'en-us',
supported: ['en-us', 'es-es', 'de-de'],
supported: ["en-us", "es-es", "de-de"], // To be copied to package.json
languages: {
'en-us': 'English',
'de-de': 'Deutsch',

22
gulpfile.js

@ -21,7 +21,7 @@ gulp.task('usemin', ['templates', 'enable-production'], function() { @@ -21,7 +21,7 @@ gulp.task('usemin', ['templates', 'enable-production'], function() {
return gulp.src('app/index.html')
.pipe($.usemin({
html: [$.minifyHtml({empty: true})],
js: ['concat', $.ngmin(), $.uglify(/*{outSourceMap: true}*/)],
js: ['concat', $.ngmin(), $.uglify({outSourceMap: false})],
css: [$.minifyCss(), 'concat']
}))
.pipe(gulp.dest('dist'));
@ -51,6 +51,8 @@ gulp.task('copy', function() { @@ -51,6 +51,8 @@ gulp.task('copy', function() {
.pipe(gulp.dest('dist/js/lib')),
gulp.src('app/vendor/closure/long.js')
.pipe(gulp.dest('dist/vendor/closure')),
gulp.src(['app/css/desktop.css', 'app/css/mobile.css'])
.pipe(gulp.dest('dist/css')),
gulp.src('app/vendor/jsbn/jsbn_combined.js')
.pipe(gulp.dest('dist/vendor/jsbn')),
gulp.src('app/vendor/leemon_bigint/bigint.js')
@ -62,6 +64,22 @@ gulp.task('copy', function() { @@ -62,6 +64,22 @@ gulp.task('copy', function() {
);
});
gulp.task('copy-locales', function() {
var langpackSrc = [],
ngSrc = [];
pj.locales.forEach(function (locale) {
langpackSrc.push('app/js/locales/' + locale + '.json');
ngSrc.push('app/vendor/angular/i18n/angular-locale_' + locale + '.js');
});
return es.concat(
gulp.src(langpackSrc)
.pipe(gulp.dest('dist/js/locales/')),
gulp.src(ngSrc)
.pipe(gulp.dest('dist/vendor/angular/i18n/'))
);
});
gulp.task('compress-dist', ['build'], function() {
return gulp.src('**/*', {cwd: path.join(process.cwd(), '/dist')})
.pipe($.zip('webogram_v' + pj.version + '.zip'))
@ -192,7 +210,7 @@ gulp.task('bump', ['update-version-manifests', 'update-version-config'], functio @@ -192,7 +210,7 @@ gulp.task('bump', ['update-version-manifests', 'update-version-config'], functio
gulp.start('update-version-comments');
});
gulp.task('build', ['usemin', 'copy', 'copy-images'], function () {
gulp.task('build', ['usemin', 'copy', 'copy-locales', 'copy-images'], function () {
gulp.start('disable-production');
});
gulp.task('package', ['cleanup-dist']);

1
package.json

@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
"bugs": {
"url": "https://github.com/zhukov/webogram/issues"
},
"locales": ["en-us", "es-es", "de-de"],
"homepage": "http://zhukov.github.io/webogram",
"devDependencies": {
"gulp": "~3.5.5",

Loading…
Cancel
Save