Skip to content

[BUG ?] Passing tests in french #3105

Closed

Description

@pierreclr

Hi there, I'm trying to pass the loopback tests in order to make my PR properly.

Some of them are not passing because it expect 'erreur inconnue' to be equal 'unknown error' for example. Indeed, error class expectations are base on regex (and not 'instance of') which is problematic regarding to the automatic translation ..

Maybe the best way would be to set automatically the lang to en in the test environnement

Any help or explanation will be welcomed for how to do so !

However I override the french translation file with the english one and my tests passed excepted this one : (message which doesn't appear to be on intl/fr/message.json (is this handled in an other level ?)

capture d ecran 2017-01-16 a 13 59 39

Activity

  1. loay commented on Jan 16, 2017

    @loay
    Contributor

    Hi @pierreclr
    Can you send a pr with the updated proper error message in French so the test passes?
    Also, I am not sure if I understand the scenario of the error message. You just switched the language to French and you got one failed test? Can you please give a little bit more details? Thanks.

  2. pierreclr commented on Jan 16, 2017

    @pierreclr
    ContributorAuthor

    No : A lot of test do not pass because of the translation system.

    However for my PR's needs I delete the translation file in intl/fr/message.json and then put the english one for replacing. Then I launch the tests and having only one (the one you can see on the screenshot) which is failing.

    You can try it by switching your system to french (I didn't figure out how to set loopback's language to english ..)

  3. loay commented on Jan 24, 2017

    @loay
    Contributor

    Hi @pierreclr
    In order to set your language to English, you have 2 options as indicated here:
    https://github.com/strongloop/strong-globalize#demo

    I will switch my system to French, then test and get back to you
    Thanks.

  4. self-assigned this
    on Jan 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions