mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-26 22:31:20 +00:00
Adding Catalan to user pref dropdown, moment.js.
This commit is contained in:
parent
3d1a85a3a4
commit
f0051e6d89
1 changed files with 4 additions and 0 deletions
4
ui/src/utils.ts
vendored
4
ui/src/utils.ts
vendored
|
@ -8,6 +8,7 @@ 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 'moment/locale/fi';
|
||||||
|
import 'moment/locale/ca';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
UserOperation,
|
UserOperation,
|
||||||
|
@ -252,6 +253,7 @@ export function debounce(
|
||||||
}
|
}
|
||||||
|
|
||||||
export const languages = [
|
export const languages = [
|
||||||
|
{ code: 'ca', name: 'Català' },
|
||||||
{ code: 'en', name: 'English' },
|
{ code: 'en', name: 'English' },
|
||||||
{ code: 'eo', name: 'Esperanto' },
|
{ code: 'eo', name: 'Esperanto' },
|
||||||
{ code: 'es', name: 'Español' },
|
{ code: 'es', name: 'Español' },
|
||||||
|
@ -302,6 +304,8 @@ export function getMomentLanguage(): string {
|
||||||
lang = 'it';
|
lang = 'it';
|
||||||
} else if (lang.startsWith('fi')) {
|
} else if (lang.startsWith('fi')) {
|
||||||
lang = 'fi';
|
lang = 'fi';
|
||||||
|
} else if (lang.startsWith('ca')) {
|
||||||
|
lang = 'ca';
|
||||||
} else {
|
} else {
|
||||||
lang = 'en';
|
lang = 'en';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue