Skip to content

Commit

Permalink
Revert "Consolidate localisation config (UniversalViewer#906)"
Browse files Browse the repository at this point in the history
This reverts commit e9b5ccf.
  • Loading branch information
eliotjordan committed Jan 25, 2024
1 parent d74e34d commit b16edfe
Show file tree
Hide file tree
Showing 49 changed files with 10,601 additions and 781 deletions.
5 changes: 1 addition & 4 deletions src/content-handlers/iiif/IIIFContentHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,7 @@ export default class IIIFContentHandler extends BaseContentHandler<IIIFData>
}

// import the config file
let config = await (extension as any).loadConfig(
data.locales[0].name,
extension?.type.name
);
let config = await (extension as any).loadConfig(data.locales[0].name);

data.config = await that.configure(config);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import { IIIFResourceType } from "@iiif/vocabulary/dist-commonjs/";
import { Bools, Strings } from "@edsilv/utils";
import { Thumb, TreeNode, Range } from "manifesto.js";
import "./theme/theme.less";
import defaultConfig from "./config/config.json";
import { Config } from "./config/Config";
import defaultConfig from "./config/en-GB.json";

export default class Extension extends BaseExtension<Config>
implements IAVExtension {
Expand All @@ -35,6 +34,10 @@ export default class Extension extends BaseExtension<Config>
defaultConfig: Config = defaultConfig;
locales = {
"en-GB": defaultConfig,
"cy-GB": () => import("./config/cy-GB.json"),
"fr-FR": () => import("./config/fr-FR.json"),
"pl-PL": () => import("./config/pl-PL.json"),
"sv-SE": () => import("./config/sv-SE.json"),
};
lastAvCanvasIndex?: number;

Expand Down
320 changes: 320 additions & 0 deletions src/content-handlers/iiif/extensions/uv-av-extension/config/cy-GB.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,320 @@
{
"options": {
"allowStealFocus": false,
"authAPIVersion": 1,
"bookmarkThumbHeight": 150,
"bookmarkThumbWidth": 90,
"dropEnabled": true,
"footerPanelEnabled": true,
"headerPanelEnabled": true,
"leftPanelEnabled": true,
"limitLocales": false,
"metrics": [
{
"type": "sm",
"minWidth": 0
},
{
"type": "md",
"minWidth": 768
},
{
"type": "lg",
"minWidth": 1024
},
{
"type": "xl",
"minWidth": 1280
}
],
"multiSelectionMimeType": "application/zip",
"navigatorEnabled": true,
"openTemplate": "http://universalviewer.io?manifest={0}",
"overrideFullScreen": false,
"pagingEnabled": true,
"pagingOptionEnabled": true,
"pessimisticAccessControl": false,
"preserveViewport": false,
"rightPanelEnabled": true,
"saveUserSettings": false,
"clickToZoomEnabled": true,
"searchWithinEnabled": true,
"termsOfUseEnabled": false,
"theme": "uv-en-GB-theme",
"tokenStorage": "session",
"useArrowKeysToNavigate": false,
"zoomToSearchResultEnabled": true
},
"modules": {
"contentLeftPanel": {
"options": {
"autoExpandTreeEnabled": true,
"autoExpandTreeIfFewerThan": 20,
"branchNodesExpandOnClick": false,
"branchNodesSelectable": true,
"defaultToTreeEnabled": false,
"defaultToTreeIfGreaterThan": 0,
"elideCount": 40,
"expandFullEnabled": true,
"galleryThumbChunkedResizingThreshold": 400,
"galleryThumbHeight": 320,
"galleryThumbLoadPadding": 3,
"galleryThumbWidth": 200,
"oneColThumbHeight": 320,
"oneColThumbWidth": 200,
"pageModeEnabled": true,
"panelAnimationDuration": 250,
"panelCollapsedWidth": 30,
"panelExpandedWidth": 255,
"panelOpen": true,
"tabOrder": "",
"thumbsEnabled": true,
"thumbsExtraHeight": 8,
"thumbsImageFadeInDuration": 300,
"thumbsLoadRange": 15,
"treeEnabled": true,
"twoColThumbHeight": 150,
"twoColThumbWidth": 90
},
"content": {
"collapse": "Lleihau'r Cynnwys",
"collapseFull": "Lleihau'r Galeri",
"date": "Dyddiad",
"expand": "Ehangu'r Cynnwys",
"expandFull": "Ehangu'r Galeri",
"index": "Mynegai",
"searchResult": "{0} canlyniad chwilio",
"searchResults": "{0} canlyniad chwilio",
"sortBy": "Trefnu yn ôl:",
"thumbnails": "Bodluniau",
"title": "Cynnwys",
"volume": "cyfrol"
}
},
"dialogue": {
"topCloseButtonEnabled": false,
"content": {
"close": "Cau"
}
},
"footerPanel": {
"options": {
"bookmarkEnabled": false,
"downloadEnabled": true,
"embedEnabled": false,
"feedbackEnabled": false,
"fullscreenEnabled": true,
"minimiseButtons": true,
"moreInfoEnabled": true,
"openEnabled": false,
"printEnabled": false,
"shareEnabled": true
},
"content": {
"bookmark": "Ychwanegu at nodau tudalen",
"download": "Lawrlwytho",
"embed": "Ymgorffori",
"exitFullScreen": "Dianc o'r sgrin lawn",
"feedback": "Adborth",
"fullScreen": "Sgrin lawn",
"moreInfo": "Mwy o Wybodaeth",
"open": "Agor",
"share": "Rhannu"
}
},
"genericDialogue": {
"content": {
"emptyValue": "rhowch rif",
"invalidNumber": "Rhowch rif dilys",
"noMatches": "Dim canlyniad sy'n cyfateb.",
"ok": "GWELD",
"pageNotFound": "Nid yw'r eitem yn cynnwys tudalen gyda'r rhif a nodwyd. Ceisiwch cyfnewid y math i 'delwedd'.",
"refresh": "Ailosod"
}
},
"headerPanel": {
"options": {
"localeToggleEnabled": false,
"settingsButtonEnabled": true
},
"content": {
"settings": "Dewisiadau"
}
},
"helpDialogue": {
"content": {
"text": "testun i'w osod",
"title": "Cymorth"
}
},
"moreInfoRightPanel": {
"options": {
"canvasDisplayOrder": "",
"canvasExclude": "",
"copyToClipboardEnabled": false,
"manifestDisplayOrder": "",
"manifestExclude": "",
"panelAnimationDuration": 250,
"panelCollapsedWidth": 30,
"panelExpandedWidth": 255,
"panelOpen": false,
"rtlLanguageCodes": "ar, ara, dv, div, he, heb, ur, urd",
"showAllLanguages": false,
"textLimit": 4,
"textLimitType": "lines",
"limitToRange": false
},
"content": {
"attribution": "Priodoledd",
"collapse": "Lleihau'r Wybodaeth",
"collapseFull": "Cuddio'r Galeri",
"description": "Disgrifiad",
"expand": "Ehangu'r Wybodaeth",
"expandFull": "Ehangu'r Galeri",
"holdingText": "Eich modiwl fan hyn!",
"less": "llai",
"license": "Trwydded",
"logo": "Logo",
"more": "mwy",
"noData": "Nid oes data i'w arddangos",
"page": "Tudalen",
"title": "Mwy o Wybodaeth",
"manifestHeader": "Am yr eitem",
"canvasHeader": "Am y ddelwedd",
"copyToClipboard": "Copïo i'r clipfwrdd",
"copiedToClipboard": "Copïwyd i'r clipfwrdd"
}
},
"avCenterPanel": {
"options": {
"autoPlay": false,
"includeParentInTitleEnabled": false,
"posterImageRatio": 0.3,
"subtitleMetadataField": "contributor",
"titleEnabled": true,
"subtitleEnabled": true
},
"content": {
"attribution": "Priodoledd",
"currentTime": "Amser Presennol",
"delimiter": " - ",
"duration": "Hyd",
"mute": "Mudo",
"next": "Nesaf",
"pause": "Seibiant",
"play": "Chwarae",
"previous": "Blaenorol"
}
},
"settingsDialogue": {
"content": {
"locale": "Iaith",
"navigatorEnabled": "Ffenest llywio ar gael",
"clickToZoomEnabled": "Cliciwch gyda'r llygoden i glosio",
"pagingEnabled": "Arddangos dwy dudalen",
"reducedMotion": "Lleihau symudiad (analluogi animeiddiadau)",
"preserveViewport": "Cadw'r lefel o glosio",
"title": "Dewisiadau",
"website": "<a href='https://github.com/universalviewer/universalviewer#contributors'>mwy o wybodaeth</a>"
}
},
"shareDialogue": {
"options": {
"embedTemplate": "<iframe src=\"{0}\" width=\"{1}\" height=\"{2}\" allowfullscreen frameborder=\"0\"></iframe>",
"instructionsEnabled": false,
"shareFrameEnabled": true
},
"content": {
"customSize": "dewisol",
"embed": "Ymgorffori",
"embedInstructions": "Er mwyn ymgorffori'r eitem hon ar eich gwefan, copïwch a gosodwch y cod isod.",
"height": "Hyd",
"iiif": "Maniffest IIIF",
"share": "Rhannu",
"shareInstructions": "Er mwyn rhannu'r eitem hon, copïwch y URL isod.",
"size": "Maint:",
"width": "Lled"
}
},
"clickThroughDialogue": {
"content": {
"viewTerms": "Darllenwch y Telerau a'r Amodau Llawn"
}
},
"downloadDialogue": {
"content": {
"currentViewAsJpg": "Delwedd ddethol {0} x {1}px (jpg)",
"currentViewAsJpgExplanation": "Agor mewn dwy ffenest newydd.",
"download": "Lawrlwytho",
"downloadSelection": "Lawrlwytho'r detholiad",
"downloadSelectionExplanation": "Agor ffenest er mwyn dewis tudalennau i'w lawrlwytho.",
"editSettings": "Golygu'r dewisiadau",
"entireDocument": "Y Ddogfen Gyfan ({0})",
"entireFileAsOriginal": "Y ffeil gyfan",
"entireFileAsOriginalWithFormat": "Y ffeil gyfan ({0})",
"noneAvailable": "Nid oes unrhyw opsiynau lawrlwytho ar gael.",
"pagingNote": "Dad-ddewiswch 'Arddangos Dwy Dudalen' i weld dewisiadau pellach.",
"preview": "Rhagolwg",
"title": "Lawrlwytho",
"wholeImageHighRes": "Delwedd gyfan {0} x {1}px ({2})",
"wholeImageHighResExplanation": "Agor mewn ffenest newydd",
"wholeImagesHighRes": "Delweddau cyfan ({0})",
"wholeImagesHighResExplanation": "Agor mewn dwy ffenest newydd.",
"wholeImageLowResAsJpg": "Delwedd gyfan {0} x {1}px (jpg)",
"wholeImageLowResAsJpgExplanation": "Agor mewn ffenest newydd"
}
},
"loginDialogue": {
"content": {
"login": "Mewngofnodi",
"logout": "Allgofnodi",
"cancel": "Canslo"
}
},
"mobileFooterPanel": {
"content": {
"rotateRight": "Cylchdroi i'r dde",
"moreInfo": "Mwy o Wybodaeth",
"zoomIn": "Closio",
"zoomOut": "Gwrthglosio"
}
},
"restrictedDialogue": {
"content": {
"cancel": "Canslo"
}
}
},
"localisation": {
"label": "Cymraeg",
"locales": [
{
"name": "cy-GB",
"label": "Cymraeg"
},
{
"name": "en-GB",
"label": "English (GB)"
},
{
"name": "fr-FR",
"label": "Français (FR)"
},
{
"name": "pl-PL",
"label": "Polski"
},
{
"name": "sv-SE",
"label": "Svenska"
}
]
},
"content": {
"authCORSError": "Mae angen diweddaru'ch porwr er mwyn galluogi rhannu adnoddau traws-safle.",
"authorisationFailedMessage": "Ni lwyddoch i fewngofnodi. Rhowch gynnig arni eto.",
"canvasIndexOutOfRange": "Canfas yn rhy fawr i'w arddangos (ceisiwch eto)",
"forbiddenResourceMessage": "Nid yw'ch hawliau mynediad presennol yn ddigonol i weld y ddelwedd hon",
"termsOfUse": "Telerau Defnydd"
}
}
Loading

0 comments on commit b16edfe

Please sign in to comment.