Files
Signal-Desktop/ts/types/I18N.ts
2020-11-04 13:03:13 -06:00

22 lines
426 B
TypeScript

// Copyright 2020 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
export type LocaleMessagesType = {
[key: string]: {
message: string;
description?: string;
};
};
export type ReplacementValuesType<T> = {
[key: string]: T;
};
export type LocaleType = {
i18n: (
key: string,
placeholders: Array<string> | ReplacementValuesType<string>
) => string;
messages: LocaleMessagesType;
};