Skip to content

Commit 8993b58

Browse files
committed
Restore translations
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
1 parent 9197c2d commit 8993b58

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

rollup.config.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,21 @@ const extensions = [...DEFAULT_EXTENSIONS, '.ts', '.tsx']
1212

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

15-
const translations = []
15+
const translations = fs
16+
.readdirSync('./l10n')
17+
.filter(name => name !== 'messages.pot' && name.endsWith('.pot'))
18+
.map(file => {
19+
const path = './l10n/' + file
20+
const locale = file.substr(0, file.length - '.pot'.length)
21+
22+
23+
const po = fs.readFileSync(path)
24+
const json = gettextParser.po.parse(po)
25+
return {
26+
locale,
27+
json,
28+
}
29+
})
1630

1731
export default {
1832
input: 'lib/index.ts',

0 commit comments

Comments
 (0)