1
0
mirror of https://github.com/flarum/core.git synced 2025-08-06 08:27:42 +02:00

Bundled output for commit d041515e19

Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
This commit is contained in:
flarum-bot
2024-10-23 10:13:32 +00:00
parent d041515e19
commit ea9b059f70
8 changed files with 23 additions and 7 deletions

View File

@@ -1,12 +1,19 @@
import type { Dayjs } from 'dayjs';
import { RichMessageFormatter, NestedStringArray } from '@askvortsov/rich-icu-message-formatter';
import { pluralTypeHandler, selectTypeHandler } from '@ultraq/icu-message-formatter';
import ItemList from './utils/ItemList';
type Translations = Record<string, string>;
type TranslatorParameters = Record<string, unknown>;
type DateTimeFormatCallback = (id?: string) => string | void;
export default class Translator {
/**
* A map of translation keys to their translated values.
*/
translations: Translations;
/**
* A item list of date time format callbacks.
*/
dateTimeFormats: ItemList<DateTimeFormatCallback>;
/**
* The underlying ICU MessageFormatter util.
*/
@@ -39,5 +46,14 @@ export default class Translator {
trans(id: string, parameters: TranslatorParameters, extract: false): NestedStringArray;
trans(id: string, parameters: TranslatorParameters, extract: true): string;
trans(id: string): NestedStringArray | string;
/**
* Formats the time.
*
* The format of the time will be chosen by the following order:
* - Custom format defined in the item list.
* - The format defined in current locale.
* - DayJS default format.
*/
formatDateTime(time: Dayjs, id: string): string;
}
export {};

View File

@@ -1,5 +1,5 @@
/**
* The `liveHumanTimes` initializer sets up a loop every 1 second to update
* The `liveHumanTimes` initializer sets up a loop every 10 seconds to update
* timestamps rendered with the `humanTime` helper.
*/
export default function liveHumanTimes(): void;

2
framework/core/js/dist/admin.js generated vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
framework/core/js/dist/forum.js generated vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long