-
Notifications
You must be signed in to change notification settings - Fork 899
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6186 from himdel/ssui-i18n
SSUI i18n tooling
- Loading branch information
Showing
20 changed files
with
130 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
(function() { | ||
'use strict'; | ||
|
||
angular.module('app') | ||
.run(init); | ||
|
||
/** @ngInject */ | ||
function init(gettextCatalog, gettext) { | ||
// prepend [MISSING] to untranslated strings | ||
gettextCatalog.debug = false; | ||
|
||
gettextCatalog.loadAndSet = function(lang) { | ||
gettextCatalog.setCurrentLanguage(lang); | ||
|
||
if (lang) { | ||
gettextCatalog.loadRemote("gettext/json/" + lang + ".json"); | ||
} | ||
}; | ||
|
||
window.N_ = gettext; | ||
window.__ = gettextCatalog.getString.bind(gettextCatalog); | ||
} | ||
})(); |
2 changes: 1 addition & 1 deletion
2
spa_ui/self_service/client/app/services/dialog-field-refresh.service.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
spa_ui/self_service/client/app/states/dashboard/dashboard.state.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
spa_ui/self_service/client/app/states/error/error.state.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
spa_ui/self_service/client/app/states/marketplace/details/details.state.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
spa_ui/self_service/client/app/states/requests/list/list.state.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
spa_ui/self_service/client/app/states/services/list/list.state.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
|
||
var gettext = require('gulp-angular-gettext'); | ||
var log = require('../utils/log'); | ||
|
||
module.exports = function(gulp, options) { | ||
var config = require('../config')[options.key || 'gettextCompile']; | ||
|
||
return task; | ||
|
||
function task() { | ||
if (options.verbose) { | ||
log('Compiling gettext translations (po -> json)'); | ||
} | ||
|
||
return gulp.src(config.inputs) | ||
.pipe(gettext.compile(config.compilerOptions)) | ||
.pipe(gulp.dest(config.outputDir)); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
'use strict'; | ||
|
||
var log = require('../utils/log'); | ||
|
||
module.exports = function(gulp, options) { | ||
var config = require('../config')[options.key || 'gettextCopy']; | ||
|
||
return task; | ||
|
||
function task() { | ||
if (options.verbose) { | ||
log('Copying gettext JSON files to build dir'); | ||
} | ||
|
||
return gulp.src(config.inputs) | ||
.pipe(gulp.dest(config.outputDir)); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
|
||
var gettext = require('gulp-angular-gettext'); | ||
var log = require('../utils/log'); | ||
|
||
module.exports = function(gulp, options) { | ||
var config = require('../config')[options.key || 'gettextExtract']; | ||
|
||
return task; | ||
|
||
function task() { | ||
if (options.verbose) { | ||
log('Extracting gettext translations (* -> po)'); | ||
} | ||
|
||
return gulp.src(config.inputs) | ||
.pipe(gettext.extract(config.potFile, config.extractorOptions)) | ||
.pipe(gulp.dest(config.outputDir)); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters