-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix(CalDAV): imip set language per user #55473
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, We will address this in a separate PR, the L10n should automatically determine the format and pick the correct language
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.
Is there a ticket/PR for that @SebastianKrupinski?
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.
Ticket: #56624
|
/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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Sure, I've made the attendee property a required one.
ChristophWurst
left a comment
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.
Please have a look at the two open conversations
Looks good otherwise
b74aecb to
fe7b057
Compare
Signed-off-by: SebastianKrupinski <[email protected]>
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)