Skip to content

Commit

Permalink
Merge pull request #12 from bryan-m-hughes/timob-11229
Browse files Browse the repository at this point in the history
Timob 11229 i18n support
  • Loading branch information
cb1kenobi committed Oct 8, 2012
2 parents dfd0f73 + 396f2e6 commit 2a2e3c6
Show file tree
Hide file tree
Showing 16 changed files with 161 additions and 523 deletions.
3 changes: 3 additions & 0 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ var async = require('async'),
config = require('./config'),
semver = require('semver'),
appc = require('node-appc'),
i18n = appc.i18n(__dirname),
__ = i18n.__,
__n = i18n.__n,
afs = appc.fs,
hitch = appc.util.hitch,
mix = appc.util.mix,
Expand Down
5 changes: 4 additions & 1 deletion lib/commands/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
*/

var config = require('../config'),
appc = require('node-appc');
appc = require('node-appc'),
i18n = appc.i18n(__dirname),
__ = i18n.__,
__n = i18n.__n;

exports.desc = __('get and set config options');
exports.extendedDesc = __('Gets and sets config options. If no key is specified, then all key/values are returned.\n\nThe config file is located at: %s', config.getConfigPath().cyan);
Expand Down
3 changes: 3 additions & 0 deletions lib/commands/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*/

var appc = require('node-appc'),
i18n = appc.i18n(__dirname),
__ = i18n.__,
__n = i18n.__n,
string = appc.string,
async = require('async'),
path = require('path');
Expand Down
3 changes: 3 additions & 0 deletions lib/commands/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*/

var appc = require('node-appc'),
i18n = appc.i18n(__dirname),
__ = i18n.__,
__n = i18n.__n,
env = appc.environ,
mix = appc.util.mix,
async = require('async'),
Expand Down
5 changes: 4 additions & 1 deletion lib/commands/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
* See the LICENSE file for more information.
*/

var appc = require('node-appc');
var appc = require('node-appc'),
i18n = appc.i18n(__dirname),
__ = i18n.__,
__n = i18n.__n;

exports.desc = __('logs into the Appcelerator network');

Expand Down
5 changes: 4 additions & 1 deletion lib/commands/logout.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
* See the LICENSE file for more information.
*/

var appc = require('node-appc');
var appc = require('node-appc'),
i18n = appc.i18n(__dirname),
__ = i18n.__,
__n = i18n.__n;

exports.desc = __('logs out of the Appcelerator network');

Expand Down
3 changes: 3 additions & 0 deletions lib/commands/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*/

var appc = require('node-appc'),
i18n = appc.i18n(__dirname),
__ = i18n.__,
__n = i18n.__n,
afs = appc.fs,
path = require('path'),
platformNames = {
Expand Down
3 changes: 3 additions & 0 deletions lib/commands/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*/

var appc = require('node-appc'),
i18n = appc.i18n(__dirname),
__ = i18n.__,
__n = i18n.__n,
afs = appc.fs,
path = require('path'),
platformNames = {
Expand Down
3 changes: 3 additions & 0 deletions lib/commands/sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ var async = require('async'),
wrench = require('wrench'),
prompt = require('prompt'),
appc = require('node-appc'),
i18n = appc.i18n(__dirname),
__ = i18n.__,
__n = i18n.__n,
addAnalyticsEvent,
urls = {
branches: 'http://builds.appcelerator.com.s3.amazonaws.com/mobile/branches.json',
Expand Down
5 changes: 4 additions & 1 deletion lib/commands/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
*/

var config = require('../config'),
appc = require('node-appc');
appc = require('node-appc'),
i18n = appc.i18n(__dirname),
__ = i18n.__,
__n = i18n.__n;

exports.desc = __('run the setup wizard');

Expand Down
3 changes: 3 additions & 0 deletions lib/commands/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*/

var appc = require('node-appc'),
i18n = appc.i18n(__dirname),
__ = i18n.__,
__n = i18n.__n,
async = require('async');

exports.desc = __('displays session information');
Expand Down
5 changes: 5 additions & 0 deletions lib/commands/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
* See the LICENSE file for more information.
*/

var appc = require('node-appc'),
i18n = appc.i18n(__dirname),
__ = i18n.__,
__n = i18n.__n;

exports.desc = __('print the version and exits');

exports.config = function (logger, config, cli) {
Expand Down
3 changes: 3 additions & 0 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
var fs = require('fs'),
path = require('path'),
appc = require('node-appc'),
i18n = appc.i18n(__dirname),
__ = i18n.__,
__n = i18n.__n,
afs = appc.fs,
config = {
// default config
Expand Down
10 changes: 3 additions & 7 deletions lib/titanium.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

var config = require('./config').load(),
appc = require('node-appc'),
i18n = appc.i18n(__dirname),
__ = i18n.__,
__n = i18n.__n,
env = appc.environ,
afs = appc.fs,
fs = require('fs'),
Expand Down Expand Up @@ -34,13 +37,6 @@ global.tiexception = function (ex) {
}
};

// initialze i18n
require('i18n').configure({
directory: path.join(module.filename, '..', '..', 'locales'),
register: global,
updateFiles: false
});

cli.addAnalyticsEvent = appc.analytics.addEvent;
cli.sendAnalytics = sendAnalytics;

Expand Down

0 comments on commit 2a2e3c6

Please sign in to comment.