From f7cf5cf5c1d1f2132842f4a1c97f294c9c28d9cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20M=C3=A4hr?= Date: Thu, 13 Apr 2023 17:26:22 +0200 Subject: [PATCH 1/2] feat: de translations for gui elements added --- _config.yml | 2 + _data/translations.yml | 308 +++++++++++++++++++++++++++ _includes/data-download-modal.html | 48 ++--- _includes/feature/audio.html | 2 +- _includes/feature/nav-menu.html | 2 +- _includes/feature/pdf.html | 2 +- _includes/feature/video.html | 2 +- _includes/footer.html | 6 +- _includes/head/head.html | 2 +- _includes/head/item-meta.html | 8 +- _includes/head/page-meta.html | 12 +- _includes/index/carousel.html | 6 +- _includes/index/data-download.html | 22 +- _includes/index/description.html | 4 +- _includes/index/objects.html | 15 +- _includes/index/time.html | 6 +- _includes/item/audio-player.html | 2 +- _includes/item/breadcrumbs.html | 4 +- _includes/item/browse-buttons.html | 6 +- _includes/item/citation-box.html | 6 +- _includes/item/download-buttons.html | 2 +- _includes/item/image-gallery.html | 2 +- _includes/item/rights-box.html | 6 +- _includes/item/video-player.html | 2 +- _includes/js/browse-js.html | 7 +- _includes/js/lunr-js.html | 4 +- _includes/js/table-js.html | 6 +- _includes/nav-search-lunr.html | 4 +- _includes/scroll-to-top.html | 4 +- _layouts/browse.html | 12 +- _layouts/data.html | 2 +- _layouts/default.html | 2 +- _layouts/home-infographic.html | 9 +- _layouts/search.html | 20 +- _layouts/timeline.html | 2 +- assets/lib/datatables/de.json | 243 +++++++++++++++++++++ 36 files changed, 677 insertions(+), 115 deletions(-) create mode 100644 _data/translations.yml create mode 100644 assets/lib/datatables/de.json diff --git a/_config.yml b/_config.yml index cc960442..41794c8e 100644 --- a/_config.yml +++ b/_config.yml @@ -28,6 +28,8 @@ description: "CollectionBuilder-CSV is a template for creating digital collectio keywords: idaho;history;inland northwest # creator of the digital collection, to appear in meta tags; we typically use our GitHub usernames but feel free to just use your name author: CollectionBuilder +# language of the website (en or de are currently the only supported languages and you have to adjust the language in the _data folder and in the pages folder accordingly) +lang: en ########## # COLLECTION SETTINGS diff --git a/_data/translations.yml b/_data/translations.yml new file mode 100644 index 00000000..31365853 --- /dev/null +++ b/_data/translations.yml @@ -0,0 +1,308 @@ +includesFeatureAudio: + audioNotSupported: + en: "Your browser does not support the audio element." + de: "Ihr Browser unterstützt das Audio-Element nicht." +includesFeatureNavMenu: + techLinkLabel: + en: "Tech" + de: "Tech" +includesFeaturePdf: + pdfNotRendering: + en: 'The PDF is not rendering in your browser.' + de: 'Das PDF wird in Ihrem Browser nicht angezeigt.' + pdfDownload: + en: 'Download PDF' + de: 'PDF herunterladen' +includesFeatureVideo: + videoNotSupported: + en: "Your browser does not support the embedded video." + de: "Ihr Browser unterstützt das eingebettete Video nicht." +includesHeadItemMeta: + itemFrom: + en: "Item from" + de: "Objekt von" +includesIndexCarousel: + previous: + en: "Previous" + de: "Vorherige" + next: + en: "Next" + de: "Nächste" + slide: + en: "Slide" + de: "Slide" +includesIndexDataDownload: + title: + en: "Collection as Data (click to download)" + de: "Sammlung als Daten (zum Herunterladen klicken)" + metadata: + en: "Metadata" + de: "Metadaten" + subjects: + en: "Subjects" + de: "Themen" + geodata: + en: "Geodata" + de: "Geodaten" + locations: + en: "Locations" + de: "Orte" + timeline: + en: "Timeline" + de: "Zeitachse" + facets: + en: "Facets" + de: "Facetten" + sourceCode: + en: "Source Code" + de: "Quellcode" +includesIndexDescription: + title: + en: "Description" + de: "Beschreibung" + learnMore: + en: "Learn more" + de: "Mehr erfahren" +includesIndexObjects: + images: + en: "Images" + de: "Bilder" + audio: + en: "Audio" + de: "Audio" + videos: + en: "Videos" + de: "Videos" + pdfs: + en: "PDFs" + de: "PDFs" + records: + en: "Records" + de: "Datensätze" + files: + en: "Files" + de: "Dateien" + viewTable: + en: "View Table" + de: "Tabelle anzeigen" +includesIndexTime: + title: + en: "Time Span" + de: "Zeitspanne" + from: + en: "from" + de: "von" + to: + en: "to" + de: "bis" + viewTimeline: + en: "View Timeline" + de: "Zeitachse anzeigen" +includesItemAudioPlayer: + audioNotSupported: + en: "Your browser does not support the audio element." + de: "Ihr Browser unterstützt das Audio-Element nicht." +includesItemBreadcrumbs: + home: + en: "Home" + de: "Startseite" + items: + en: "Items" + de: "Objekte" +includesItemBrowseButtons: + previous: + en: "Previous" + de: "Vorheriges" + next: + en: "Next" + de: "Nächstes" + backToBrowse: + en: "Back to Browse" + de: "Zurück zur Übersicht" +includesItemCitationBox: + title: + en: "Source" + de: "Quelle" + preferredCitation: + en: "Preferred Citation" + de: "Bevorzugte Zitation" + referenceLink: + en: "Reference Link" + de: "Referenzlink" +includesItemDownloadButton: + download: + en: "Download" + de: "Herunterladen" +includesItemImageGallery: + clickToViewFullScreen: + en: "Click to view full screen" + de: "Klicken Sie, um den Vollbildmodus zu aktivieren" +includesItemRightsBox: + title: + en: "Rights" + de: "Rechte" + rights: + en: "Rights" + de: "Rechte" + rightsstatement: + en: "Standardized Rights" + de: "Rechteerklärung" +includesItemVideoPlayer: + videoNotSupported: + en: "Your browser does not support the embedded video." + de: "Ihr Browser unterstützt das eingebettete Video nicht." +includesJsBrowseJs: + viewFullRecord: + en: "View Full Record" + de: "Vollständigen Datensatz anzeigen" +includesJsLunrJs: + results: + en: "Result(s) found" + de: "Ergebnisse" +includesCollectionBanner: + downloadButton: + en: "Download Data" + de: "Daten herunterladen" + title: + en: "Collection Data" + de: "Sammlungsdaten" + description: + en: "The collection data is available for download in a variety of formats." + de: "Die Sammlungsdaten können in verschiedenen Formaten heruntergeladen werden." + completeMetadata: + en: "Complete Metadata" + de: "Vollständige Metadaten" + completeMetadataDescription: + en: "All metadata fields for all collection items, available as a CSV spreadsheet (usable in Excel, Google Sheets, and similar programs) or JSON file (often used with web applications)." + de: "Alle Metadatenfelder für alle Sammlungsobjekte, als CSV-Tabelle (verwendbar in Excel, Google Sheets und ähnlichen Programmen) oder JSON-Datei (oft mit Webanwendungen verwendet)." + metadata: + en: "Metadata" + de: "Metadaten" + metadataFacets: + en: "Metadata Facets" + de: "Metadaten Facetten" + metadataFacetsDescription: + en: "List of unique values and their count for specific metadata fields, useful for understanding content of the fields." + de: "Liste der eindeutigen Werte und ihrer Anzahl für bestimmte Metadatenfelder, die für das Verständnis des Inhalts der Felder nützlich ist." + subjectMetadata: + en: "Subject Metadata" + de: "Metadaten Themen" + subjectMetadataDescription: + en: "Unique values and counts of subject metadata, useful for further analyzing the content of this collection." + de: "Eindeutige Werte und Zählungen von Themenmetadaten, die für die weitere Analyse des Inhalts dieser Sammlung nützlich sind." + subjects: + en: "Subjects" + de: "Themen" + locations: + en: "Locations" + de: "Orte" + locationsDescription: + en: "Unique values and counts of location metadata, useful for further visualization and analysis of this collection's place names." + de: "Eindeutige Werte und Zählungen von Ortsmetadaten, die für die weitere Visualisierung und Analyse der Ortsnamen dieser Sammlung nützlich sind." + geodataDescription: + en: 'Metadata for all collection items that have geographic coordinates in GeoJSON format, useful for further exploration and analysis of this collection through a geographical lense.' + de: 'Metadaten für alle Sammlungsobjekte, die geographische Koordinaten im GeoJSON-Format haben, die für die weitere Exploration und Analyse dieser Sammlung durch eine geographische Linse nützlich sind.' + geodata: + en: "Geodata" + de: "Geodaten" + timeline: + en: "Timeline" + de: "Zeitachse" + timelineDescription: + en: 'A time-focused JSON data export designed for use with TimelineJS.' + de: 'Ein zeitbezogener JSON-Datenexport, der für die Verwendung mit TimelineJS konzipiert ist.' + websiteSourceCode: + en: "Website Source Code" + de: "Quellcode der Website" + websiteSourceCodeDescription: + en: 'GitHub repository containing source code for this project built with CollectionBuilder-CSV.' + de: 'GitHub-Repository mit dem Quellcode für dieses Projekt, das mit CollectionBuilder-CSV.' + sourceCode: + en: "Source Code" + de: "Quellcode" +includesFooter: + home: + en: "Home" + de: "Startseite" + builtWith: + en: "built with" + de: "erstellt mit" + lastUpdated: + en: "Last updated" + de: "Zuletzt aktualisiert" +includesNavSearchLunr: + search: + en: "Search" + de: "Suche" + searchBox: + en: "Search Box" + de: "Suchefeld" +includesScrollToTop: + backToTop: + en: "Back to Top" + de: "Zurück nach oben" + upArrow: + en: "Up Arrow" + de: "Pfeil nach oben" +layoutsBrowse: + search: + en: "Search" + de: "Suche" + filter: + en: "Filter" + de: "Filter" + filterItems: + en: "Filter Items" + de: "Objekte filtern" + reset: + en: "Reset" + de: "Zurücksetzen" + sortBy: + en: "Sort by" + de: "Sortieren nach" + random: + en: "Random" + de: "Zufällig" + loading: + en: "Loading" + de: "Laden" +layoutsData: + link: + en: "Link" + de: "Link" +layoutsHomeInfographic: + sampleItems: + en: "Sample Items" + de: "Beispielobjekte" + topSubjects: + en: "Top Subjects" + de: "Top-Themen" + locations: + en: "Locations" + de: "Orte" +layoutsSearch: + searchOptions: + en: "Search Options" + de: "Suchoptionen" + lunrSearchOptions: + en: "Lunr Search Options" + de: "Lunr-Suchoptionen" + options: + en: '

