import { ContributionCountElement } from './types/ContributionCountElement'; import { Locale } from './types/Locale'; import { Translations } from './types/Translations'; import { TranslationSpec } from './types/TranslationSpec'; /** A basic UI translator */ export declare class Translator { /** Elements order */ order: ReadonlyArray; private result; constructor(); /** Whether or not the number 0 should be hidden if there are no contributions on the given day */ readonly hideZero: boolean; /** * Register custom translations * @param tr The translations */ registerTranslations(tr: Partial): void; /** * Set a predefined locale * @param locale The locale * @throws {Error} If the locale is unknown */ setLocale(locale: Locale): void; /** * Translate a string * @param key The code/id to translate * @param qty If the translation is countable, the quantity * @returns The translated string * @throws {Error} If the key is unknown */ translate(key: keyof Translations, qty?: number): string; }