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 for app provider #4399

Merged
merged 2 commits into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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