-
Notifications
You must be signed in to change notification settings - Fork 301
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
Adding a test for Translatable #107
Conversation
Adding a test to check the capacity to add a new language/value for an existing translatable entity. At the time of this commit, there is an issue as the test fails (all new language/values are added to "en" language)
Of course the Travis test fails, the test is here to proove that there is a failure with Translatable... |
This test shows that there is a really huge bug in this behavior. In fact, it is unusable for adding new translations, as soon as the "en" translation exists. The fact that writing and reading translations use the same method for getting a Translation object seems to be a problem : getting the default language Translation for reading is fine, but not for writing. |
I can confirm that this problem affects newbies- if the default translation exists, it is always returned when calling translate('otherlocale'). That is not obvious at all looking at the example in documentation. |
I have this exact same issue. |
I ended up using my own fork in composer to fix that issue since i don't have time to work on a much better fix... |
How did you fix the issue exactly? |
I use this patch : DerekRoth@b292f57 |
@chandon Could you add a code, that would make this test work, to this commit? I think it's necessary to keep test working, so it's ok to have a fix and test in one commit. E.g. inspire by @DerekRoth solution. |
Adding a test to check the capacity to add a new language/value for an
existing translatable entity.
At the time of this commit, there is an issue as the test fails (all new
language/values are added to "en" language)