These advanced options can be added to your query in the search box to refine your results:

' + de: '

Diese erweiterten Optionen können im Suchfeld zu Ihrer Anfrage hinzugefügt werden, um Ihre Ergebnisse zu verfeinern:

' + search: + en: "Search" + de: "Suche" + searchTerm: + en: "Enter your search term..." + de: "Geben Sie Ihren Suchbegriff ein..." + lunrSearchDescription: + en: '

Unscharfe Suche unterstützt von Lunr.js. Das Laden großer Sammlungen kann eine Sekunde dauern!

' + de: '

Unscharfe Suche angetrieben von Lunr.js. Kann eine Sekunde dauern, um große Sammlungen zu laden!

' + googleSearchDescription: + en:

Alternatively, try Google CSE site search.

+ de:

Alternativ dazu können Sie die Google CSE die Site-Suche.

+layoutsTimeline: + year: + en: "Year" + de: "Jahr" \ No newline at end of file diff --git a/_includes/data-download-modal.html b/_includes/data-download-modal.html index 94388af3..8c31005a 100644 --- a/_includes/data-download-modal.html +++ b/_includes/data-download-modal.html @@ -6,34 +6,34 @@ {%- endcomment -%} {%- assign stubs = site.data.config-nav | map: 'stub' | join: ';' -%} - + @@ -80,7 +80,7 @@ // calculate item link itemLink = '{{ '/items/' | relative_url }}' + carouselItems[i][1] + '.html'; // create indicator - indicator = ``; + indicator = ``; // create slide slide = ` \ No newline at end of file diff --git a/_includes/index/time.html b/_includes/index/time.html index 2224c113..0d98a8d0 100644 --- a/_includes/index/time.html +++ b/_includes/index/time.html @@ -3,9 +3,9 @@ {%- assign date-range = clean-years | remove: " " | split: ";" | uniq | sort -%}
-
Time Span
-

