Skip to content

Commit

Permalink
add dutch πŸ‡³πŸ‡± (#384)
Browse files Browse the repository at this point in the history
* add dutch πŸ‡³πŸ‡±

* update dutch types from spec

* remove stopgap, fix test
  • Loading branch information
joshreisner authored May 19, 2024
1 parent 07f9ded commit 3b54d89
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 17 deletions.
2 changes: 2 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable no-unused-vars */

type Translation = import('./src/types/Translation').Translation;
type Lang = import('@code4recovery/spec').Language;

Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tsml-ui",
"version": "1.7.15",
"version": "1.7.16",
"private": false,
"license": "MIT",
"scripts": {
Expand Down Expand Up @@ -41,7 +41,7 @@
"typescript": "^5.3.3"
},
"dependencies": {
"@code4recovery/spec": "1.0.6",
"@code4recovery/spec": "1.0.7",
"@emotion/react": "^11.11.1",
"deepmerge": "^4.3.1",
"luxon": "^3.3.0",
Expand Down
4 changes: 2 additions & 2 deletions public/app.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/helpers/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createContext, useContext } from 'react';
import merge from 'deepmerge';
import { Settings } from 'luxon';

import { en, es, fr, ja, sv, sk } from '../i18n';
import { en, es, fr, ja, nl, sk, sv } from '../i18n';

// override these on your page with tsml_react_config
export const defaults: TSMLReactConfig = {
Expand Down Expand Up @@ -78,8 +78,9 @@ export const defaults: TSMLReactConfig = {
es,
fr,
ja,
sv,
nl,
sk,
sv,
},
times: ['morning', 'midday', 'evening', 'night'],
weekdays: [
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ export * from './en';
export * from './es';
export * from './fr';
export * from './ja';
export * from './sv';
export * from './nl';
export * from './sk';
export * from './sv';
90 changes: 90 additions & 0 deletions src/i18n/nl.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
import { getTypesForLanguage } from '@code4recovery/spec';

export const nl = {
add_to_calendar: 'Toevoegen aan agenda',
address: 'Addres',
appointment: 'Afspraak',
back_to_meetings: 'Terug naar Meetings',
contact_call: 'Bel %contact%',
contact_email: 'E-mail %contact%',
contribute_with: 'Bijdragen aan %service%',
days: {
friday: 'Vrijdag',
monday: 'Maandag',
saturday: 'Zaterdag',
sunday: 'Zondag',
thursday: 'Donderdag',
tuesday: 'Dinsdag',
wednesday: 'Woensdag',
},
distance: 'Afstand',
distance_any: 'Elke Afstand',
distance_km: '%distance% km',
distance_mi: '%distance% mi',
email_edit_url: 'Wijzig URL: %url%',
email_public_url: 'Publieke URL: %url%',
email_subject: 'Meeting Feedback: %name%',
evening: 'Avond',
feedback: 'Update Meeting Info',
get_directions: 'Krijg Routebeschrijving',
in_progress_single: '1 meeting bezig',
in_progress_multiple: '%count% meetings bezig',
km: 'km',
location: 'Locatie',
location_group: 'Locatie / Groep',
match_single: '1 resultaat',
match_multiple: '%count% resultaten',
meeting_information: 'Meeting Informatie',
meetings: 'Meetings',
mi: 'mi',
midday: 'Middag',
'modes': {
location: 'Vlakbij Locatie',
me: 'Vlakbij Me',
search: 'Zoeken',
},
morning: 'Ochtend',
name: 'Naam',
no_results:
'Er zijn geen meetings gevonden die aan de geselecteerde criteria voldoen.',
not_found: 'Meeting niet gevonden.',
night: 'Nacht',
phone: 'Telefoon',
region: 'Plaats',
region_any: 'Overal',
remove: 'Verwijder %filter%',
seventh_tradition: 'Zevende Traditie',
share: 'Deel',
time: 'Tijd',
time_any: 'Elke Tijd',
title: {
weekday: '%weekday%',
time: '%time%',
type: '%type%',
meetings: '%meetings%',
region: 'in %region%',
search_with: 'met %search%',
search_near: 'vlakbij %search%',
distance: 'binnen %distance%',
},
type_any: 'Elk Type',
type_descriptions: {
C: 'Besloten vergaderingen zijn voor A.A. alleen voor leden, of voor degenen die een drankprobleem hebben en β€˜het verlangen hebben om te stoppen met drinken’.',
O: 'Er zijn open bijeenkomsten beschikbaar voor iedereen die geΓ―nteresseerd is in het herstelprogramma van de Anonieme Alcoholisten van alcoholisme. Niet-alcoholisten kunnen als waarnemer open bijeenkomsten bijwonen.',
},
types: {
...getTypesForLanguage('nl'),
active: 'Actief',
inactive: 'Inactief',
'in-person': 'Fysiek',
online: 'Online',
SPD: 'Spreker/Discussie',
},
unnamed_meeting: 'Naamloze meeting',
updated: 'Bijgewerkt %updated%',
views: {
table: 'Lijst',
map: 'Kaart',
},
weekday_any: 'Elke Dag',
};
8 changes: 4 additions & 4 deletions test/__tests__/Controls.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe('<Controls />', () => {
fireEvent.click(locationLink);

//expect stateful thing to happen
expect(mockSetState).toBeCalledTimes(1);
expect(mockSetState).toHaveBeenCalledTimes(1);

jest.runAllTimers();
});
Expand All @@ -98,7 +98,7 @@ describe('<Controls />', () => {
fireEvent.submit(form);
}

expect(mockSetState).toBeCalledTimes(2);
expect(mockSetState).toHaveBeenCalledTimes(2);

jest.runAllTimers();
});
Expand Down Expand Up @@ -137,9 +137,9 @@ describe('<Controls />', () => {
fireEvent.click(button);

//toggle map button
const mapButton = screen.getByLabelText(views.map);
const mapButton = screen.getByText(views.map);
fireEvent.click(mapButton);

expect(mockSetState).toBeCalledTimes(4);
expect(mockSetState).toHaveBeenCalledTimes(4);
});
});

0 comments on commit 3b54d89

Please sign in to comment.