mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-25 23:43:18 +00:00
Adding finnish to moment, dropdown.
This commit is contained in:
parent
6f8e174d19
commit
fc0495894d
2
README.md
vendored
2
README.md
vendored
|
@ -161,7 +161,7 @@ Lemmy is free, open-source software, meaning no advertising, monetizing, or vent
|
||||||
|
|
||||||
If you'd like to add translations, take a look a look at the [English translation file](ui/src/translations/en.ts).
|
If you'd like to add translations, take a look a look at the [English translation file](ui/src/translations/en.ts).
|
||||||
|
|
||||||
- Languages supported: English (`en`), Chinese (`zh`), Dutch (`nl`), Esperanto (`eo`), French (`fr`), Spanish (`es`), Swedish (`sv`), German (`de`), Russian (`ru`), Italian (`it`).
|
- Languages supported: English (`en`), Chinese (`zh`), Dutch (`nl`), Esperanto (`eo`), Finnish (`fi`), French (`fr`), Spanish (`es`), Swedish (`sv`), German (`de`), Russian (`ru`), Italian (`it`).
|
||||||
|
|
||||||
<!-- translations -->
|
<!-- translations -->
|
||||||
|
|
||||||
|
|
2
ui/src/i18next.ts
vendored
2
ui/src/i18next.ts
vendored
|
@ -10,6 +10,7 @@ import { ru } from './translations/ru';
|
||||||
import { zh } from './translations/zh';
|
import { zh } from './translations/zh';
|
||||||
import { nl } from './translations/nl';
|
import { nl } from './translations/nl';
|
||||||
import { it } from './translations/it';
|
import { it } from './translations/it';
|
||||||
|
import { fi } from './translations/fi';
|
||||||
|
|
||||||
// https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66
|
// https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66
|
||||||
const resources = {
|
const resources = {
|
||||||
|
@ -23,6 +24,7 @@ const resources = {
|
||||||
ru,
|
ru,
|
||||||
nl,
|
nl,
|
||||||
it,
|
it,
|
||||||
|
fi,
|
||||||
};
|
};
|
||||||
|
|
||||||
function format(value: any, format: any, lng: any) {
|
function format(value: any, format: any, lng: any) {
|
||||||
|
|
4
ui/src/utils.ts
vendored
4
ui/src/utils.ts
vendored
|
@ -7,6 +7,7 @@ import 'moment/locale/sv';
|
||||||
import 'moment/locale/ru';
|
import 'moment/locale/ru';
|
||||||
import 'moment/locale/nl';
|
import 'moment/locale/nl';
|
||||||
import 'moment/locale/it';
|
import 'moment/locale/it';
|
||||||
|
import 'moment/locale/fi';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
UserOperation,
|
UserOperation,
|
||||||
|
@ -256,6 +257,7 @@ export const languages = [
|
||||||
{ code: 'es', name: 'Español' },
|
{ code: 'es', name: 'Español' },
|
||||||
{ code: 'de', name: 'Deutsch' },
|
{ code: 'de', name: 'Deutsch' },
|
||||||
{ code: 'zh', name: '中文' },
|
{ code: 'zh', name: '中文' },
|
||||||
|
{ code: 'fi', name: 'Suomi' },
|
||||||
{ code: 'fr', name: 'Français' },
|
{ code: 'fr', name: 'Français' },
|
||||||
{ code: 'sv', name: 'Svenska' },
|
{ code: 'sv', name: 'Svenska' },
|
||||||
{ code: 'ru', name: 'Русский' },
|
{ code: 'ru', name: 'Русский' },
|
||||||
|
@ -298,6 +300,8 @@ export function getMomentLanguage(): string {
|
||||||
lang = 'nl';
|
lang = 'nl';
|
||||||
} else if (lang.startsWith('it')) {
|
} else if (lang.startsWith('it')) {
|
||||||
lang = 'it';
|
lang = 'it';
|
||||||
|
} else if (lang.startsWith('fi')) {
|
||||||
|
lang = 'fi';
|
||||||
} else {
|
} else {
|
||||||
lang = 'en';
|
lang = 'en';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue