Skip to content

Commit

Permalink
Restore translations
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
  • Loading branch information
skjnldsv committed Aug 17, 2020
1 parent 9197c2d commit 8993b58
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,21 @@ const extensions = [...DEFAULT_EXTENSIONS, '.ts', '.tsx']

const packageJson = require("./package.json");

const translations = []
const translations = fs
.readdirSync('./l10n')
.filter(name => name !== 'messages.pot' && name.endsWith('.pot'))
.map(file => {
const path = './l10n/' + file
const locale = file.substr(0, file.length - '.pot'.length)


const po = fs.readFileSync(path)
const json = gettextParser.po.parse(po)
return {
locale,
json,
}
})

export default {
input: 'lib/index.ts',
Expand Down

0 comments on commit 8993b58

Please sign in to comment.