tify-iiif-viewer / tify

TIFY is a slim and mobile-friendly IIIF document viewer.
GNU Affero General Public License v3.0
108 stars 27 forks source link

TIFY fails to load if translation is missing #170

Closed hrvoj3e closed 4 months ago

hrvoj3e commented 6 months ago

Using version 0.29.2

tify.js:14 Uncaught (in promise) Error: SyntaxError: Unexpected token '<', "<html>
<h"... is not valid JSON
    at tify.js:14:13438
(anonymous) @   tify.js:14
Promise.then (async)        

image

I see from README that fallbackLanguage is by default en but anyway the viewer will not load

fallbackLanguage: string, default 'en'

The language to be used for strings from the IIIF manifest that are not available in the current language. If no value matches language or fallbackLanguage, the first available language is displayed.


Using version 0.30.2

image

t11r commented 6 months ago

fallbackLanguage only concerns strings from the IIIF manifest, not the interface language.

The current behavior is intended, but I recognize that we could soften the impact by allowing TIFY to load if the translation is missing or invalid and just display an error message. Or maybe you have another suggestion?

hrvoj3e commented 6 months ago

My bad about fallbackLanguage - I just assumed it is for UI.

I suggest that you define a fallback for UI language.

Viewer should load in any case (never break) and EN is always available so user can see images (that is the point of this viewer).

t11r commented 6 months ago

Thanks! To keep things simple, I would stick to the previous language if loading a translation fails. This will be part of the next minor release.