Some additions for Dutch.

This commit is contained in:
Dessalines 2019-08-29 11:20:21 -07:00
parent b96b3e2995
commit 63d10f0c37
4 changed files with 18 additions and 10 deletions

17
README.md vendored
View file

@ -163,19 +163,20 @@ 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`), Esperanto (`eo`), French (`fr`), Spanish (`es`), Swedish (`sv`), German (`de`), Russian (`ru`). - Languages supported: English (`en`), Chinese (`zh`), Dutch (`nl`), Esperanto (`eo`), French (`fr`), Spanish (`es`), Swedish (`sv`), German (`de`), Russian (`ru`).
### Report ### Report
lang | done | missing lang | done | missing
--- | --- | --- --- | --- | ---
de | 90% | cross_posts,cross_post,users,settings,subscribed,expires,recent_comments,nsfw,show_nsfw,crypto,monero,joined,by,to,transfer_community,transfer_site de | 88% | cross_posts,cross_post,users,number_of_communities,settings,subscribed,expires,recent_comments,nsfw,show_nsfw,crypto,monero,joined,by,to,transfer_community,transfer_site,are_you_sure,yes,no
es | 100% | eo | 98% | number_of_communities,are_you_sure,yes,no
eo | 100% | es | 98% | number_of_communities,are_you_sure,yes,no
fr | 93% | cross_posts,cross_post,users,settings,recent_comments,nsfw,show_nsfw,monero,by,to,transfer_community,transfer_site fr | 91% | cross_posts,cross_post,users,number_of_communities,settings,recent_comments,nsfw,show_nsfw,monero,by,to,transfer_community,transfer_site,are_you_sure,yes,no
ru | 95% | cross_posts,cross_post,recent_comments,monero,by,to,transfer_community,transfer_site nl | 100% |
sv | 93% | cross_posts,cross_post,settings,recent_comments,nsfw,show_nsfw,monero,by,to,transfer_community,transfer_site ru | 93% | cross_posts,cross_post,number_of_communities,recent_comments,monero,by,to,transfer_community,transfer_site,are_you_sure,yes,no
zh | 93% | cross_posts,cross_post,users,settings,recent_comments,nsfw,show_nsfw,monero,by,to,transfer_community,transfer_site sv | 91% | cross_posts,cross_post,number_of_communities,settings,recent_comments,nsfw,show_nsfw,monero,by,to,transfer_community,transfer_site,are_you_sure,yes,no
zh | 91% | cross_posts,cross_post,users,number_of_communities,settings,recent_comments,nsfw,show_nsfw,monero,by,to,transfer_community,transfer_site,are_you_sure,yes,no
## Credits ## Credits

4
ui/src/i18next.ts vendored
View file

@ -4,10 +4,11 @@ import { en } from './translations/en';
import { eo } from './translations/eo'; import { eo } from './translations/eo';
import { es } from './translations/es'; import { es } from './translations/es';
import { de } from './translations/de'; import { de } from './translations/de';
import { zh } from './translations/zh';
import { fr } from './translations/fr'; import { fr } from './translations/fr';
import { sv } from './translations/sv'; import { sv } from './translations/sv';
import { ru } from './translations/ru'; import { ru } from './translations/ru';
import { zh } from './translations/zh';
import { nl } from './translations/nl';
// 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
// TODO don't forget to add moment locales for new languages. // TODO don't forget to add moment locales for new languages.
@ -20,6 +21,7 @@ const resources = {
fr, fr,
sv, sv,
ru, ru,
nl,
} }
function format(value: any, format: any, lng: any) { function format(value: any, format: any, lng: any) {

3
ui/src/utils.ts vendored
View file

@ -5,6 +5,7 @@ import 'moment/locale/zh-cn';
import 'moment/locale/fr'; import 'moment/locale/fr';
import 'moment/locale/sv'; import 'moment/locale/sv';
import 'moment/locale/ru'; import 'moment/locale/ru';
import 'moment/locale/nl';
import { UserOperation, Comment, User, SortType, ListingType } from './interfaces'; import { UserOperation, Comment, User, SortType, ListingType } from './interfaces';
import * as markdown_it from 'markdown-it'; import * as markdown_it from 'markdown-it';
@ -198,6 +199,8 @@ export function getMomentLanguage(): string {
lang = 'es'; lang = 'es';
} else if (lang.startsWith('eo')) { } else if (lang.startsWith('eo')) {
lang = 'eo'; lang = 'eo';
} else if (lang.startsWith('nl')) {
lang = 'nl';
} else { } else {
lang = 'en'; lang = 'en';
} }

View file

@ -6,12 +6,14 @@ import { zh } from './src/translations/zh';
import { fr } from './src/translations/fr'; import { fr } from './src/translations/fr';
import { sv } from './src/translations/sv'; import { sv } from './src/translations/sv';
import { ru } from './src/translations/ru'; import { ru } from './src/translations/ru';
import { nl } from './src/translations/nl';
let files = [ let files = [
{t: de, n: 'de'}, {t: de, n: 'de'},
{t: es, n: 'es'},
{t: eo, n: 'eo'}, {t: eo, n: 'eo'},
{t: es, n: 'es'},
{t: fr, n: 'fr'}, {t: fr, n: 'fr'},
{t: nl, n: 'nl'},
{t: ru, n: 'ru'}, {t: ru, n: 'ru'},
{t: sv, n: 'sv'}, {t: sv, n: 'sv'},
{t: zh, n: 'zh'}, {t: zh, n: 'zh'},