Skip to content

Return Additional Information With Status / Rejection Messages #6960

@markus101

Description

@markus101

Is there an existing issue for this?

  • I have searched the existing open and closed issues

Is your feature request related to a problem? Please describe

Currently status messages such as

item.Message = _localizationService.GetLocalizedString("DownloadClientQbittorrentTorrentStateError");
are translated while processing, which means all API consumers get the same translation. Additionally, rejections for Interactive Search or Manual Import are just text rejections that can't be used for filtering.

Describe the solution you'd like

We need to come up with a solution that allows for statuses and rejections to be returned via the API as an object instead of a string.

For rejections the API should return the rejection type (enum) and the translated status message. For status messages the message should be returned in addition to an enum representing the message.

Internally we should only translate when we're returning the result from the API, which would allow the API consumer to request a specific language instead of an app-wide setting that controls translations. We can pass around the translation token and any arguments to it to achieve this.

Describe alternatives you've considered

Nothing else is really worth considering.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions