Closed drakhart closed 4 years ago
MagicMirror gets completely broken (black screen) when using Spanish language with MMM-MoonPhase.
MagicMirror should work fine, and MMM-MoonPhase should display texts in Spanish.
MagicMirror doesn't work at all (black screen). JavaScript console displays the following error:
Uncaught SyntaxError: Unexpected token / in JSON at position 0 at JSON.parse (<anonymous>) at XMLHttpRequest.xhr.onreadystatechange (translator.js:22)
Fix the Spanish translation file.
es
npm start
Operating system: Debian GNU/Linux 10 (buster) Node.js version: 12.17.0 MagicMirror version: 2.13.0 MMM-MoonPhase version: 1.0.1
The Spanish translation file, translations/es.json, starts with the following commented line:
translations/es.json
// Thanks to margaritamc
JSON files don't accept comments, only JSONC files do. Adding a comments to JSON renders it invalid.
Remove the commented line. Make sure that the resulting file is JSON compliant.
MagicMirror gets completely broken (black screen) when using Spanish language with MMM-MoonPhase.
Expected Behavior
MagicMirror should work fine, and MMM-MoonPhase should display texts in Spanish.
Current Behavior
MagicMirror doesn't work at all (black screen). JavaScript console displays the following error:
Possible Solution
Fix the Spanish translation file.
Steps to Reproduce
es
.npm start
.Context (Environment)
Operating system: Debian GNU/Linux 10 (buster) Node.js version: 12.17.0 MagicMirror version: 2.13.0 MMM-MoonPhase version: 1.0.1
Detailed Description
The Spanish translation file,
translations/es.json
, starts with the following commented line:JSON files don't accept comments, only JSONC files do. Adding a comments to JSON renders it invalid.
Possible Implementation
Remove the commented line. Make sure that the resulting file is JSON compliant.