Skip to content
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

Closed
wants to merge 11 commits into from

Conversation

bergart
Copy link
Member

@bergart bergart commented Sep 6, 2017

This feature adds a language selection in the attendee section.

attendeelanguage

@bergart bergart added 3. to review Waiting for reviews sidebar labels Sep 6, 2017
@@ -51,7 +51,8 @@ app.factory('SimpleEvent', function () {
'cutype',
'cn',
'delegated-from',
'delegated-to'
'delegated-to',
'lang'
Copy link
Member

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 :)

Copy link
Member

@georgehrke georgehrke left a 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

@georgehrke
Copy link
Member

Please extend the contacts API to combine it with the lang property if set, to automatically provide the correct language :)

https://tools.ietf.org/html/rfc6350#section-6.4.4

@georgehrke georgehrke added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Sep 6, 2017
@bergart
Copy link
Member Author

bergart commented Sep 6, 2017

Furthermore the language label is mispositioned. It looks like its related to [ ] Optional [ ] Does not attend

@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

@leonklingele leonklingele mentioned this pull request Sep 6, 2017
10 tasks
@jancborchardt
Copy link
Member

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:

  • avatar/placeholder
  • attendee name
  • 3-dot menu which triggers a popover with all the options there in a nice list
  • everything with proper padding

cc @nextcloud/designers @tcitworld @raghunayyar

return [];
}

$userLang = $this->config->getUserValue($userId, 'core', 'lang', $this->l10nFactory->findLanguage());

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.

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! :)

@georgehrke
Copy link
Member

Please rebase and fix the broken unit tests

@georgehrke
Copy link
Member

3-dot menu which triggers a popover with all the options there in a nice list

@jancborchardt We should put option-select blocks into the 3 dot menu? oO

@georgehrke
Copy link
Member

Before we add anything new there, the attendee list styling should be adjusted to be the same as in file sharing:

Generally: Yes, we have to refactor alarm and attendee to match that style, but this is out of scope for this PR

@jancborchardt
Copy link
Member

We should put option-select blocks into the 3 dot menu? oO

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.

@georgehrke
Copy link
Member

Is this for the invitation email?

Yes

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, that's why I asked @bergart to extend the calendar's contacts API to also include the LANG field, so it automatically chooses the right language. But I'm not even sure you can set the LANG field in the contacts app right now, so one should be able to correct it.

leonklingele-work pushed a commit that referenced this pull request Sep 12, 2017
@bergart
Copy link
Member Author

bergart commented Sep 13, 2017

@georgehrke broken unit tests are fixed, it ends with success. The LANGUAGE parameter is now shown in the iCal.

@jancborchardt this is just a feature, the UI part should be opened in a new issue / pull request

@jancborchardt
Copy link
Member

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.

georgehrke pushed a commit that referenced this pull request Jan 29, 2018
@georgehrke georgehrke mentioned this pull request Aug 15, 2018
@@ -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

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.

@georgehrke
Copy link
Member

Closing in favour of #1484

It should not be an input field, instead, this information should automatically be fetched from DAV / the address book.

@georgehrke georgehrke closed this Sep 13, 2019
@georgehrke georgehrke deleted the feature-attendee-language branch September 13, 2019 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants