I am able to solve the first issue. I needed to add checks in map.tpl instead of relying upon pure client-side JS solution.
Test fail for missing translation key
So I'm creating a pull-request for NodeBB core and one of the requests in the contribution guide is to make sure that the tests all pass. I had some issues setting it up properly but now it works except for one part of the tests.
This one to be precise. As I understand it tells me to add my newly created translation key in all language files. I'm using the
en-GBfolder. This file to be precise,
So my question is, how to I make sure that it gets put in all other language folders, in the correct file?
Is there a simple way of generating the files or do I need to do it manually? Do I skip this step and just make sure that the other tests work? Are these files generated somehow, using Transifex?
I can also add it to
svfiles, but that is the extent of my language abilities.
Okay I now found this.
So does that mean that I should suggest this key be added and wait with my request or that I should push it with language in template and update at a later point?
@magnusvhendin Thanks for contributing!
Yes, that particular test will fail if you add a language key to
en-GB. What usually happens is when the PR gets merged, nodebb-misty picks it up, and automatically commits the fallback strings.
So of course this doesn't happen in pull requests
For now, you can comment out the last
tests/i18n.js, and check that tests pass. If they do, then open the PR, we'll still merge if the i18n test fails
@julian Okay, I'll do that. Thanks!