Skip to content

Commit d1f4773

Browse files
committed
chore(release): prepare release 4.0.2
1 parent fa4df44 commit d1f4773

3 files changed

Lines changed: 182 additions & 3 deletions

File tree

dist/aurelia-i18n.d.ts

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
// Generated by dts-bundle-generator v6.11.0
2+
3+
import { Container } from 'aurelia-dependency-injection';
4+
import { EventAggregator } from 'aurelia-event-aggregator';
5+
import { FrameworkConfiguration } from 'aurelia-framework';
6+
import { Loader } from 'aurelia-loader';
7+
import { BindingSignaler, SignalBindingBehavior } from 'aurelia-templating-resources';
8+
import { InitOptions, Module, TFunction, TOptions, i18n } from 'i18next';
9+
10+
export interface AureliaEnhancedOptions extends InitOptions {
11+
attributes?: string[];
12+
skipTranslationOnMissingKey?: boolean;
13+
}
14+
export interface AureliaEnhancedI18Next extends i18n {
15+
options: AureliaEnhancedOptions;
16+
}
17+
export interface I18NEventPayload {
18+
oldValue: string;
19+
newValue: string;
20+
}
21+
export declare const I18N_EA_SIGNAL = "i18n:locale:changed";
22+
export declare class I18N {
23+
private ea;
24+
private signaler;
25+
static inject(): (typeof EventAggregator | typeof BindingSignaler)[];
26+
i18nextDeferred: Promise<AureliaEnhancedI18Next>;
27+
i18next: AureliaEnhancedI18Next;
28+
Intl: typeof Intl;
29+
private globalVars;
30+
constructor(ea: EventAggregator, signaler: BindingSignaler);
31+
setup(options?: AureliaEnhancedOptions & InitOptions): Promise<AureliaEnhancedI18Next>;
32+
i18nextReady(): Promise<AureliaEnhancedI18Next>;
33+
setLocale(locale: string): Promise<TFunction>;
34+
getLocale(): string;
35+
nf(options?: Intl.NumberFormatOptions, locales?: string | string[]): Intl.NumberFormat;
36+
uf(numberLike: string, locale?: string): number;
37+
df(options?: Intl.DateTimeFormatOptions, locales?: string | string[]): Intl.DateTimeFormat;
38+
tr<TResult extends string | object | Array<string | object> | undefined = string>(key: string | string[], options?: TOptions<object>): TResult;
39+
registerGlobalVariable(key: string, value: any): void;
40+
unregisterGlobalVariable(key: string): void;
41+
/**
42+
* Scans an element for children that have a translation attribute and
43+
* updates their innerHTML with the current translation values.
44+
*
45+
* If an image is encountered the translated value will be applied to the src attribute.
46+
*
47+
* @param el HTMLElement to search within
48+
*/
49+
updateTranslations(el: HTMLElement): void;
50+
updateValue(node: Element & {
51+
au: any;
52+
}, value: string, params: any): void;
53+
}
54+
export declare class RelativeTime {
55+
private service;
56+
private ea;
57+
static inject(): (typeof EventAggregator | typeof I18N)[];
58+
constructor(service: I18N, ea: EventAggregator);
59+
setup(locales?: {
60+
oldValue: string;
61+
newValue: string;
62+
}): void;
63+
addTranslationResource(key: string, translation: any): void;
64+
getRelativeTime(time: Date): string;
65+
getTimeDiffDescription(diff: number, unit: "year" | "month" | "day" | "hour" | "minute" | "second", timeDivisor: number): string | null;
66+
}
67+
export declare type LoadPathOption = string | ((lngs: string[], namespaces: string[]) => string);
68+
export declare type LoadCallback = (error: any, result: string | false | undefined) => void;
69+
export interface AureliaBackendOptions {
70+
loadPath?: LoadPathOption;
71+
parse?(data: string, url: string): string;
72+
}
73+
export declare class Backend implements Module {
74+
services: any;
75+
options: AureliaBackendOptions;
76+
static type: "backend";
77+
static loader: Loader;
78+
static with(loader: Loader): typeof Backend;
79+
type: "backend";
80+
constructor(services: any, options?: AureliaBackendOptions);
81+
init(services: any, options?: AureliaBackendOptions): void;
82+
readMulti(languages: string[], namespaces: string[], callback: LoadCallback): void;
83+
read(language: string, namespace: string, callback: LoadCallback): void;
84+
loadUrl(url: string, callback: LoadCallback): Promise<void>;
85+
create(_languages: string | string[], _namespace: string, _key: string, _fallbackValue: string): void;
86+
}
87+
export declare class DfBindingBehavior {
88+
private signalBindingBehavior;
89+
static inject(): (typeof SignalBindingBehavior)[];
90+
constructor(signalBindingBehavior: SignalBindingBehavior);
91+
bind(binding: any, source: any): void;
92+
unbind(binding: any, source: any): void;
93+
}
94+
export declare class DfValueConverter {
95+
private service;
96+
static inject(): (typeof I18N)[];
97+
constructor(service: I18N);
98+
toView(value: any, dfOrOptions?: Intl.DateTimeFormat | Intl.DateTimeFormatOptions, locale?: string): any;
99+
}
100+
export declare class NfBindingBehavior {
101+
private signalBindingBehavior;
102+
static inject(): (typeof SignalBindingBehavior)[];
103+
constructor(signalBindingBehavior: SignalBindingBehavior);
104+
bind(binding: any, source: any): void;
105+
unbind(binding: any, source: any): void;
106+
}
107+
export declare class NfValueConverter {
108+
private service;
109+
static inject(): (typeof I18N)[];
110+
constructor(service: I18N);
111+
toView(value: any, nfOrOptions?: Intl.NumberFormat | Intl.NumberFormatOptions, locale?: string): any;
112+
}
113+
export declare class RtBindingBehavior {
114+
private signalBindingBehavior;
115+
static inject(): (typeof SignalBindingBehavior)[];
116+
constructor(signalBindingBehavior: SignalBindingBehavior);
117+
bind(binding: any, source: any): void;
118+
unbind(binding: any, source: any): void;
119+
}
120+
export declare class RtValueConverter {
121+
private service;
122+
static inject(): (typeof RelativeTime)[];
123+
constructor(service: RelativeTime);
124+
toView(value: any): any;
125+
}
126+
export declare class TBindingBehavior {
127+
private signalBindingBehavior;
128+
static inject(): (typeof SignalBindingBehavior)[];
129+
constructor(signalBindingBehavior: SignalBindingBehavior);
130+
bind(binding: any, source: any): void;
131+
unbind(binding: any, source: any): void;
132+
}
133+
declare class LazyOptional {
134+
private key;
135+
static of(key: any): LazyOptional;
136+
constructor(key: string);
137+
get(container: Container): () => any;
138+
}
139+
export declare class TCustomAttribute {
140+
private element;
141+
private service;
142+
private ea;
143+
static inject(): ({
144+
new (): Element;
145+
prototype: Element;
146+
} | typeof EventAggregator | typeof I18N | LazyOptional)[];
147+
static configureAliases(aliases: string[]): void;
148+
private params;
149+
private lazyParams;
150+
private subscription;
151+
private value;
152+
constructor(element: Element & {
153+
au: any;
154+
}, service: I18N, ea: EventAggregator, p: any);
155+
bind(): void;
156+
paramsChanged(newValue: any, newParams: any): void;
157+
valueChanged(newValue: any): void;
158+
unbind(): void;
159+
}
160+
export declare class TParamsCustomAttribute {
161+
element: Element;
162+
static inject(): {
163+
new (): Element;
164+
prototype: Element;
165+
}[];
166+
static configureAliases(aliases: string[]): void;
167+
service: any;
168+
constructor(element: Element);
169+
valueChanged(): void;
170+
}
171+
export declare class TValueConverter {
172+
private service;
173+
static inject(): (typeof I18N)[];
174+
constructor(service: I18N);
175+
toView(value: any, options?: TOptions<object>): string;
176+
}
177+
export declare function configure(frameworkConfig: FrameworkConfiguration, cb: (instance: I18N) => AureliaEnhancedI18Next): AureliaEnhancedI18Next;
178+
179+
export {};

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aurelia-i18n",
3-
"version": "4.0.1",
3+
"version": "4.0.2",
44
"description": "A plugin that provides i18n support.",
55
"keywords": [
66
"aurelia",

0 commit comments

Comments
 (0)