slowe / VirtualSky

A browser-based planetarium that can be customised and embedded in web pages.
http://slowe.github.io/VirtualSky/
245 stars 94 forks source link

German language problem #94

Closed RoamingSquirrel closed 1 year ago

RoamingSquirrel commented 1 year ago

This is a very good application.

One small issue, German is listed as a supported language but it looks like the json file for German is missing so the application fails if German is chosen as a language option.

RoamingSquirrel commented 1 year ago

I think that the problem lies in the difference between the virtualsky.js and the virtualsky.min.js files.

In the virtualsky.js files, the languages referenced are: ar, cs, de, en, es, fr, gl, it, nl, pl, pt In the virtualsky.min.js file, the languages references are: ar, cs, en, es, fr, it, nl, pt

slowe commented 1 year ago

@RoamingSquirrel Sorry for only just finding this comment now. AFAIK the German language does load e.g. https://slowe.github.io/VirtualSky/embed?lang=de It uses the German language file at https://github.com/slowe/VirtualSky/blob/gh-pages/lang/de.json Do you have more details about the specific scenario in which it doesn't work?

RoamingSquirrel commented 1 year ago

No worries thanks, I figured it out ... the problem lies in the difference between the virtualsky.js and the virtualsky.min.js files. In the virtualsky.js file the code includes: this.langs = { 'ar': { "language": {"name": "العربية","alignment": "right" } }, 'cs': { "language": {"name": "Čeština","alignment": "left" } }, 'de': { "language": {"name": "Deutsch","alignment": "left" } }, 'en': { "language": {"name": "English","alignment": "left" } }, 'es': { "language": {"name": "Español","alignment": "left" } }, 'fr': { "language": {"name": "Français","alignment": "left" } }, 'gl': { "language": {"name": "Galego","alignment": "left" } }, 'it': { "language": {"name": "Italiano","alignment": "left" } }, 'nl': { "language": {"name": "Nederlands","alignment": "left" } }, 'pl': { "language": {"name": "Polski","alignment": "left" } }, 'pt': { "language": {"name": "Português","alignment": "left" } }, }; Whereas in the virtualsky.min.js file the code only includes: this.langs={ ar:{language:{name:"العربية",alignment:"right"}}, cs:{language:{name:"Čeština",alignment:"left"}}, en:{language:{name:"English",alignment:"left"}}, es:{language:{name:"Español",alignment:"left"}}, fr:{language:{name:"Français",alignment:"left"}}, it:{language:{name:"Italiano",alignment:"left"}}, nl:{language:{name:"Nederlands",alignment:"left"}}, pt:{language:{name:"Português",alignment:"left"}}, }; It works fine using the virtualsky.js file.