mirror of
https://github.com/flameshikari/outline-ru.git
synced 2026-06-13 04:05:10 +03:00
update shared files
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
import { locales } from "../utils/date";
|
||||
|
||||
type LanguageOption = {
|
||||
label: string;
|
||||
value: keyof typeof locales;
|
||||
};
|
||||
|
||||
// Note: Updating the available languages? Make sure to also update the
|
||||
// locales array in shared/utils/date.ts to enable translation for timestamps.
|
||||
export const languageOptions = [
|
||||
export const languageOptions: LanguageOption[] = [
|
||||
{
|
||||
label: "Русский (Russian)",
|
||||
value: "ru_RU",
|
||||
|
||||
@@ -191,7 +191,7 @@ const locales = {
|
||||
* @param language The user language
|
||||
* @returns The date-fns locale.
|
||||
*/
|
||||
export function dateLocale(language: string | null | undefined) {
|
||||
export function dateLocale(language: keyof typeof locales | undefined | null) {
|
||||
return language ? locales[language] : undefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user