feat(lang): add support for dutch language

pull/228/head
sct 4 years ago
parent 8d8e750982
commit df94db050b

@ -9,7 +9,7 @@
"build": "yarn build:next && yarn build:server",
"lint": "eslint \"./server/**/*.{ts,tsx}\" \"./src/**/*.{ts,tsx}\"",
"start": "NODE_ENV=production node dist/index.js",
"i18n:extract": "extract-messages -l=en,ja,fr,nb_NO,de,ru -o src/i18n/locale -d en --flat true --overwriteDefault false './src/**/!(*.test).{ts,tsx}'",
"i18n:extract": "extract-messages -l=en,ja,fr,nb_NO,de,ru,nl -o src/i18n/locale -d en --flat true --overwriteDefault false './src/**/!(*.test).{ts,tsx}'",
"migration:generate": "ts-node --project server/tsconfig.json ./node_modules/.bin/typeorm migration:generate",
"migration:run": "ts-node --project server/tsconfig.json ./node_modules/.bin/typeorm migration:run",
"format": "prettier --write ."

@ -41,6 +41,10 @@ const availableLanguages: AvailableLanguageObject = {
code: 'ru',
display: 'Russian',
},
nl: {
code: 'nl',
display: 'Nederlands',
},
};
const LanguagePicker: React.FC = () => {

@ -1,6 +1,13 @@
import React, { ReactNode } from 'react';
export type AvailableLocales = 'en' | 'ja' | 'fr' | 'nb-NO' | 'de' | 'ru';
export type AvailableLocales =
| 'en'
| 'ja'
| 'fr'
| 'nb-NO'
| 'de'
| 'ru'
| 'nl';
interface LanguageContextProps {
locale: AvailableLocales;

@ -0,0 +1,303 @@
{
"components.Discover.discovermovies": "",
"components.Discover.discovertv": "",
"components.Discover.nopending": "",
"components.Discover.popularmovies": "",
"components.Discover.populartv": "",
"components.Discover.recentlyAdded": "",
"components.Discover.recentrequests": "",
"components.Discover.trending": "",
"components.Discover.upcoming": "",
"components.Discover.upcomingmovies": "",
"components.Layout.LanguagePicker.changelanguage": "",
"components.Layout.SearchInput.searchPlaceholder": "",
"components.Layout.Sidebar.dashboard": "",
"components.Layout.Sidebar.requests": "",
"components.Layout.Sidebar.settings": "",
"components.Layout.Sidebar.users": "",
"components.Layout.UserDropdown.signout": "",
"components.Layout.alphawarning": "",
"components.Login.signinplex": "",
"components.MovieDetails.approve": "",
"components.MovieDetails.available": "",
"components.MovieDetails.budget": "",
"components.MovieDetails.cancelrequest": "",
"components.MovieDetails.cast": "",
"components.MovieDetails.decline": "",
"components.MovieDetails.manageModalClearMedia": "",
"components.MovieDetails.manageModalClearMediaWarning": "",
"components.MovieDetails.manageModalNoRequests": "",
"components.MovieDetails.manageModalRequests": "",
"components.MovieDetails.manageModalTitle": "",
"components.MovieDetails.originallanguage": "",
"components.MovieDetails.overview": "",
"components.MovieDetails.overviewunavailable": "",
"components.MovieDetails.pending": "",
"components.MovieDetails.recommendations": "",
"components.MovieDetails.recommendationssubtext": "",
"components.MovieDetails.releasedate": "",
"components.MovieDetails.request": "",
"components.MovieDetails.revenue": "",
"components.MovieDetails.runtime": "",
"components.MovieDetails.similar": "",
"components.MovieDetails.similarsubtext": "",
"components.MovieDetails.status": "",
"components.MovieDetails.unavailable": "",
"components.MovieDetails.userrating": "",
"components.MovieDetails.viewrequest": "",
"components.PlexLoginButton.loading": "",
"components.PlexLoginButton.loggingin": "",
"components.PlexLoginButton.loginwithplex": "",
"components.RequestBlock.seasons": "",
"components.RequestCard.all": "",
"components.RequestCard.requestedby": "",
"components.RequestCard.seasons": "",
"components.RequestList.RequestItem.notavailable": "",
"components.RequestList.RequestItem.requestedby": "",
"components.RequestList.RequestItem.seasons": "",
"components.RequestList.mediaInfo": "",
"components.RequestList.modifiedBy": "",
"components.RequestList.next": "",
"components.RequestList.previous": "",
"components.RequestList.requestedAt": "",
"components.RequestList.requests": "",
"components.RequestList.showingresults": "",
"components.RequestList.status": "",
"components.RequestModal.cancel": "",
"components.RequestModal.cancelling": "",
"components.RequestModal.cancelrequest": "",
"components.RequestModal.close": "",
"components.RequestModal.extras": "",
"components.RequestModal.notrequested": "",
"components.RequestModal.numberofepisodes": "",
"components.RequestModal.pendingrequest": "",
"components.RequestModal.request": "",
"components.RequestModal.requestCancel": "",
"components.RequestModal.requestSuccess": "",
"components.RequestModal.requestadmin": "",
"components.RequestModal.requestfrom": "",
"components.RequestModal.requesting": "",
"components.RequestModal.requestseasons": "",
"components.RequestModal.requesttitle": "",
"components.RequestModal.season": "",
"components.RequestModal.seasonnumber": "",
"components.RequestModal.selectseason": "",
"components.RequestModal.status": "",
"components.Search.searchresults": "",
"components.Settings.Notifications.agentenabled": "",
"components.Settings.Notifications.authPass": "",
"components.Settings.Notifications.authUser": "",
"components.Settings.Notifications.emailsender": "",
"components.Settings.Notifications.enableSsl": "",
"components.Settings.Notifications.save": "",
"components.Settings.Notifications.saving": "",
"components.Settings.Notifications.smtpHost": "",
"components.Settings.Notifications.smtpPort": "",
"components.Settings.Notifications.validationFromRequired": "",
"components.Settings.Notifications.validationSmtpHostRequired": "",
"components.Settings.Notifications.validationSmtpPortRequired": "",
"components.Settings.Notifications.validationWebhookUrlRequired": "",
"components.Settings.Notifications.webhookUrl": "",
"components.Settings.Notifications.webhookUrlPlaceholder": "",
"components.Settings.RadarrModal.add": "",
"components.Settings.RadarrModal.apiKey": "",
"components.Settings.RadarrModal.apiKeyPlaceholder": "",
"components.Settings.RadarrModal.baseUrl": "",
"components.Settings.RadarrModal.baseUrlPlaceholder": "",
"components.Settings.RadarrModal.createradarr": "",
"components.Settings.RadarrModal.defaultserver": "",
"components.Settings.RadarrModal.editradarr": "",
"components.Settings.RadarrModal.hostname": "",
"components.Settings.RadarrModal.minimumAvailability": "",
"components.Settings.RadarrModal.port": "",
"components.Settings.RadarrModal.qualityprofile": "",
"components.Settings.RadarrModal.rootfolder": "",
"components.Settings.RadarrModal.save": "",
"components.Settings.RadarrModal.saving": "",
"components.Settings.RadarrModal.selectMinimumAvailability": "",
"components.Settings.RadarrModal.selectQualityProfile": "",
"components.Settings.RadarrModal.selectRootFolder": "",
"components.Settings.RadarrModal.server4k": "",
"components.Settings.RadarrModal.servername": "",
"components.Settings.RadarrModal.servernamePlaceholder": "",
"components.Settings.RadarrModal.ssl": "",
"components.Settings.RadarrModal.test": "",
"components.Settings.RadarrModal.testing": "",
"components.Settings.RadarrModal.toastRadarrTestFailure": "",
"components.Settings.RadarrModal.toastRadarrTestSuccess": "",
"components.Settings.RadarrModal.validationApiKeyRequired": "",
"components.Settings.RadarrModal.validationHostnameRequired": "",
"components.Settings.RadarrModal.validationPortRequired": "",
"components.Settings.RadarrModal.validationProfileRequired": "",
"components.Settings.RadarrModal.validationRootFolderRequired": "",
"components.Settings.SonarrModal.add": "",
"components.Settings.SonarrModal.apiKey": "",
"components.Settings.SonarrModal.apiKeyPlaceholder": "",
"components.Settings.SonarrModal.baseUrl": "",
"components.Settings.SonarrModal.baseUrlPlaceholder": "",
"components.Settings.SonarrModal.createsonarr": "",
"components.Settings.SonarrModal.defaultserver": "",
"components.Settings.SonarrModal.editsonarr": "",
"components.Settings.SonarrModal.hostname": "",
"components.Settings.SonarrModal.port": "",
"components.Settings.SonarrModal.qualityprofile": "",
"components.Settings.SonarrModal.rootfolder": "",
"components.Settings.SonarrModal.save": "",
"components.Settings.SonarrModal.saving": "",
"components.Settings.SonarrModal.seasonfolders": "",
"components.Settings.SonarrModal.selectQualityProfile": "",
"components.Settings.SonarrModal.selectRootFolder": "",
"components.Settings.SonarrModal.server4k": "",
"components.Settings.SonarrModal.servername": "",
"components.Settings.SonarrModal.servernamePlaceholder": "",
"components.Settings.SonarrModal.ssl": "",
"components.Settings.SonarrModal.test": "",
"components.Settings.SonarrModal.testing": "",
"components.Settings.SonarrModal.toastRadarrTestFailure": "",
"components.Settings.SonarrModal.toastRadarrTestSuccess": "",
"components.Settings.SonarrModal.validationApiKeyRequired": "",
"components.Settings.SonarrModal.validationHostnameRequired": "",
"components.Settings.SonarrModal.validationPortRequired": "",
"components.Settings.SonarrModal.validationProfileRequired": "",
"components.Settings.SonarrModal.validationRootFolderRequired": "",
"components.Settings.activeProfile": "",
"components.Settings.addradarr": "",
"components.Settings.address": "",
"components.Settings.addsonarr": "",
"components.Settings.apikey": "",
"components.Settings.applicationurl": "",
"components.Settings.cancelscan": "",
"components.Settings.copied": "",
"components.Settings.currentlibrary": "",
"components.Settings.default": "",
"components.Settings.default4k": "",
"components.Settings.delete": "",
"components.Settings.deleteserverconfirm": "",
"components.Settings.edit": "",
"components.Settings.generalsettings": "",
"components.Settings.generalsettingsDescription": "",
"components.Settings.hostname": "",
"components.Settings.jobname": "",
"components.Settings.librariesRemaining": "",
"components.Settings.manualscan": "",
"components.Settings.manualscanDescription": "",
"components.Settings.menuAbout": "",
"components.Settings.menuGeneralSettings": "",
"components.Settings.menuJobs": "",
"components.Settings.menuLogs": "",
"components.Settings.menuNotifications": "",
"components.Settings.menuPlexSettings": "",
"components.Settings.menuServices": "",
"components.Settings.nextexecution": "",
"components.Settings.notificationsettings": "",
"components.Settings.notificationsettingsDescription": "",
"components.Settings.notrunning": "",
"components.Settings.plexlibraries": "",
"components.Settings.plexlibrariesDescription": "",
"components.Settings.plexsettings": "",
"components.Settings.plexsettingsDescription": "",
"components.Settings.port": "",
"components.Settings.radarrSettingsDescription": "",
"components.Settings.radarrsettings": "",
"components.Settings.runnow": "",
"components.Settings.save": "",
"components.Settings.saving": "",
"components.Settings.servername": "",
"components.Settings.servernamePlaceholder": "",
"components.Settings.sonarrSettingsDescription": "",
"components.Settings.sonarrsettings": "",
"components.Settings.ssl": "",
"components.Settings.startscan": "",
"components.Settings.sync": "",
"components.Settings.syncing": "",
"components.Setup.configureplex": "",
"components.Setup.configureservices": "",
"components.Setup.continue": "",
"components.Setup.finish": "",
"components.Setup.finishing": "",
"components.Setup.loginwithplex": "",
"components.Setup.signinMessage": "",
"components.Setup.welcome": "",
"components.Slider.noresults": "",
"components.TitleCard.movie": "",
"components.TitleCard.tvshow": "",
"components.TvDetails.approve": "",
"components.TvDetails.approverequests": "",
"components.TvDetails.available": "",
"components.TvDetails.cancelrequest": "",
"components.TvDetails.cast": "",
"components.TvDetails.decline": "",
"components.TvDetails.declinerequests": "",
"components.TvDetails.manageModalClearMedia": "",
"components.TvDetails.manageModalClearMediaWarning": "",
"components.TvDetails.manageModalNoRequests": "",
"components.TvDetails.manageModalRequests": "",
"components.TvDetails.manageModalTitle": "",
"components.TvDetails.originallanguage": "",
"components.TvDetails.overview": "",
"components.TvDetails.overviewunavailable": "",
"components.TvDetails.pending": "",
"components.TvDetails.recommendations": "",
"components.TvDetails.recommendationssubtext": "",
"components.TvDetails.request": "",
"components.TvDetails.requestmore": "",
"components.TvDetails.similar": "",
"components.TvDetails.similarsubtext": "",
"components.TvDetails.status": "",
"components.TvDetails.unavailable": "",
"components.TvDetails.userrating": "",
"components.UserEdit.admin": "",
"components.UserEdit.adminDescription": "",
"components.UserEdit.autoapprove": "",
"components.UserEdit.autoapproveDescription": "",
"components.UserEdit.avatar": "",
"components.UserEdit.edituser": "",
"components.UserEdit.email": "",
"components.UserEdit.managerequests": "",
"components.UserEdit.managerequestsDescription": "",
"components.UserEdit.permissions": "",
"components.UserEdit.request": "",
"components.UserEdit.requestDescription": "",
"components.UserEdit.save": "",
"components.UserEdit.saving": "",
"components.UserEdit.settings": "",
"components.UserEdit.settingsDescription": "",
"components.UserEdit.userfail": "",
"components.UserEdit.username": "",
"components.UserEdit.users": "",
"components.UserEdit.usersDescription": "",
"components.UserEdit.usersaved": "",
"components.UserEdit.vote": "",
"components.UserEdit.voteDescription": "",
"components.UserList.admin": "",
"components.UserList.created": "",
"components.UserList.delete": "",
"components.UserList.edit": "",
"components.UserList.lastupdated": "",
"components.UserList.plexuser": "",
"components.UserList.role": "",
"components.UserList.totalrequests": "",
"components.UserList.user": "",
"components.UserList.userlist": "",
"components.UserList.username": "",
"components.UserList.usertype": "",
"i18n.approve": "",
"i18n.approved": "",
"i18n.available": "",
"i18n.cancel": "",
"i18n.decline": "",
"i18n.declined": "",
"i18n.delete": "",
"i18n.movies": "",
"i18n.partiallyavailable": "",
"i18n.pending": "",
"i18n.processing": "",
"i18n.tvshows": "",
"i18n.unavailable": "",
"pages.internalServerError": "",
"pages.oops": "",
"pages.pageNotFound": "",
"pages.returnHome": "",
"pages.serviceUnavailable": "",
"pages.somethingWentWrong": ""
}

@ -26,6 +26,8 @@ const loadLocaleData = (locale: string): Promise<any> => {
return import('../i18n/locale/de.json');
case 'ru':
return import('../i18n/locale/ru.json');
case 'nl':
return import('../i18n/locale/nl.json');
default:
return import('../i18n/locale/en.json');
}

Loading…
Cancel
Save