From 990c64f410dd929488734f1745d00e7519613fba Mon Sep 17 00:00:00 2001 From: Camille Villa Date: Mon, 30 Nov 2020 15:34:13 -0800 Subject: [PATCH] Provide translation examples --- src/index.js | 167 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 161 insertions(+), 6 deletions(-) diff --git a/src/index.js b/src/index.js index 941eebd..ad1bc55 100644 --- a/src/index.js +++ b/src/index.js @@ -1,15 +1,170 @@ import Mirador from 'mirador/dist/es/src/index'; import examplePlugin from './plugins/example_plugin'; +// Example: We have replaced all English UI strings with "MEOW" +// TASK: Override a string in a language of your choice const config = { - id: 'mirador-viewer', - windows: [ - { - manifestId: 'https://purl.stanford.edu/fr426cg9537/iiif/manifest', + id: 'mirador-viewer', + windows: [{ + manifestId: 'https://purl.stanford.edu/fr426cg9537/iiif/manifest', + }], + translations: { + en: { + "aboutMirador": "MEOW", + "aboutThisItem": "MEOW", + "addedFromUrl": "MEOW", + "addManifestUrl": "MEOW", + "addManifestUrlHelp": "MEOW", + "addResource": "MEOW", + "annotationCanvasLabel_1/1": "MEOW", + "annotationCanvasLabel_1/2": "MEOW", + "annotationCanvasLabel_2/2": "MEOW", + "annotations": "MEOW", + "attribution": "MEOW", + "attributionTitle": "MEOW", + "authenticationFailed": "MEOW", + "authenticationRequired": "MEOW", + "backToResults": "MEOW", + "book": "MEOW", + "bottom": "MEOW", + "cancel": "MEOW", + "canvasIndex": "MEOW", + "changeTheme": "MEOW", + "clearSearch": "MEOW", + "closeAddResourceForm": "MEOW", + "closeAddResourceMenu": "MEOW", + "closeCompanionWindow": "MEOW", + "closeWindow": "MEOW", + "collapseSection": "MEOW", + "collapseSidePanel": "MEOW", + "itemList": "MEOW", + "continue": "MEOW", + "copy": "MEOW", + "currentItem": "MEOW", + "currentItem_1/1": "MEOW", + "currentItem_1/2": "MEOW", + "currentItem_2/2": "MEOW", + "dark": "MEOW", + "digitizedView": "MEOW", + "dismiss": "MEOW", + "highlightAllAnnotations": "MEOW", + "displayNoAnnotations": "MEOW", + "downloadExport": "MEOW", + "downloadExportWorkspace": "MEOW", + "elastic": "MEOW", + "elasticDescription": "MEOW", + "emptyResourceList": "MEOW", + "error": "MEOW", + "errorDialogConfirm": "MEOW", + "errorDialogTitle": "MEOW", + "exitFullScreen": "MEOW", + "expandSection": "MEOW", + "expandSidePanel": "MEOW", + "exportCopied": "MEOW", + "fetchManifest": "MEOW", + "fullScreen": "MEOW", + "gallery": "MEOW", + "hideZoomControls": "MEOW", + "iiif_homepage": "MEOW", + "iiif_manifest": "MEOW", + "iiif_renderings": "MEOW", + "iiif_seeAlso": "MEOW", + "import": "MEOW", + "importWorkspace": "MEOW", + "importWorkspaceHint": "MEOW", + "item": "MEOW", + "jsError": "MEOW", + "jsStack": "MEOW", + "language": "MEOW", + "layer_hide": "MEOW", + "layer_move": "MEOW", + "layer_opacity": "MEOW", + "layer_show": "MEOW", + "layer_moveToTop": "MEOW", + "layers": "MEOW", + "light": "MEOW", + "links": "MEOW", + "listAllOpenWindows": "MEOW", + "login": "MEOW", + "logout": "MEOW", + "manifestError": "MEOW", + "maximizeWindow": "MEOW", + "minimizeWindow": "MEOW", + "mirador": "MEOW", + "miradorResources": "MEOW", + "miradorViewer": "MEOW", + "more": "MEOW", + "moreResults": "MEOW", + "mosaic": "MEOW", + "mosaicDescription": "MEOW", + "moveCompanionWindowToBottom": "MEOW", + "moveCompanionWindowToRight": "MEOW", + "nextCanvas": "MEOW", + "noItemSelected": "MEOW", + "numItems": "MEOW", + "off": "MEOW", + "openCompanionWindow_annotations": "MEOW", + "openCompanionWindow_attribution": "MEOW", + "openCompanionWindow_canvas": "MEOW", + "openCompanionWindow_info": "MEOW", + "openCompanionWindow_layers": "MEOW", + "openCompanionWindow_search": "MEOW", + "openInCompanionWindow": "MEOW", + "openWindows": "MEOW", + "pagination": "MEOW", + "position": "MEOW", + "previewWindowTitle": "MEOW", + "previousCanvas": "MEOW", + "related": "MEOW", + "resource": "MEOW", + "retry": "MEOW", + "right": "MEOW", + "rights": "MEOW", + "scroll": "MEOW", + "searchInputLabel": "MEOW", + "searchNextResult": "MEOW", + "searchNoResults": "MEOW", + "searchPreviousResult": "MEOW", + "searchSubmitAria": "MEOW", + "searchTitle": "MEOW", + "selectWorkspaceMenu": "MEOW", + "showingNumAnnotations": "MEOW", + "showCollection": "MEOW", + "showZoomControls": "MEOW", + "sidebarPanelsNavigation": "MEOW", + "single": "MEOW", + "startHere": "MEOW", + "suggestSearch": "MEOW", + "tableOfContentsList": "MEOW", + "theme": "MEOW", + "thumbnailList": "MEOW", + "thumbnailNavigation": "MEOW", + "thumbnails": "MEOW", + "toggleWindowSideBar": "MEOW", + "totalCollections": "MEOW", + "totalManifests": "MEOW", + "tryAgain": "MEOW", + "untitled": "MEOW", + "view": "MEOW", + "welcome": "MEOW", + "window": "MEOW", + "windowMenu": "MEOW", + "windowNavigation": "MEOW", + "windowPluginButtons": "MEOW", + "windowPluginMenu": "MEOW", + "workspace": "MEOW", + "workspaceNavigation": "MEOW", + "workspaceFullScreen": "MEOW", + "workspaceMenu": "MEOW", + "workspaceOptions": "MEOW", + "workspaceSelectionTitle": "MEOW", + "zoomIn": "MEOW", + "zoomOut": "MEOW", + "zoomReset": "MEOW", + } } - ], }; const plugins = []; -Mirador.viewer(config, plugins); +Mirador.viewer(config, plugins); \ No newline at end of file