Updated translation support

This commit is contained in:
Andris Reinman 2017-03-07 16:30:56 +02:00
parent b1e8cd68cd
commit d25565b6f8
114 changed files with 42095 additions and 1902 deletions

View file

@ -8,6 +8,7 @@ const fs = require('fs');
const path = require('path');
const log = require('npmlog');
const gettextParser = require('gettext-parser');
const fakelang = require('./fakelang');
const language = config.language || 'en';
@ -31,5 +32,10 @@ module.exports._ = str => {
if (typeof str !== 'string') {
str = String(str);
}
if (language === 'zz') {
return fakelang(str);
}
return gt.dgettext(language, str);
};