versx / PoGoEventWatcher

12 stars 11 forks source link

de.json locale missing and en.json not populated correctly #22

Open svenberg opened 1 year ago

svenberg commented 1 year ago

I pulled master branch for the first time and encountered an issue with the npm run create-locales command;

crippe@vm-front:~/EventWatcher$ npm run create-locales

> eventwatcher@2.0.6 create-locales
> npm run build && node ./dist/services/create-locales.js

> eventwatcher@2.0.6 build
> tsc -p tsconfig.json

node:fs:585
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open '/home/crippe/EventWatcher/static/locales/de.json'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at /home/crippe/EventWatcher/dist/services/create-locales.js:26:24
    at Generator.next (<anonymous>)
    at /home/crippe/EventWatcher/dist/services/create-locales.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/home/crippe/EventWatcher/dist/services/create-locales.js:4:12)
    at /home/crippe/EventWatcher/dist/services/create-locales.js:24:55
    at Array.map (<anonymous>)
    at /home/crippe/EventWatcher/dist/services/create-locales.js:24:39 {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/home/crippe/EventWatcher/static/locales/de.json'
}

Issue with de.json: I have not checked why it fails to download de.json as this file actually exists. The workaround for me was to download de.json manually.

Issue with en.json: The en.json file was downloaded but not populated correctly. It held about 40 lines with data like "poke_415": "poke_415", so no actual translations. Workaround was to download the en.json file manually as well. BUT! As I write this, I was unable to replicate. Creating the locales downloads en.json properly now. As MC0REBE posted the same issue on Discord and also explained in #21 I figured I kept the en.json issue here.