From 3100ed1a29a1251efa9e6d8a7e591d1532ed98ef Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 21 Apr 2020 12:01:51 +0200 Subject: [PATCH] Add option display names --- .gitignore | 4 ++++ pkg/service/v0/service.go | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 299a09c29..9b9ecfed1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,9 @@ coverage.out +.idea /bin /dist /hugo + +/node_modules +/assets diff --git a/pkg/service/v0/service.go b/pkg/service/v0/service.go index 2f6788efe..705711a69 100644 --- a/pkg/service/v0/service.go +++ b/pkg/service/v0/service.go @@ -75,7 +75,7 @@ func ReportSettingsBundle(l *olog.Logger) { // TODO wrap this in an infinite for loop with a BREAK label to GOTO once the request succeed. svc := micro.NewService() svc.Init() - service := settings.NewBundleService("com.owncloud.ocis-settings", svc.Client()) // TODO fetch service name instead of hardcoding it. + service := settings.NewBundleService("com.owncloud.web.ocis-settings", svc.Client()) // TODO fetch service name instead of hardcoding it. // TODO avoid hardcoding these values, perhaps load them from a file and using jsonpb's type Marshal. createBundleRequest := settings.CreateSettingsBundleRequest{ @@ -92,16 +92,16 @@ func ReportSettingsBundle(l *olog.Logger) { SingleChoiceValue: &settings.SingleChoiceListSetting{ Options: []*settings.ListOption{ &settings.ListOption{ - Selected: true, Option: &settings.ListOption_StringValue{ StringValue: "Europe/Berlin", }, + DisplayValue: "Europe/Berlin", }, &settings.ListOption{ - Selected: false, Option: &settings.ListOption_StringValue{ StringValue: "Asia/Kathmandu", }, + DisplayValue: "Asia/Kathmandu", }, }, }, @@ -115,16 +115,16 @@ func ReportSettingsBundle(l *olog.Logger) { SingleChoiceValue: &settings.SingleChoiceListSetting{ Options: []*settings.ListOption{ &settings.ListOption{ - Selected: true, Option: &settings.ListOption_StringValue{ StringValue: "de_DE", }, + DisplayValue: "Deutsch", }, &settings.ListOption{ - Selected: false, Option: &settings.ListOption_StringValue{ StringValue: "en_EN", }, + DisplayValue: "English", }, }, },