331 lines
32 KiB
Racket
331 lines
32 KiB
Racket
#lang racket/base
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Built-in UI translations and wiki-page translation overrides.
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
(require db
|
|
racket/file
|
|
racket/list
|
|
racket/string
|
|
"private/config.rkt"
|
|
"private/database.rkt")
|
|
|
|
(provide tr
|
|
translations-for
|
|
current-language
|
|
write-language!
|
|
translation-page-slug
|
|
translation-page-template)
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Supporting functions
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
(define english
|
|
(hash
|
|
'users "Users" 'page-aliases "Page aliases" 'no-page-aliases "No page aliases." 'old-address "Old address" 'current-address "Current address" 'referenced-by "Referenced by" 'current-references "Current references" 'historical-references "Historical references" 'cleanup-alias "Clean up references" 'cleanup-alias-confirm "Replace all current references to this old address with the current address? Historical versions will not be changed." 'cleanup-complete "Cleanup complete" 'delete-alias "Delete alias" 'delete-alias-confirm "Delete this alias?" 'delete-alias-history-confirm "Delete this alias? Historical page versions still contain this old address and those links may stop resolving." 'software-version "Software version" 'translations "Translations" 'orphaned-uploads "Orphaned uploads" 'no-orphaned-uploads "No orphaned uploads." 'uploaded-by "uploaded by" 'last-used "Last used" 'never-referenced "Never referenced by a saved page." 'delete-orphaned-upload-confirm "Delete this orphaned upload?" 'recent "Recent" 'recent-changes "Recent changes" 'bookmarks "Bookmarks" 'bookmark "Bookmark" 'bookmarked "Bookmarked" 'bookmark-section "Bookmark section" 'move "Move" 'remove "Remove" 'no-bookmarks "No bookmarks yet." 'no-recent-pages "No recent pages." 'no-recent-changes "No recent changes." 'changed-by "changed by" 'todo "Todo" 'todo-list "Todo list" 'graph "Graph" 'cmaps "CMaps" 'concept-maps "Concept maps" 'concept-map-storage-note "Concept maps are stored in the wiki database." 'new-concept-map "New CMap" 'concept-map-name "Concept map name" 'concept-map-saved "CMap saved" 'no-concept-maps "No saved CMaps" 'concept-map-prototype "Concept map prototype" 'concept-map-prototype-note "In-memory prototype; changes are not saved yet." 'concept-map-help "Select a concept to show its relation and resize handles. Drag the relation handle to another concept; edit the new relation name immediately. Double-click a page concept to open the wiki page." 'add-concept "Add concept" 'add-page-node "Add current page" 'add-submap "Add sub-CMap" 'connect-selected "Connect selected" 'edit-selected-concept "Edit selected" 'reset "Reset" 'relation "Relation" 'create-relation "Create relation" 'resize-concept "Resize concept" 'select-one-concept "Select one concept first." 'label "Label" 'synopsis "Synopsis" 'background-color "Background color" 'font-family "Font family" 'font-size "Font size" 'sub-concept-map "Sub concept map" 'wiki-graph "Wiki graph" 'graph-summary "{pages} pages, {links} links" 'context "context" 'context-graph "Context graph" 'context-graph-summary "{pages} related pages, {links} links" 'context-graph-direction-summary "{incoming} incoming, {outgoing} outgoing" 'popup "Popup" 'close "Close" 'dock-right "Dock right" 'dock-above "Dock above" 'open-full-graph "Open full graph" 'admin "Admin" 'role-reader "reader" 'role-editor "editor" 'role-admin "admin"
|
|
'select-all "Select all" 'group-selected "Group selection as sub-CMap"
|
|
'ungroup-selected "Detach from sub-CMap" 'delete-selected "Delete selection"
|
|
'group-submap-name "Name of the main concept for the new sub-CMap"
|
|
'grouped-submap-synopsis "Grouped sub-concept map."
|
|
'navigation-graph "Navigation graph" 'click "click"
|
|
'cmap-help-add-selection "Add to or remove from the selection"
|
|
'cmap-help-rename "Edit the selected concept"
|
|
'cmap-help-clear-selection "Clear selection"
|
|
'concept-map-help-expanded "Select a concept to show its handles. Drag a relation to a concept or empty space. Double-click a page concept to open it; double-click a sub-CMap to expand or collapse it."
|
|
'concept-map-help-context "Select with Ctrl/Cmd/Shift-click or by dragging over empty space. Drag a selected element to move the complete selection. Grouping creates a new sub-CMap around the selection. Double-click a page or sub-CMap to open it; right-click for editing tools."
|
|
'detach-submap-confirm "Place \"{concept}\" outside submap \"{submap}\"?"
|
|
'promote-submap "Make separate CMap" 'submap-name "Name of the new concept map"
|
|
'rename-concept-map "Rename CMap" 'delete-concept-map "Delete CMap" 'redo-action "Redo" 'save-now "Save now"
|
|
'autosave-pending "Changes waiting to be saved" 'autosaving "Saving automatically…" 'concept-map-autosaved "CMap saved automatically"
|
|
'concept-map-renamed "CMap renamed" 'concept-map-deleted "CMap deleted"
|
|
'concept-map-history "CMap history" 'concept-map-history-help "Load a historical version into the editor to inspect it. Saving it creates a new current version."
|
|
'create-concept-map-snapshot "Make snapshot…" 'snapshot-description "Snapshot description" 'snapshot "Snapshot"
|
|
'creating-snapshot "Creating snapshot…" 'snapshot-created "Snapshot created"
|
|
'concept-map-version-loaded "Version {version} loaded; save to make it current." 'load-version "Load version" 'current-version "Current"
|
|
'automatic-save "Automatic save" 'manual-save "Manual save" 'concept-map-created-version "CMap created"
|
|
'concept-map-renamed-version "CMap renamed" 'concept-map-initial-version "Initial available version"
|
|
'delete-concept-map-confirm "Delete concept map \"{title}\"? Links to it will remain but will no longer open the map."
|
|
'reload-concept-map "Reload CMap"
|
|
'edit-concept "Edit concept" 'linked-page "Linked wiki page" 'no-linked-page "No linked page" 'filter-pages "Filter pages" 'linked-concept-map "Linked concept map" 'no-linked-concept-map "No linked concept map" 'filter-concept-maps "Filter concept maps" 'parent-concept-map "Parent concept map" 'select-concept-map "Select a CMap" 'concept-map-loaded "CMap loaded" 'select-listed-page "Select a wiki page from the list or clear the field." 'select-listed-concept-map "Select a CMap from the list or clear the field." 'unsaved-concept-map "Unsaved concept map" 'save-concept-map-before-leaving "Save the changes to this concept map before leaving?" 'dont-save "Don't save"
|
|
'concept-image "Concept image" 'remove-image "Remove image" 'text-color "Text color" 'main-concept-background-color "Main concept background color" 'submap-appearance "Sub-CMap appearance" 'submap-background-color "Sub-CMap background color" 'submap-border-color "Sub-CMap border color" 'link-concept-map "Link to CMap" 'insert-concept-map-link "Insert CMap link" 'concept-map-link-help "Insert the selected CMap as a link or as a read-only view." 'concept-map-not-found "CMap not found" 'insert "Insert" 'insert-link "Insert link" 'embed-concept-map "Embed CMap" 'embedded-concept-map-help "Double-click to open this CMap." 'a4-page-boundaries "A4 page boundaries"
|
|
'search-wiki "Search pages and concept maps" 'contents "Contents" 'pages "Pages" 'namespace "Namespace" 'namespace-placeholder "RWS" 'root-namespace "Root" 'wiki-page "Wiki page" 'concept-map "Concept map" 'no-matching-search-results "No matching pages or concept maps."
|
|
'edit "Edit" 'rename "Rename" 'rename-page "Rename page" 'slug "Slug" 'rename-summary "Renamed page" 'edit-section "Edit section" 'template "Template" 'no-template "No template" 'replace-with-template "Replace the current page content with template {template}?" 'history "History" 'delete "Delete" 'page-not-found "Page not found"
|
|
'cancel "Cancel" 'save "Save" 'page-title "Page title" 'tags "Tags (comma separated)"
|
|
'version-summary "Version summary (optional)" 'search "Search" 'page-history "Page history"
|
|
'back "Back" 'user-administration "User administration" 'username "Username"
|
|
'display-name "Display name" 'initial-password "Initial password" 'create-user "Create user"
|
|
'sign-in "Sign in" 'sign-out "Sign out" 'password "Password" 'profile "Profile"
|
|
'email-address "Email address" 'change-password "Change password" 'change-password-help "Leave these fields empty if you do not want to change your password."
|
|
'current-password "Current password" 'save-profile "Save profile" 'profile-saved "Profile saved." 'passwords-do-not-match "Passwords do not match."
|
|
'password-minimum "The password must contain at least 8 characters." 'forgot-password "Forgot your password?" 'reset-password "Reset password"
|
|
'reset-request-help "Enter your username or email address. If an account with an email address exists, a reset link will be sent."
|
|
'username-or-email "Username or email address" 'send-reset-link "Send reset link" 'reset-request-result "If a matching account with an email address exists and the request limit has not been reached, a reset link has been sent."
|
|
'back-to-login "Back to sign in" 'invalid-reset-link "This reset link is invalid, expired or has already been used." 'request-new-reset-link "Request a new reset link" 'password-reset-complete "Your password has been reset. You can now sign in."
|
|
'save-new-password "Save new password" 'email-and-password-reset "Email and password reset" 'public-wiki-url "Public wiki URL"
|
|
'smtp-server "SMTP server" 'smtp-port "SMTP port" 'sender-address "Sender address" 'smtp-username "SMTP username" 'smtp-password "SMTP password"
|
|
'smtp-password-kept "A password is stored; leave empty to keep it." 'use-starttls "Use STARTTLS" 'accept-untrusted-smtp-certificates "Accept untrusted certificates (trusted local server only)" 'reset-links-per-hour "Maximum reset links per user per hour"
|
|
'test-smtp-settings "Test SMTP settings" 'test-recipient "Test recipient" 'send-test-mail "Send test email"
|
|
'sending-test-mail "Sending test email…" 'test-mail-sent "Test email accepted by SMTP server; save these settings to use them for password reset"
|
|
'smtp-certificate-verification-failed "The SMTP server certificate could not be verified. Install a valid certificate, or select the local-server exception if this is a trusted local SMTP server."
|
|
'smtp-no-modern-tls "The SMTP connection attempted an obsolete TLS protocol. Install the current Racket Wiki version, which negotiates modern TLS automatically."
|
|
'reset-request-next-step "Check your inbox and spam folder. Delivery can take a few minutes."
|
|
'upload-image "Upload image" 'upload-file "Upload file" 'saved "Saved"
|
|
'offline "Offline" 'online "Online" 'todo-items "Todo items"
|
|
'no-todos "No todo items." 'no-matching-pages "No matching pages."
|
|
'this-page-missing "This page does not exist yet." 'no-pages "No pages yet"
|
|
'view "View" 'compare-previous "Compare previous" 'new-password "New password"
|
|
'created "Created" 'modified "Modified" 'version "Version" 'tags-none "Tags: none"
|
|
'you-are-here "You are here"
|
|
'setup-title "Set up Racket Wiki" 'setup-description "Configure PostgreSQL, create the first administrator and install the browser libraries. This page does not require JavaScript."
|
|
'postgresql "PostgreSQL" 'server "Server" 'port "Port" 'database "Database" 'user "User"
|
|
'tls-ssl "TLS/SSL" 'ssl-no "No (typical localhost setup)" 'ssl-optional "Optional" 'ssl-required "Required"
|
|
'administrator "Administrator" 'administrator-username "Administrator username" 'administrator-password "Administrator password"
|
|
'repeat-password "Repeat password" 'ready "Ready" 'required "Required" 'administrator-account "Administrator account"
|
|
'frontend-libraries "Frontend libraries" 'will-download "Will be downloaded" 'complete-setup "Complete setup"
|
|
'tags-label "Tags: " 'page-address "Page address" 'page-address-generated "Page address will be generated from the title when you save."
|
|
'saving "Saving…" 'created-page "Created page" 'edited-page "Edited page" 'line "line"
|
|
'bold "Bold" 'italic "Italic" 'strikethrough "Strikethrough" 'heading "Heading" 'quote "Quote"
|
|
'bulleted-list "Bulleted list" 'numbered-list "Numbered list" 'checklist "Checklist" 'code-block "Code block"
|
|
'table "Table" 'link "Link" 'horizontal-rule "Horizontal rule" 'undo "Undo" 'redo "Redo"
|
|
'preview "Preview" 'side-by-side "Side by side" 'fullscreen "Fullscreen" 'raw-markdown "Raw Markdown" 'automatic-wiki-link "Automatic wiki link"
|
|
'language "Language" 'language-en "English" 'language-nl "Dutch"
|
|
'no-headings "No headings" 'uploading "Uploading" 'image-upload-complete "Image upload complete" 'upload-complete "Upload complete"
|
|
'by "by" 'result "result" 'results "results" 'for "for" 'page-does-not-exist "The page does not exist."
|
|
'combined-wiki-graph "Wiki and CMap graph"
|
|
'combined-graph-summary "{pages} pages, {cmaps} concept maps, {links} links"))
|
|
|
|
(define dutch
|
|
(hash
|
|
'users "Gebruikers" 'page-aliases "Pagina-aliassen" 'no-page-aliases "Geen pagina-aliassen." 'old-address "Oud adres" 'current-address "Huidig adres" 'referenced-by "Gerefereerd door" 'current-references "Actuele verwijzingen" 'historical-references "Historische verwijzingen" 'cleanup-alias "Verwijzingen opschonen" 'cleanup-alias-confirm "Alle actuele verwijzingen naar dit oude adres vervangen door het huidige adres? Historische versies worden niet gewijzigd." 'cleanup-complete "Opschonen voltooid" 'delete-alias "Alias verwijderen" 'delete-alias-confirm "Deze alias verwijderen?" 'delete-alias-history-confirm "Deze alias verwijderen? Historische paginaversies bevatten dit oude adres nog en die links werken daarna mogelijk niet meer." 'software-version "Softwareversie" 'translations "Vertalingen" 'orphaned-uploads "Verweeste uploads" 'no-orphaned-uploads "Geen verweeste uploads." 'uploaded-by "geüpload door" 'last-used "Laatst gebruikt" 'never-referenced "Nooit door een opgeslagen pagina gerefereerd." 'delete-orphaned-upload-confirm "Deze verweeste upload verwijderen?" 'recent "Recent" 'recent-changes "Recent gewijzigd" 'bookmarks "Bookmarks" 'bookmark "Bookmark" 'bookmarked "Gebookmarkt" 'bookmark-section "Bookmark-hoofdstuk" 'move "Verplaatsen" 'remove "Verwijderen" 'no-bookmarks "Nog geen bookmarks." 'no-recent-pages "Nog geen recent gewijzigde pagina's." 'no-recent-changes "Nog geen recente wijzigingen." 'changed-by "gewijzigd door" 'todo "Todo" 'todo-list "Todo-lijst" 'graph "Graph" 'cmaps "CMaps" 'concept-maps "Conceptmaps" 'concept-map-storage-note "Conceptmaps worden in de wikidatabase opgeslagen." 'new-concept-map "Nieuwe CMap" 'concept-map-name "Naam van de conceptmap" 'concept-map-saved "CMap opgeslagen" 'no-concept-maps "Geen opgeslagen CMaps" 'concept-map-prototype "Conceptmap-prototype" 'concept-map-prototype-note "Prototype in geheugen; wijzigingen worden nog niet opgeslagen." 'concept-map-help "Selecteer een concept om de relatie- en formaatgrepen te tonen. Sleep de relatiegreep naar een ander concept en bewerk daarna direct de relatienaam. Dubbelklik op een paginaconcept om de wikipagina te openen." 'add-concept "Concept toevoegen" 'add-page-node "Huidige pagina toevoegen" 'add-submap "Sub-CMap toevoegen" 'connect-selected "Selectie verbinden" 'edit-selected-concept "Selectie bewerken" 'reset "Opnieuw" 'relation "Relatie" 'create-relation "Relatie maken" 'resize-concept "Concept vergroten/verkleinen" 'select-one-concept "Selecteer eerst één concept." 'label "Naam" 'synopsis "Samenvatting" 'background-color "Achtergrondkleur" 'font-family "Lettertype" 'font-size "Lettergrootte" 'sub-concept-map "Sub-conceptmap" 'wiki-graph "Wiki-graaf" 'graph-summary "{pages} pagina's, {links} links" 'context "context" 'context-graph "Contextgraaf" 'context-graph-summary "{pages} gerelateerde pagina's, {links} links" 'context-graph-direction-summary "{incoming} inkomend, {outgoing} uitgaand" 'popup "Popup" 'close "Sluiten" 'dock-right "Rechts vastzetten" 'dock-above "Boven vastzetten" 'open-full-graph "Volledig openen" 'admin "Admin" 'role-reader "lezer" 'role-editor "redacteur" 'role-admin "admin"
|
|
'select-all "Alles selecteren" 'group-selected "Selectie groeperen als sub-CMap"
|
|
'ungroup-selected "Losmaken van sub-CMap" 'delete-selected "Selectie verwijderen"
|
|
'group-submap-name "Naam van het hoofdconcept van de nieuwe sub-CMap"
|
|
'grouped-submap-synopsis "Gegroepeerde sub-conceptmap."
|
|
'navigation-graph "Navigatiegraaf" 'click "klik"
|
|
'cmap-help-add-selection "Aan de selectie toevoegen of eruit verwijderen"
|
|
'cmap-help-rename "Het geselecteerde concept bewerken"
|
|
'cmap-help-clear-selection "Selectie opheffen"
|
|
'concept-map-help-expanded "Selecteer een concept om de grepen te tonen. Sleep een relatie naar een concept of naar lege ruimte. Dubbelklik op een paginaconcept om het te openen; dubbelklik op een sub-CMap om die uit of in te klappen."
|
|
'concept-map-help-context "Selecteer met Ctrl/Cmd/Shift-klik of door over lege ruimte te slepen. Sleep een geselecteerd element om de volledige selectie te verplaatsen. Groeperen maakt een nieuwe sub-CMap rond de selectie. Dubbelklik op een pagina of sub-CMap om die te openen; klik met rechts voor de bewerkingsfuncties."
|
|
'detach-submap-confirm "\"{concept}\" buiten submap \"{submap}\" plaatsen?"
|
|
'promote-submap "Aparte CMap maken" 'submap-name "Naam van de nieuwe conceptmap"
|
|
'rename-concept-map "CMap hernoemen" 'delete-concept-map "CMap verwijderen" 'redo-action "Opnieuw uitvoeren" 'save-now "Nu opslaan"
|
|
'autosave-pending "Wijzigingen wachten op opslaan" 'autosaving "Automatisch opslaan…" 'concept-map-autosaved "CMap automatisch opgeslagen"
|
|
'concept-map-renamed "CMap hernoemd" 'concept-map-deleted "CMap verwijderd"
|
|
'concept-map-history "CMap-geschiedenis" 'concept-map-history-help "Laad een historische versie in de editor om hem te bekijken. Opslaan maakt hiervan een nieuwe actuele versie."
|
|
'create-concept-map-snapshot "Snapshot maken…" 'snapshot-description "Omschrijving van snapshot" 'snapshot "Snapshot"
|
|
'creating-snapshot "Snapshot maken…" 'snapshot-created "Snapshot gemaakt"
|
|
'concept-map-version-loaded "Versie {version} geladen; sla op om hem actueel te maken." 'load-version "Versie laden" 'current-version "Actueel"
|
|
'automatic-save "Automatisch opgeslagen" 'manual-save "Handmatig opgeslagen" 'concept-map-created-version "CMap aangemaakt"
|
|
'concept-map-renamed-version "CMap hernoemd" 'concept-map-initial-version "Eerste beschikbare versie"
|
|
'delete-concept-map-confirm "Conceptmap \"{title}\" verwijderen? Links ernaartoe blijven bestaan, maar kunnen de conceptmap niet meer openen."
|
|
'reload-concept-map "CMap opnieuw laden"
|
|
'edit-concept "Concept bewerken" 'linked-page "Gekoppelde wikipagina" 'no-linked-page "Geen gekoppelde pagina" 'filter-pages "Filter pagina's" 'linked-concept-map "Gekoppelde conceptmap" 'no-linked-concept-map "Geen gekoppelde conceptmap" 'filter-concept-maps "Filter conceptmaps" 'parent-concept-map "Bovenliggende conceptmap" 'select-concept-map "Selecteer een CMap" 'concept-map-loaded "CMap geladen" 'select-listed-page "Selecteer een wikipagina uit de lijst of maak het veld leeg." 'select-listed-concept-map "Selecteer een CMap uit de lijst of maak het veld leeg." 'unsaved-concept-map "Niet-opgeslagen conceptmap" 'save-concept-map-before-leaving "De wijzigingen aan deze conceptmap opslaan voordat u hem verlaat?" 'dont-save "Niet opslaan"
|
|
'concept-image "Afbeelding bij concept" 'remove-image "Afbeelding verwijderen" 'text-color "Tekstkleur" 'main-concept-background-color "Achtergrondkleur hoofdconcept" 'submap-appearance "Vormgeving sub-CMap" 'submap-background-color "Achtergrondkleur sub-CMap" 'submap-border-color "Randkleur sub-CMap" 'link-concept-map "Link naar CMap" 'insert-concept-map-link "CMap invoegen" 'concept-map-link-help "Voeg de geselecteerde CMap in als link of als alleen-lezen weergave." 'concept-map-not-found "CMap niet gevonden" 'insert "Invoegen" 'insert-link "Link invoegen" 'embed-concept-map "CMap insluiten" 'embedded-concept-map-help "Dubbelklik om deze CMap te openen." 'a4-page-boundaries "A4-paginagrenzen"
|
|
'search-wiki "Pagina's en conceptmaps doorzoeken" 'contents "Inhoud" 'pages "Pagina's" 'namespace "Namespace" 'namespace-placeholder "RWS" 'root-namespace "Hoofdnamespace" 'wiki-page "Wikipagina" 'concept-map "Conceptmap" 'no-matching-search-results "Geen overeenkomende wikipagina's of conceptmaps."
|
|
'edit "Bewerken" 'rename "Hernoemen" 'rename-page "Pagina hernoemen" 'slug "Slug" 'rename-summary "Pagina hernoemd" 'edit-section "Sectie bewerken" 'template "Sjabloon" 'no-template "Geen sjabloon" 'replace-with-template "De huidige pagina-inhoud vervangen door sjabloon {template}?" 'history "Geschiedenis" 'delete "Verwijderen" 'page-not-found "Pagina niet gevonden"
|
|
'cancel "Annuleren" 'save "Opslaan" 'page-title "Paginatitel" 'tags "Tags (komma-gescheiden)"
|
|
'version-summary "Versiesamenvatting (optioneel)" 'search "Zoeken" 'page-history "Paginageschiedenis"
|
|
'back "Terug" 'user-administration "Gebruikersbeheer" 'username "Gebruikersnaam"
|
|
'display-name "Weergavenaam" 'initial-password "Initieel wachtwoord" 'create-user "Gebruiker aanmaken"
|
|
'sign-in "Inloggen" 'sign-out "Afmelden" 'password "Wachtwoord" 'profile "Profiel"
|
|
'email-address "E-mailadres" 'change-password "Wachtwoord wijzigen" 'change-password-help "Laat deze velden leeg als u uw wachtwoord niet wilt wijzigen."
|
|
'current-password "Huidig wachtwoord" 'save-profile "Profiel opslaan" 'profile-saved "Profiel opgeslagen." 'passwords-do-not-match "De wachtwoorden komen niet overeen."
|
|
'password-minimum "Het wachtwoord moet minstens 8 tekens bevatten." 'forgot-password "Wachtwoord vergeten?" 'reset-password "Wachtwoord herstellen"
|
|
'reset-request-help "Vul uw gebruikersnaam of e-mailadres in. Als er een account met een e-mailadres bestaat, wordt een herstellink verstuurd."
|
|
'username-or-email "Gebruikersnaam of e-mailadres" 'send-reset-link "Herstellink versturen" 'reset-request-result "Als er een passend account met e-mailadres bestaat en de aanvraaglimiet niet is bereikt, is een herstellink verstuurd."
|
|
'back-to-login "Terug naar inloggen" 'invalid-reset-link "Deze herstellink is ongeldig, verlopen of al gebruikt." 'request-new-reset-link "Nieuwe herstellink aanvragen" 'password-reset-complete "Uw wachtwoord is hersteld. U kunt nu inloggen."
|
|
'save-new-password "Nieuw wachtwoord opslaan" 'email-and-password-reset "E-mail en wachtwoordherstel" 'public-wiki-url "Publieke wiki-URL"
|
|
'smtp-server "SMTP-server" 'smtp-port "SMTP-poort" 'sender-address "Afzenderadres" 'smtp-username "SMTP-gebruikersnaam" 'smtp-password "SMTP-wachtwoord"
|
|
'smtp-password-kept "Er is een wachtwoord opgeslagen; laat dit leeg om het te behouden." 'use-starttls "STARTTLS gebruiken" 'accept-untrusted-smtp-certificates "Onvertrouwde certificaten accepteren (alleen voor een vertrouwde lokale server)" 'reset-links-per-hour "Maximaal aantal herstellinks per gebruiker per uur"
|
|
'test-smtp-settings "SMTP-instellingen testen" 'test-recipient "Testontvanger" 'send-test-mail "Testmail versturen"
|
|
'sending-test-mail "Testmail versturen…" 'test-mail-sent "Testmail door SMTP-server geaccepteerd; sla deze instellingen op voor wachtwoordherstel"
|
|
'smtp-certificate-verification-failed "Het certificaat van de SMTP-server kon niet worden gecontroleerd. Installeer een geldig certificaat of kies de uitzondering voor een vertrouwde lokale SMTP-server."
|
|
'smtp-no-modern-tls "De SMTP-verbinding probeerde een verouderd TLS-protocol. Installeer de huidige versie van Racket Wiki; die onderhandelt automatisch over moderne TLS."
|
|
'reset-request-next-step "Controleer uw inbox en spammap. De bezorging kan enkele minuten duren."
|
|
'upload-image "Afbeelding uploaden" 'upload-file "Bestand uploaden" 'saved "Opgeslagen"
|
|
'offline "Offline" 'online "Online" 'todo-items "Todo-items"
|
|
'no-todos "Geen todo-items." 'no-matching-pages "Geen overeenkomende pagina's."
|
|
'this-page-missing "Deze pagina bestaat nog niet." 'no-pages "Nog geen pagina's"
|
|
'view "Bekijken" 'compare-previous "Vergelijk vorige" 'new-password "Nieuw wachtwoord"
|
|
'created "Aangemaakt" 'modified "Gewijzigd" 'version "Versie" 'tags-none "Tags: geen"
|
|
'you-are-here "U bent hier"
|
|
'setup-title "Racket Wiki instellen" 'setup-description "Configureer PostgreSQL, maak de eerste beheerder aan en installeer de browserbibliotheken. Deze pagina heeft geen JavaScript nodig."
|
|
'postgresql "PostgreSQL" 'server "Server" 'port "Poort" 'database "Database" 'user "Gebruiker"
|
|
'tls-ssl "TLS/SSL" 'ssl-no "Nee (gebruikelijk op localhost)" 'ssl-optional "Optioneel" 'ssl-required "Verplicht"
|
|
'administrator "Beheerder" 'administrator-username "Gebruikersnaam beheerder" 'administrator-password "Wachtwoord beheerder"
|
|
'repeat-password "Herhaal wachtwoord" 'ready "Gereed" 'required "Verplicht" 'administrator-account "Beheerdersaccount"
|
|
'frontend-libraries "Frontendbibliotheken" 'will-download "Worden gedownload" 'complete-setup "Setup voltooien"
|
|
'tags-label "Tags: " 'page-address "Pagina-adres" 'page-address-generated "Het pagina-adres wordt bij opslaan uit de titel afgeleid."
|
|
'saving "Opslaan…" 'created-page "Pagina aangemaakt" 'edited-page "Pagina gewijzigd" 'line "regel"
|
|
'bold "Vet" 'italic "Cursief" 'strikethrough "Doorhalen" 'heading "Kop" 'quote "Citaat"
|
|
'bulleted-list "Opsomming" 'numbered-list "Genummerde lijst" 'checklist "Checklist" 'code-block "Codeblok"
|
|
'table "Tabel" 'link "Link" 'horizontal-rule "Horizontale lijn" 'undo "Ongedaan maken" 'redo "Opnieuw uitvoeren"
|
|
'preview "Voorbeeld" 'side-by-side "Naast elkaar" 'fullscreen "Volledig scherm" 'raw-markdown "Ruwe Markdown" 'automatic-wiki-link "Automatische wikilink"
|
|
'language "Taal" 'language-en "Engels" 'language-nl "Nederlands"
|
|
'no-headings "Geen koppen" 'uploading "Uploaden" 'image-upload-complete "Afbeelding geüpload" 'upload-complete "Upload voltooid"
|
|
'by "door" 'result "resultaat" 'results "resultaten" 'for "voor" 'page-does-not-exist "De pagina bestaat niet."
|
|
'combined-wiki-graph "Wiki- en CMap-graaf"
|
|
'combined-graph-summary "{pages} pagina's, {cmaps} conceptmaps, {links} links"))
|
|
|
|
(define (base-translations language)
|
|
(if (string-ci=? language "nl") dutch english))
|
|
|
|
(define (current-language config)
|
|
(with-handlers ((exn:fail? (λ (_e) (wiki-config-language config))))
|
|
(if (file-exists? (language-config-path config))
|
|
(call-with-input-file (language-config-path config)
|
|
(λ (in)
|
|
(define value (read in))
|
|
(if (string? value) value (wiki-config-language config))))
|
|
(wiki-config-language config))))
|
|
|
|
(define (write-language! config language)
|
|
(make-directory* (wiki-config-data-dir config))
|
|
(call-with-output-file (language-config-path config)
|
|
(λ (out)
|
|
(write language out)
|
|
(newline out))
|
|
#:exists 'truncate/replace)
|
|
(void))
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; goal : Return the slug of the special translations page.
|
|
; pre : none; language is accepted for compatibility with older callers.
|
|
; post : no state is changed.
|
|
; result : The fixed wiki-translations slug.
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
(define (translation-page-slug [language #f])
|
|
"wiki-translations")
|
|
|
|
(define (translation-value-needs-quotes? value)
|
|
(or (string-contains? value ",")
|
|
(string-contains? value "\"")
|
|
(not (string=? value (string-trim value)))))
|
|
|
|
(define (translation-value->text value)
|
|
(if (translation-value-needs-quotes? value)
|
|
(string-append "\""
|
|
(string-replace (string-replace value "\\" "\\\\") "\"" "\\\"")
|
|
"\"")
|
|
value))
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; goal : Build the initial contents of the special translations page.
|
|
; pre : the built-in translation tables are available.
|
|
; post : no state is changed.
|
|
; result : Text containing every known key with nl and en values.
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
(define (translation-page-template)
|
|
(define keys
|
|
(sort (remove-duplicates (append (hash-keys english) (hash-keys dutch)))
|
|
string<?
|
|
#:key symbol->string))
|
|
(string-join
|
|
(for/list ((key (in-list keys)))
|
|
(format "~a = nl:~a, en:~a"
|
|
(symbol->string key)
|
|
(translation-value->text (hash-ref dutch key (hash-ref english key "")))
|
|
(translation-value->text (hash-ref english key ""))))
|
|
"\n"))
|
|
|
|
(define (unquote-translation-value value)
|
|
(define text (string-trim value))
|
|
(if (and (>= (string-length text) 2)
|
|
(char=? (string-ref text 0) #\")
|
|
(char=? (string-ref text (sub1 (string-length text))) #\"))
|
|
(let ((body (substring text 1 (sub1 (string-length text)))))
|
|
(string-replace (string-replace body "\\\"" "\"") "\\\\" "\\"))
|
|
text))
|
|
|
|
(define (split-translation-variants text)
|
|
(let loop ((i 0)
|
|
(start 0)
|
|
(quoted? #f)
|
|
(escaped? #f)
|
|
(result '()))
|
|
(if (>= i (string-length text))
|
|
(reverse (cons (substring text start i) result))
|
|
(let ((ch (string-ref text i)))
|
|
(cond
|
|
(escaped?
|
|
(loop (add1 i) start quoted? #f result))
|
|
((and quoted? (char=? ch #\\))
|
|
(loop (add1 i) start quoted? #t result))
|
|
((char=? ch #\")
|
|
(loop (add1 i) start (not quoted?) #f result))
|
|
((and (not quoted?) (char=? ch #\,))
|
|
(loop (add1 i) (add1 i) #f #f (cons (substring text start i) result)))
|
|
(else
|
|
(loop (add1 i) start quoted? #f result)))))))
|
|
|
|
(define (parse-translation-variants text)
|
|
(for/fold ((result (hash)))
|
|
((part (in-list (split-translation-variants text))))
|
|
(define match (regexp-match #px"^\\s*([A-Za-z][A-Za-z0-9_-]*)\\s*:(.*)$" part))
|
|
(if match
|
|
(hash-set result
|
|
(string-downcase (list-ref match 1))
|
|
(unquote-translation-value (list-ref match 2)))
|
|
result)))
|
|
|
|
(define (parse-overrides markdown)
|
|
(for/fold ((result (hash)))
|
|
((line (in-list (string-split markdown "\n"))))
|
|
(define match
|
|
(regexp-match #px"^\\s*([A-Za-z0-9._-]+)\\s*=\\s*(.*?)\\s*$" line))
|
|
(if match
|
|
(let ((variants (parse-translation-variants (list-ref match 2))))
|
|
(if (zero? (hash-count variants))
|
|
result
|
|
(hash-set result (string->symbol (list-ref match 1)) variants)))
|
|
result)))
|
|
|
|
(define (database-overrides config)
|
|
(with-handlers ((exn:fail? (λ (_e) (hash))))
|
|
(if (not (database-ready? config))
|
|
(hash)
|
|
(call-with-wiki-database
|
|
config
|
|
(λ (db)
|
|
(define markdown
|
|
(query-maybe-value db
|
|
"SELECT markdown FROM pages WHERE namespace = '' AND slug = $1 AND archived = FALSE"
|
|
(translation-page-slug)))
|
|
(if markdown (parse-overrides markdown) (hash)))))))
|
|
|
|
(define (translation-override-for-language variants language)
|
|
(define language-key (string-downcase language))
|
|
(cond
|
|
((hash-has-key? variants language-key)
|
|
(hash-ref variants language-key))
|
|
((hash-has-key? variants "en")
|
|
(hash-ref variants "en"))
|
|
(else #f)))
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; goal : Return all translations active for the configured wiki language.
|
|
; pre : config is a wiki-config value.
|
|
; post : Translation override page, when available, has only been read.
|
|
; result : A hash from translation symbols to strings.
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
(define (translations-for config)
|
|
(define language (current-language config))
|
|
(for/fold ((result (base-translations language)))
|
|
(((key variants) (in-hash (database-overrides config))))
|
|
(define value (translation-override-for-language variants language))
|
|
(if value
|
|
(hash-set result key value)
|
|
result)))
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; goal : Translate one UI key for the configured wiki language.
|
|
; pre : key is a symbol.
|
|
; post : Translation data has only been read.
|
|
; result : The translated string, or the symbolic key when no translation exists.
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
(define (tr config key)
|
|
(hash-ref (translations-for config) key (symbol->string key)))
|