-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
[v4] New translations
root
#6216
Conversation
e3a4ad8
to
984ee0f
Compare
5008f62
to
a7df158
Compare
a7df158
to
296ba48
Compare
if ($this->translationsObject()->root() !== null) { | ||
$this->translationsObject() | ||
->save($data['translations'] ?? []); | ||
$data['translations'] = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it make sense to even unset it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems setting empty array is correct.
With set empty array:
<?php
return [
'code' => 'en',
'default' => true,
'direction' => 'ltr',
'locale' => [
'LC_ALL' => 'en_US'
],
'name' => 'EN',
'translations' => [
],
'url' => NULL
];
With unseting:
<?php
return [
'code' => 'en',
'default' => true,
'direction' => 'ltr',
'locale' => [
'LC_ALL' => 'en_US'
],
'name' => 'EN',
'url' => NULL
];
af8afd6
to
b713cd0
Compare
I didn't understand the unit test coverage. For ex: I added Codecov: |
b713cd0
to
5861b51
Compare
@lukasbestle @afbora To be honest, I find the v4 version very confusing with the duality of the |
This PR …
This is K4 version of #6212. Doesn't include a breaking change.
Fixes
Features
translations
rootBreaking changes
None
Ready?
For review team