fix(CalDAV): imip set language per user#55473
Conversation
| } | ||
| // fallback to attendee LANGUAGE parameter if language not set | ||
| if ($language === null && isset($attendee['LANGUAGE']) && $attendee['LANGUAGE'] instanceof Parameter) { | ||
| $language = $attendee['LANGUAGE']->getValue(); |
There was a problem hiding this comment.
Note that LANGUAGE parameters are RFC5646 language tags (e.g de-DE), while our language system seems to be using ISO 15897 (e.g de_DE). We should do best effort to try to convert those.
There was a problem hiding this comment.
Hi, We will address this in a separate PR, the L10n should automatically determine the format and pick the correct language
|
/backport to stable32 |
|
/backport to stable31 |
8c36b9b to
b74aecb
Compare
| $locale = $this->config->getUserValue($user->getUID(), 'core', 'locale', null); | ||
| } | ||
| // fallback to attendee LANGUAGE parameter if language not set | ||
| if ($language === null && isset($attendee['LANGUAGE']) && $attendee['LANGUAGE'] instanceof Parameter) { |
There was a problem hiding this comment.
IDE is giving me some warnings about $attendee might be null. Could we maybe wrap every code that depends on $attendee != null in a if block? That would make it easier to understand the whole flow.
There was a problem hiding this comment.
It appears that we are initializing $this->l10n in the constructor with the defaults. Could we change setL10n to setL10nByAttendeed and make $attendeed not nullable and check if not null one level above?
There was a problem hiding this comment.
Sure, I've made the attendee property a required one.
ChristophWurst
left a comment
There was a problem hiding this comment.
Please have a look at the two open conversations
Looks good otherwise
b74aecb to
fe7b057
Compare
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
fe7b057 to
345140a
Compare
|
The backport to # Switch to the target branch and update it
git checkout stable31
git pull origin stable31
# Create the new backport branch
git checkout -b backport/55473/stable31
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 345140ac
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/55473/stable31Error: Failed to check for changes with origin/stable31: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
Summary
Checklist
3. to review, feature component)stable32)