Skip to content

Commit

Permalink
Merge pull request #4399 from wkloucek/language-selection-for-app-pro…
Browse files Browse the repository at this point in the history
…vider

add language selection for app provider
  • Loading branch information
wkloucek committed Aug 18, 2022
2 parents c271c9a + 771e7e8 commit a3f7768
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Enhancement: Added language option to the app provider

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
https://github.com/cs3org/reva/pull/3156
https://github.com/owncloud/ocis/issues/4367
20 changes: 20 additions & 0 deletions docs/services/app-registry/apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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`
Expand Down

0 comments on commit a3f7768

Please sign in to comment.