{{ date-range | first }} to {{ date-range | last }} -
View Timeline +

{{ site.data.translations['includesIndexTime']['title'][site.lang] }}
+

{{ site.data.translations['includesIndexTime']['from'][site.lang] }} {{ date-range | first }} {{ site.data.translations['includesIndexTime']['to'][site.lang] }} {{ date-range | last }} +
{{ site.data.translations['includesIndexTime']['viewTimeline'][site.lang] }}

diff --git a/_includes/item/audio-player.html b/_includes/item/audio-player.html index 8b50aba6..b63cb219 100644 --- a/_includes/item/audio-player.html +++ b/_includes/item/audio-player.html @@ -1,4 +1,4 @@ \ No newline at end of file diff --git a/_includes/item/breadcrumbs.html b/_includes/item/breadcrumbs.html index 6194e14c..79e288f9 100644 --- a/_includes/item/breadcrumbs.html +++ b/_includes/item/breadcrumbs.html @@ -5,7 +5,7 @@ {%- endcomment -%} \ No newline at end of file diff --git a/_includes/item/browse-buttons.html b/_includes/item/browse-buttons.html index e78078e1..24efae94 100644 --- a/_includes/item/browse-buttons.html +++ b/_includes/item/browse-buttons.html @@ -5,9 +5,9 @@ {%- endcomment -%}
diff --git a/_includes/item/citation-box.html b/_includes/item/citation-box.html index dcf4e64e..0857205d 100644 --- a/_includes/item/citation-box.html +++ b/_includes/item/citation-box.html @@ -1,10 +1,10 @@
-
Source
+
{{ site.data.translations['includesItemCitationBox']['title'][site.lang] }}
-
Preferred Citation:
+
{{ site.data.translations['includesItemCitationBox']['preferredCitation'][site.lang] }}:
"{{ page.title }}", {{ site.title }}, {{ site.organization-name }}
-
Reference Link:
+
{{ site.data.translations['includesItemCitationBox']['referenceLink'][site.lang] }}:
{{ page.url | absolute_url }}
diff --git a/_includes/item/download-buttons.html b/_includes/item/download-buttons.html index a746fe44..ba4c0d98 100644 --- a/_includes/item/download-buttons.html +++ b/_includes/item/download-buttons.html @@ -1,4 +1,4 @@ -Download {{ page.format | split: '/' | last | upcase }} +{{ site.data.translations['includesItemDownloadButton']['download'][site.lang] }} {{ page.format | split: '/' | last | upcase }} {% if page.date %}{%- capture year -%}{% if page.date contains "-" %}{{ page.date | split: "-" | first }}{% elsif page.date contains "/" %}{{ page.date | split: "/" | last }}{% else %}{{ page.date }}{% endif %}{%- endcapture -%} View on Timeline{% endif %} {% if page.latitude and page.longitude %} diff --git a/_includes/item/image-gallery.html b/_includes/item/image-gallery.html index 2c599bc1..462d3136 100644 --- a/_includes/item/image-gallery.html +++ b/_includes/item/image-gallery.html @@ -6,5 +6,5 @@ {%- endcomment -%} diff --git a/_includes/item/rights-box.html b/_includes/item/rights-box.html index bcb51d1f..0dfd7faf 100644 --- a/_includes/item/rights-box.html +++ b/_includes/item/rights-box.html @@ -1,10 +1,10 @@
-
Rights
+
{{ site.data.translations['includesItemRightsBox']['title'][site.lang] }}
- {% if page.rights %}
Rights:
+ {% if page.rights %}
{{ site.data.translations['includesItemRightsBox']['rights'][site.lang] }}:
{{ page.rights }}
{% endif %} - {% if page.rightsstatement %}
Standardized Rights:
+ {% if page.rightsstatement %}
{{ site.data.translations['includesItemRightsBox']['rightsstatement'][site.lang] }}:
{{ page.rightsstatement }}
{% endif %}
diff --git a/_includes/item/video-player.html b/_includes/item/video-player.html index a72bdce4..4c7b975f 100644 --- a/_includes/item/video-player.html +++ b/_includes/item/video-player.html @@ -1,6 +1,6 @@
\ No newline at end of file diff --git a/_includes/js/browse-js.html b/_includes/js/browse-js.html index c23321cb..567b4435 100644 --- a/_includes/js/browse-js.html +++ b/_includes/js/browse-js.html @@ -1,7 +1,11 @@ {%- assign items = site.data[site.metadata] | where_exp: 'item','item.objectid' -%} {%- assign fields = site.data.config-browse -%} +{%- assign viewFullRecord = site.data.translations['includesJsBrowseJs']['viewFullRecord'][site.lang] -%} + \ No newline at end of file diff --git a/_includes/scroll-to-top.html b/_includes/scroll-to-top.html index 1a5b2d3b..9c01e308 100644 --- a/_includes/scroll-to-top.html +++ b/_includes/scroll-to-top.html @@ -16,8 +16,8 @@ }); } - - + + +
@@ -20,10 +20,10 @@