Skip to content
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
1 change: 1 addition & 0 deletions frontend/check-locales.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const allLocales = [
["zh", "zh-CN"],
["pl", "pl-PL"],
["it", "it-IT"],
["nl", "nl-NL"],
];

const ignoreUnused = [
Expand Down
28 changes: 23 additions & 5 deletions frontend/src/locale/IntlProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import { createIntl, createIntlCache } from "react-intl";
import langDe from "./lang/de.json";
import langEn from "./lang/en.json";
import langEs from "./lang/es.json";
import langIt from "./lang/it.json";
import langJa from "./lang/ja.json";
import langList from "./lang/lang-list.json";
import langNl from "./lang/nl.json";
import langPl from "./lang/pl.json";
import langRu from "./lang/ru.json";
import langSk from "./lang/sk.json";
import langZh from "./lang/zh.json";
import langPl from "./lang/pl.json";
import langIt from "./lang/it.json";
import langVi from "./lang/vi.json";
import langZh from "./lang/zh.json";

// first item of each array should be the language code,
// not the country code
Expand All @@ -25,6 +26,7 @@ const localeOptions = [
["pl", "pl-PL"],
["it", "it-IT"],
["vi", "vi-VN"],
["nl", "nl-NL"],
];

const loadMessages = (locale?: string): typeof langList & typeof langEn => {
Expand All @@ -48,6 +50,8 @@ const loadMessages = (locale?: string): typeof langList & typeof langEn => {
return Object.assign({}, langList, langEn, langIt);
case "vi":
return Object.assign({}, langList, langEn, langVi);
case "nl":
return Object.assign({}, langList, langEn, langNl);
default:
return Object.assign({}, langList, langEn);
}
Expand Down Expand Up @@ -82,6 +86,9 @@ const getFlagCodeForLocale = (locale?: string) => {
case "vi":
case "vi-VN":
return "VN";
case "nl":
case "nl-NL":
return "NL";
default:
return "EN";
}
Expand All @@ -105,7 +112,10 @@ const getLocale = (short = false) => {
const cache = createIntlCache();

const initialMessages = loadMessages(getLocale());
let intl = createIntl({ locale: getLocale(), messages: initialMessages }, cache);
let intl = createIntl(
{ locale: getLocale(), messages: initialMessages },
cache,
);

const changeLocale = (locale: string): void => {
const messages = loadMessages(locale);
Expand Down Expand Up @@ -145,4 +155,12 @@ const T = ({
);
};

export { localeOptions, getFlagCodeForLocale, getLocale, createIntl, changeLocale, intl, T };
export {
localeOptions,
getFlagCodeForLocale,
getLocale,
createIntl,
changeLocale,
intl,
T,
};
17 changes: 12 additions & 5 deletions frontend/src/locale/src/HelpDoc/index.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
import * as de from "./de/index";
import * as en from "./en/index";
import * as it from "./it/index";
import * as ja from "./ja/index";
import * as nl from "./nl/index";
import * as pl from "./pl/index";
import * as ru from "./ru/index";
import * as sk from "./sk/index";
import * as zh from "./zh/index";
import * as it from "./it/index";
import * as vi from "./vi/index";
import * as zh from "./zh/index";

const items: any = { en, de, ja, sk, zh, pl, ru, it, vi };
const items: any = { en, de, ja, sk, zh, pl, ru, it, vi, nl };

const fallbackLang = "en";

export const getHelpFile = (lang: string, section: string): string => {
if (typeof items[lang] !== "undefined" && typeof items[lang][section] !== "undefined") {
if (
typeof items[lang] !== "undefined" &&
typeof items[lang][section] !== "undefined"
) {
return items[lang][section].default;
}
// Fallback to English
if (typeof items[fallbackLang] !== "undefined" && typeof items[fallbackLang][section] !== "undefined") {
if (
typeof items[fallbackLang] !== "undefined" &&
typeof items[fallbackLang][section] !== "undefined"
) {
return items[fallbackLang][section].default;
}
throw new Error(`Cannot load help doc for ${lang}-${section}`);
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/locale/src/HelpDoc/nl/AccessLists.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Wat is een Toegangslijst?

Toeganslijsten bieden een zwarte- of witte lijst van specifieke client IP-adressen samen met authenticatie voor de Proxy Hosts via Basic HTTP Authenticatie.

Je kan meerdere client regels, gebruikersnamen en wachtwoorden voor een enkele Toegangslijst configureren en toepassen op één of meerdere _Proxy Hosts_.

Dit is het meest nuttig voor doorgestuurde webdiensten die geen authenticatiemechanismen hebben of wanneer je wilt beveiligen tegen onbekende bezoekers.
31 changes: 31 additions & 0 deletions frontend/src/locale/src/HelpDoc/nl/Certificates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Certificaten Hulp

### HTTP Certificaat

Een HTTP gevalideerd certificaat betekent dat Let's Encrypt servers
zullen proberen om over HTTP te bereiken (niet HTTPS!) en als dat gelukt is, zal
jouw certificaat worden uitgegeven.

Voor deze zal je een _Proxy Host_ moeten hebben die is toegankelijk via HTTP en
die naar deze Nginx installatie wijst. Nadat een certificaat is uitgegeven kan je
de _Proxy Host_ wijzigen om ook HTTPS toegang te geven. Maar de _Proxy Host_ zal
nog moeten worden geconfigureerd voor HTTP toegang om het certificaat te verlengen.

Dit proces ondersteunt geen domeinen met wildcards.

### DNS Certificaat

Een DNS gevalideerd certificaat zal gebruik maken van een DNS Provider plugin. De
DNS Provider zal tijdelijke records op jouw domein maken en Let's Encrypt zal deze
records opvragen om te controleren of je de eigenaar bent. Als dat is gecontroleerd
is zal Let's Encrypt het certificaat uitgeven.

Je hebt geen _Proxy Host_ nodig om dit soort certificaat aan te vragen. Je hebt dus
geen HTTP _Proxy Host_ nodig.

Dit proces ondersteunt _wel_ domeinen met wildcards.

### Aangepast Certificaat

Gebruik deze optie om jouw eigen SSL Certificaat te uploaden, zoals
geleverd door jouw eigen Certificate Authority.
10 changes: 10 additions & 0 deletions frontend/src/locale/src/HelpDoc/nl/DeadHosts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Wat is een 404 Host?

Simpel gezegd is een 404 Host een host setup die een 404 pagina weergeeft.

Dit kan nuttig zijn wanneer jouw domein is opgegeven in zoekmachines en je wil
een betere foutpagina leveren of specifiek om te zeggen tegen de zoekmachines dat
het domein niet langer bestaat.

Een ander voordeel van het hebben van een 404 Host is om de logs voor bezoeken
te volgen en de referenties te bekijken.
7 changes: 7 additions & 0 deletions frontend/src/locale/src/HelpDoc/nl/ProxyHosts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Wat is een Proxy Host?

Een Proxy Host is de inkomende endpoint voor een webdienst dat je wilt doorsturen.

Het biedt optionele SSL voor je dienst die mogelijk geen SSL ondersteuning heeft.

Proxy Hosts worden het meest gebruikt in Nginx Proxy Manager.
7 changes: 7 additions & 0 deletions frontend/src/locale/src/HelpDoc/nl/RedirectionHosts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Wat is een Redirection Host?

Een Redirection Host zal verzoeken van de inkomende domeinnaam doorsturen, en de bezoeker
omleiden naar een andere domeinnaam.

Het gebruik van een Redirection Host is vooral handig wanneer je jouw website verandert
maar je nog zoekmachines of referenties naar de oude domeinnaam hebben.
6 changes: 6 additions & 0 deletions frontend/src/locale/src/HelpDoc/nl/Streams.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Wat is een Stream?

Streams zijn een nieuwe toevoeging aan Nginx, die toelaat om TCP/UDP
verkeer naar een ander computer op het netwerk te sturen.

Als je game servers, FTP of SSH servers draait kan dit handig zijn.
6 changes: 6 additions & 0 deletions frontend/src/locale/src/HelpDoc/nl/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export * as AccessLists from "./AccessLists.md";
export * as Certificates from "./Certificates.md";
export * as DeadHosts from "./DeadHosts.md";
export * as ProxyHosts from "./ProxyHosts.md";
export * as RedirectionHosts from "./RedirectionHosts.md";
export * as Streams from "./Streams.md";
5 changes: 4 additions & 1 deletion frontend/src/locale/src/lang-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@
},
"locale-it-IT": {
"defaultMessage": "Italiano"
},
},
"locale-vi-VN": {
"defaultMessage": "Tiếng Việt"
},
"locale-nl-NL": {
"defaultMessage": "Nederlands"
}
}
Loading