[next] i18n short number support (#1992)

* feat: Implement i18n short number

* test: fix failing tests
This commit is contained in:
Kiwi
2018-10-12 23:16:13 +00:00
committed by Wyatt Johnson
parent 3636e47b16
commit c2ffb30431
17 changed files with 235 additions and 55 deletions
@@ -1,4 +1,8 @@
import "fluent-intl-polyfill/compat";
import { FluentBundle } from "fluent/compat";
import * as functions from "talk-framework/lib/i18n/functions";
import fs from "fs";
import path from "path";
@@ -34,7 +38,7 @@ function createFluentBundle(
target: string,
pathToLocale: string
): FluentBundle {
const bundle = new FluentBundle("en-US");
const bundle = new FluentBundle("en-US", { functions });
const files = fs.readdirSync(pathToLocale);
const prefixes = commonPrefixes.concat(target);
files.forEach(f => {