From: Matteo Guglielmetti Date: Mon, 21 Oct 2019 06:50:38 +0000 (+0200) Subject: Merge branch 'master' into master X-Git-Url: http://these/git/%22https:/nerdica.net/%7B%24%7B%60data:application/static/%24%7B%60data:application/%7BallRss%7D?a=commitdiff_plain;h=bab917f1be72a06451c5e0ea204477fd84b53d93;p=lemmy.git Merge branch 'master' into master --- bab917f1be72a06451c5e0ea204477fd84b53d93 diff --cc ui/src/i18next.ts index c45270fe,bfe720ff..a2d743b1 --- a/ui/src/i18next.ts +++ b/ui/src/i18next.ts @@@ -9,10 -9,8 +9,9 @@@ import { sv } from './translations/sv' import { ru } from './translations/ru'; import { zh } from './translations/zh'; import { nl } from './translations/nl'; +import { it } from './translations/it'; // https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66 - // TODO don't forget to add moment locales for new languages. const resources = { en, eo, @@@ -23,27 -21,24 +22,25 @@@ sv, ru, nl, + it, - } + }; function format(value: any, format: any, lng: any) { - if (format === 'uppercase') return value.toUpperCase(); - return value; + if (format === 'uppercase') return value.toUpperCase(); + return value; } - i18n - .init({ - debug: true, + i18n.init({ + debug: false, // load: 'languageOnly', // initImmediate: false, lng: getLanguage(), fallbackLng: 'en', - resources, - interpolation: { - format: format - + resources, + interpolation: { + format: format, - }, + } }); export { i18n, resources }; diff --cc ui/src/utils.ts index 4fec23f0,867ff91e..b6e4aafa --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@@ -6,9 -6,15 +6,16 @@@ import 'moment/locale/fr' import 'moment/locale/sv'; import 'moment/locale/ru'; import 'moment/locale/nl'; +import 'moment/locale/it'; - import { UserOperation, Comment, User, SortType, ListingType, SearchType } from './interfaces'; + import { + UserOperation, + Comment, + User, + SortType, + ListingType, + SearchType, + } from './interfaces'; import * as markdown_it from 'markdown-it'; import * as markdownitEmoji from 'markdown-it-emoji/light'; import * as markdown_it_container from 'markdown-it-container';