Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dutch language #48

Merged
merged 5 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notificationapi-js-client-sdk",
"version": "4.6.3",
"version": "4.7.0",
"description": "NotificationAPI client-side library for JavaScript",
"keywords": [
"notificationapi",
Expand Down
28 changes: 28 additions & 0 deletions src/assets/i18n/nl-NL.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"no_more_notifications": "Geen notificaties meer om in te laden",
"notifications": "Notificaties",
"notification_settings": "Notificatie instellingen",
"mark_all_as_read": "Markeer alles als gelezen",
"no_notifications": "Je hebt geen notificaties!",
"notification_preferences": "Notificatie voorkeuren",
"click_here": "Klik hier",
"necessary_permissions_push_notifications": "Om ons de nodige browser rechten te geven om push notificaties te ontvangen.",
"do_you_want_to_receive_push_notifications": "Wil je push notificaties ontvangen?",
"yes": "Ja",
"no_thanks": "Nee, bedankt",
"expand": "uitklappen",
"there_are_no_notifications_to_configure": "Er zijn geen notificaties om in te stellen",
"mark_as_read": "Markeer als gelezen",
"ago": "geleden",
"year": "jaar",
"years": "jaren",
"month": "maand",
"months": "maanden",
"day": "dag",
"days": "dagen",
"hour": "uur",
"hours": "uren",
"minute": "minuut",
"minutes": "minuten",
"just_now": "zojuist"
}
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import esES from './assets/i18n/es-ES.json';
import frFR from './assets/i18n/fr-FR.json';
import itIT from './assets/i18n/it-IT.json';
import nlNL from './assets/i18n/nl-NL.json';
import ptBR from './assets/i18n/pt-BR.json';

const defaultRestAPIUrl = 'https://api.notificationapi.com';
Expand All @@ -36,6 +37,7 @@
'es-ES',
'fr-FR',
'it-IT',
'nl-NL',
'pt-BR'
];
const supportedLanguagesFile: {
Expand All @@ -45,6 +47,7 @@
'es-ES': esES,
'fr-FR': frFR,
'it-IT': itIT,
'nl-NL': nlNL,
'pt-BR': ptBR
};
const PAGE_SIZE = 5;
Expand Down Expand Up @@ -165,8 +168,8 @@
};
const translationsObject: TranslationObject =
supportedLanguages.reduce<TranslationObject>((acc, language) => {
acc[language] = {

Check warning on line 171 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test & Build

Generic Object Injection Sink
translation: supportedLanguagesFile[language]

Check warning on line 172 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test & Build

Generic Object Injection Sink
};
return acc;
}, {} as TranslationObject);
Expand Down
1 change: 1 addition & 0 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export type SupportedLanguages =
| 'es-ES'
| 'fr-FR'
| 'it-IT'
| 'nl-NL'
| 'pt-BR';

export type TranslationObject = {
Expand Down
Loading