Skip to content

Commit

Permalink
Reverts back the hyphen replace on the locale file.
Browse files Browse the repository at this point in the history
  • Loading branch information
andparker committed Jul 28, 2015
1 parent 8fb0123 commit e82af39
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var locale = require('locale');
var util = require('./util.js');

module.exports = function LocalizationModule(pb) {

//pb dependencies
var config = pb.config;

Expand All @@ -36,7 +36,7 @@ module.exports = function LocalizationModule(pb) {
* @param {Object} request The request object
*/
function Localization(request){

//expected to be lowercase and of the form "en-us"
this.language = Localization.best(request).toString();
}
Expand Down Expand Up @@ -244,7 +244,7 @@ module.exports = function LocalizationModule(pb) {
}

//convert file name to locale
var locale = file.toLowerCase().substring(0, file.indexOf('.'));
var locale = file.toLowerCase().substring(0, file.indexOf('.')).replace(/-/g, '_');

//Register as a supported language
Localization.storage[locale] = obj;
Expand Down Expand Up @@ -296,7 +296,7 @@ module.exports = function LocalizationModule(pb) {
if (!Localization.isSupported(locale) || !util.isObject(localizations)) {
return false;
}

util.forEach(localizations, function(item, key) {
Localization.registerLocalization(locale, key, item);
});
Expand Down

0 comments on commit e82af39

Please sign in to comment.