Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example: Override UI labels / translations 🐱 #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
167 changes: 161 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -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);