alexanderwallin / node-gettext

A JavaScript implementation of gettext, a localization framework.
Other
188 stars 37 forks source link

Typo in JS code in README.md #35

Closed theel0ja closed 7 years ago

theel0ja commented 7 years ago
locales.forEach((locale) => {
    const fileName = `${domain}.po`
    const translationsFilePath = path.join(translationsDir, locale, filename)
    const translationsContent = fs.readSync(translationsFilePath)

    const parsedTranslations = po.parse(translationsContent)
    gt.addTranslations(locale, domain, parsedTranslations)
})

Note the fileName and filename

https://github.com/alexanderwallin/node-gettext#load-and-add-translations-from-mo-or-po-files

alexanderwallin commented 7 years ago

Thanks, @theel0ja! Fixed in https://github.com/alexanderwallin/node-gettext/commit/ad3c835645d480eb1769c045660e2c45c4a35584