-
Notifications
You must be signed in to change notification settings - Fork 244
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
Add language selection to attendee section #590
Conversation
js/app/models/simpleEventModel.js
Outdated
@@ -51,7 +51,8 @@ app.factory('SimpleEvent', function () { | |||
'cutype', | |||
'cn', | |||
'delegated-from', | |||
'delegated-to' | |||
'delegated-to', | |||
'lang' |
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.
RFC 5545 defines a language parameter which is also applicable to the Attendee property.
Please use officially defined parameter instead of a custom one :)
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.
Furthermore the language label is mispositioned. It looks like its related to [ ] Optional [ ] Does not attend
Please extend the contacts API to combine it with the lang property if set, to automatically provide the correct language :) |
@georgehrke you are right! There should be a line break. I will take a look at RFC 5545 & 6350 and adjust it to the notes |
Before we add anything new there, the attendee list styling should be adjusted to be the same as in file sharing: nextcloud/server#4136 That is:
cc @nextcloud/designers @tcitworld @raghunayyar |
return []; | ||
} | ||
|
||
$userLang = $this->config->getUserValue($userId, 'core', 'lang', $this->l10nFactory->findLanguage()); |
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.
Where does $userId
come from? It's not injected into the controller.
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.
Nevermind, it's inside the current scope. Everthing's fine! :)
Please rebase and fix the broken unit tests |
@jancborchardt We should put option-select blocks into the 3 dot menu? oO |
Generally: Yes, we have to refactor alarm and attendee to match that style, but this is out of scope for this PR |
To be honest I don’t know why this dropdown is necessary in the first place. Language should be determined by the user’s set system language. Is this for the invitation email? Ideally the language for sharees should be determined from their address setting in contacts or the personal profile. But not in a dropdown in each app. |
Yes
Yes, that's why I asked @bergart to extend the calendar's contacts API to also include the |
@georgehrke broken unit tests are fixed, it ends with success. The @jancborchardt this is just a feature, the UI part should be opened in a new issue / pull request |
The problem is that usually new features are added and then the polish is postponed and/or not done. As the interface in that part is already garbled enough I'd prefer we get it right before adding anything new. |
@@ -62,7 +62,8 @@ app.controller('AttendeeController', function($scope, AutoCompletionService) { | |||
'role': 'REQ-PARTICIPANT', | |||
'rsvp': 'TRUE', | |||
'partstat': 'NEEDS-ACTION', | |||
'cutype': 'INDIVIDUAL' | |||
'cutype': 'INDIVIDUAL', | |||
'language': OC.getLocale() // Use current user's timezone as a default value |
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.
Instead of OC.getLocale() for the default value the default should be the value of the user value 'core' 'lang'. When loading the page this can be added to the parameters by retrieving $this->config->getUserValue($user->getUID(), 'core', 'lang'); in viewcontroller.php.
Closing in favour of #1484 It should not be an input field, instead, this information should automatically be fetched from DAV / the address book. |
This feature adds a language selection in the attendee section.