Test fail for missing translation key

NodeBB Development
  • Swedes

    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-GB folder. This file to be precise, /admin/settings/notifications.json.

    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 en-US and sv files, but that is the extent of my language abilities.

  • Swedes

    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?

  • GNU/Linux

    @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 it() block in tests/i18n.js, and check that tests pass. If they do, then open the PR, we'll still merge if the i18n test fails 😄

  • Swedes

    @julian Okay, I'll do that. Thanks!

Suggested Topics

| | | |