Updated fluent

This commit is contained in:
Chi Vinh Le
2018-08-27 14:33:31 +02:00
parent 9cef7044c7
commit d1d993d0b7
8 changed files with 53 additions and 38 deletions
+5 -5
View File
@@ -2,11 +2,11 @@
declare module "*.ftl";
declare module "fluent-react/compat" {
import { MessageContext } from "fluent/compat";
import { FluentBundle } from "fluent/compat";
import { ComponentType } from "react";
export interface LocalizationProviderProps {
messages: MessageContext[];
bundles: FluentBundle[];
}
export const LocalizationProvider: ComponentType<LocalizationProviderProps>;
@@ -30,14 +30,14 @@ declare module "fluent-langneg/compat" {
}
declare module "fluent/compat" {
export interface MessageContextOptions {
export interface FluentBundleOptions {
functions: { [key: string]: (...args: any[]) => string };
useIsolating: boolean;
transform: ((s: string) => string);
}
export class MessageContext {
constructor(locales: string, options?: MessageContext);
export class FluentBundle {
constructor(locales: string, options?: FluentBundleOptions);
public locales: string[];
public readonly messages: Iterator<[string, any]>;
public hasMessage(id: string): boolean;