mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-25 23:19:13 -06:00
add language selection for app provider
This commit is contained in:
@@ -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
|
||||
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user