Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I18n #102

Merged
merged 7 commits into from
Jan 7, 2021
Merged

I18n #102

merged 7 commits into from
Jan 7, 2021

Conversation

literarymachine
Copy link
Contributor

Fixes #79

@acka47
Copy link
Member

acka47 commented Oct 30, 2020

@dr0i please deploy on test.

@dr0i
Copy link
Member

dr0i commented Oct 30, 2020

Deployed to test.

@dr0i
Copy link
Member

dr0i commented Oct 30, 2020

Note to self:

  1. npm test fails because the port from .env is used (which is the same port used for the productive service running there). So change that .env-port temporarily for the sake of test.

  2. npm test did fail with:

✕ Should process a correct hook and create the files for a build (40030ms)
...
● processWebhooks › Should process a correct hook and create the files for a build
expect(received).toBe(expected) // Object.is equality
Expected: 0
Received: 1
111 | const dataDirContent = (await fs.readdir('data'))
112 | .filter(filename => filename !== '.gitignore')
> 113 | expect(dataDirContent.length).toBe(0)

Then I removed all files in test/data and did git checkout -- test/data/ and then npm test did succeed.
I compared the test/data before and after the removing of the files there - but there was no difference. Weird.

@dr0i
Copy link
Member

dr0i commented Oct 30, 2020

I am not "that fluent" in javascript to say the least, so I cannot review properly.
But let me ask some conceptual question: it's not needed to trigger the gatsby build with npm run build when w have the webhook running, right? Because the latter would trigger the build of the vocabularies and expose these, right? (if that`s true I would note this in the README).

@dr0i
Copy link
Member

dr0i commented Oct 30, 2020

Re "super strange weird test/data": just read the README to do a "rm -rf .cache after changes in data/ which may also be true for test/data/ and which would explain the weirdness.

@dr0i dr0i mentioned this pull request Nov 3, 2020
This fixes the issue of broken links in the language switcher at the cost of
causing a hard reload when swithing languages.
@dr0i
Copy link
Member

dr0i commented Dec 4, 2020

Redeployed.
Note that, although the daemon comes up, an error message appeared in the logs:

npm ERR! code ELIFECYCLE

This error vanished when doing echo 65536 | sudo tee -a /proc/sys/fs/inotify/max_user_watches.
It seems similar too #104 . Although I am not aware of the effects of this npm ERR I will add the fixes as hints into the README.
Opened #112 for this.

@acka47
Copy link
Member

acka47 commented Dec 4, 2020

Redeployed.
Note that, although the daemon comes up, an error message appeared in the logs:

npm ERR! code ELIFECYCLE

I think this is the same error as in #79 (comment)

@dr0i
Copy link
Member

dr0i commented Dec 4, 2020

Correction:
although a tail -f logs/skohub-vocabs.log didn't reveal the mentioned npm ERR a cat on the log shows that it's still there, so the "fix" using max_user_watches didn't help. Also npm cache clean --force; rm -rf node_modules package-lock.json didn't help.
As the daemon (that's the webhookserver) shows up we might ignore this.
But there are other problems showing in the log, which I only experience on test:

UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat '/home/lod/git/skohub-vocabs/src/../public/'
at Object.statSync (fs.js:932:3)
at Object.statSync (/home/lod/git/skohub-vocabs/node_modules/graceful-fs/polyfills.js:307:34)

The public directory indeed does not exist, but then it also doesn't exist on production.
It should be created when npm run build is done to Run the static site generator, but that's not done in scripts/start.sh.
I am a bit in the dark here maybe you can brighten this up a bit @literarymachine ?

@acka47
Copy link
Member

acka47 commented Dec 4, 2020

The current status is that it says the build is triggered but the build page is empty, see https://test.skohub.io/build/?id=93625061-84f5-4182-8f8a-677209bcce4e

grafik

@acka47 acka47 assigned literarymachine and unassigned acka47 Dec 4, 2020
@dr0i
Copy link
Member

dr0i commented Dec 4, 2020

I think this is the same error as in #79 (comment)

no, this ERR is showing always up when starting via the start script:

npm ERR! code ELIFECYCLE
npm ERR! errno 143
npm ERR! [email protected] listen: node src/webHookServer.js
npm ERR! Exit status 143
npm ERR!·
npm ERR! Failed at the [email protected] listen script.

I wil at least note this at the server to not forget to just ignore this.

@acka47
Copy link
Member

acka47 commented Jan 4, 2021

@dr0i, please redeploy to test once again.

@dr0i
Copy link
Member

dr0i commented Jan 4, 2021

Redeployed.

@dr0i dr0i assigned acka47 and unassigned literarymachine Jan 4, 2021
@acka47
Copy link
Member

acka47 commented Jan 4, 2021

Looks good now from a functional perspective. Please add code review and deploy to production.

@dr0i
Copy link
Member

dr0i commented Jan 4, 2021

I am not "that fluent" in javascript to say the least, so I cannot review properly.

If this is ok, though, I can deploy it anyway.

@acka47
Copy link
Member

acka47 commented Jan 5, 2021

@fsteeg, do you want to take a look? Otherwise I am ok with deploying it directly.

@acka47
Copy link
Member

acka47 commented Jan 5, 2021

Please deploy, then, @dr0i .

@dr0i dr0i merged commit ded957f into master Jan 7, 2021
@dr0i
Copy link
Member

dr0i commented Jan 7, 2021

Deployed to production, closed.

@dr0i dr0i deleted the 79-i18n branch January 7, 2021 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Internationalization/localization of a vocab
4 participants