Updated translation support
This commit is contained in:
parent
b1e8cd68cd
commit
d25565b6f8
114 changed files with 42095 additions and 1902 deletions
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue