forked from angular/angular-cli
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathxi18n.ts
39 lines (31 loc) · 971 Bytes
/
xi18n.ts
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
const Command = require('../ember-cli/lib/models/command');
export interface Xi18nOptions {
outputPath?: string;
verbose?: boolean;
i18nFormat?: string;
}
const Xi18nCommand = Command.extend({
name: 'xi18n',
description: 'Extracts i18n messages from source code.',
works: 'insideProject',
availableOptions: [
{
name: 'i18n-format',
type: String,
default: 'xlf',
aliases: ['f', {'xmb': 'xmb'}, {'xlf': 'xlf'}, {'xliff': 'xlf'}]
},
{ name: 'output-path', type: 'Path', default: null, aliases: ['op']},
{ name: 'verbose', type: Boolean, default: false},
{ name: 'progress', type: Boolean, default: true }
],
run: function (commandOptions: any) {
const {Extracti18nTask} = require('../tasks/extract-i18n');
const xi18nTask = new Extracti18nTask({
ui: this.ui,
project: this.project
});
return xi18nTask.run(commandOptions);
}
});
export default Xi18nCommand;