From b43448f071d604724a1068ed983c14d6abb2df23 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Tue, 16 Aug 2022 15:16:45 +0200 Subject: [PATCH 1/2] add language selection for app provider --- ...ncement-app-provider-language-selection.md | 8 ++++++++ docs/services/app-registry/apps.md | 20 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 changelog/unreleased/enhancement-app-provider-language-selection.md diff --git a/changelog/unreleased/enhancement-app-provider-language-selection.md b/changelog/unreleased/enhancement-app-provider-language-selection.md new file mode 100644 index 00000000000..0a2dca3c3c1 --- /dev/null +++ b/changelog/unreleased/enhancement-app-provider-language-selection.md @@ -0,0 +1,8 @@ +Enhancement: Added language option to the app provider + +We've added an language option to the app provider which will in the +end be passed to the app a user opens so that the web ui is displayed in the users language. + +https://github.com/owncloud/ocis/pull/4399 +https://github.com/cs3org/reva/pull/3156 +https://github.com/owncloud/ocis/issues/4367 diff --git a/docs/services/app-registry/apps.md b/docs/services/app-registry/apps.md index e9726849cb7..457e2294fb1 100644 --- a/docs/services/app-registry/apps.md +++ b/docs/services/app-registry/apps.md @@ -245,12 +245,21 @@ See error cases for [Open a file with the app provider](#open-a-file-with-the-ap - `write`: user can edit and download in the opening app - `read`: user can view and download from the opening app - `view`: user can view in the opening app (download is not possible) +- `lang` (optional) + - default (not given): default language of the application (which might maybe use the browser language) + - possible value is any ISO 639-1 language code. Examples: + - de + - en + - es + - ... **Request examples**: ```bash curl -X POST 'https://ocis.test/app/open?file_id=ZmlsZTppZAo=' +curl -X POST 'https://ocis.test/app/open?file_id=ZmlsZTppZAo=&lang=de' + curl -X POST 'https://ocis.test/app/open?file_id=ZmlsZTppZAo=&app_name=Collabora' curl -X POST 'https://ocis.test/app/open?file_id=ZmlsZTppZAo=&view_mode=read' @@ -362,6 +371,17 @@ HTTP status code: 200 } ``` +- invalid language code + + HTTP status code: 400 + + ```json + { + "code": "INVALID_PARAMETER", + "message": "lang parameter does not contain a valid ISO 639-1 language code" + } + ``` + ### Creating a file with the app provider **Endpoint**: specified in the capabilities in `new_file_url`, currently `/app/new` From 771e7e8e345353fd7378cb232738c18e5f3ad502 Mon Sep 17 00:00:00 2001 From: Willy Kloucek <34452982+wkloucek@users.noreply.github.com> Date: Thu, 18 Aug 2022 11:41:42 +0200 Subject: [PATCH 2/2] fix typo Co-authored-by: Benedikt Kulmann --- .../unreleased/enhancement-app-provider-language-selection.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/unreleased/enhancement-app-provider-language-selection.md b/changelog/unreleased/enhancement-app-provider-language-selection.md index 0a2dca3c3c1..35fb7b8bef1 100644 --- a/changelog/unreleased/enhancement-app-provider-language-selection.md +++ b/changelog/unreleased/enhancement-app-provider-language-selection.md @@ -1,6 +1,6 @@ Enhancement: Added language option to the app provider -We've added an language option to the app provider which will in the +We've added a language option to the app provider which will in the end be passed to the app a user opens so that the web ui is displayed in the users language. https://github.com/owncloud/ocis/pull/4399