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

Translate OCS Share API error messages #24027

Merged
merged 1 commit into from
Apr 26, 2016
Merged

Conversation

rullzer
Copy link
Contributor

@rullzer rullzer commented Apr 15, 2016

For #22209

Translat the error messages returned by the OCS Share API. This way clients can get properly translated messages if they want to show what the server returned.

CC: @nickvergessen @MorrisJobke @PVince81 @schiesbn

@DeepDiver1975
Copy link
Member

@MTRichards mind reviewing some strings again? THX

@nickvergessen
Copy link
Contributor

This will mostlikely break things again :-(

@MTRichards
Copy link
Contributor

MTRichards commented Apr 22, 2016

Ok, so the following changes - I think in two places in this pull request.

Public upload is only possible for public shared folders

Public upload is only possible for publicly shared folders

Invalid Date, format must be YYYY-MM-DD

Invalid date, date format must be YYYY-MM-DD

Sharing %s failed, because the backend does not allow shares from type %s

Sharing %s failed because the beck end does not allow shares from type %s

Wrong share Id, share doesn't exist

Wrong share ID, share doesn't exist

Public upload is only possible for public shared folders

Public upload is only possible for publicly shared folders

Can't change permission for public link share

Can't change permissions for public share links

@rullzer rullzer force-pushed the translate_ocs_share branch from 89a5db0 to f47b44e Compare April 25, 2016 05:45
@rullzer
Copy link
Contributor Author

rullzer commented Apr 25, 2016

thanks @MTRichards fixed.

@MorrisJobke
Copy link
Contributor

thanks @MTRichards fixed.

Please also fix the strings in the unit tests.

@rullzer
Copy link
Contributor Author

rullzer commented Apr 25, 2016

Ah right... to early... will take care...

@rullzer
Copy link
Contributor Author

rullzer commented Apr 25, 2016

Unit tests adjusted!

@MorrisJobke
Copy link
Contributor

MorrisJobke commented Apr 25, 2016

Sharing still work 👍

@PVince81
Copy link
Contributor

PVince81 commented Apr 25, 2016

This will mostlikely break things again :-(

@nickvergessen Please elaborate / help on this topic.

@rullzer
Copy link
Contributor Author

rullzer commented Apr 25, 2016

It is because some smash box test check for the error message. Since we have a very limited set of error codes.

@nickvergessen
Copy link
Contributor

Seems like I switched to status code last time, but better be save and run the full suite once:
https://github.com/owncloud/smashbox/blob/master/python/smashbox/utilities/__init__.py#L682-L684

I will do that now

@schiessle
Copy link
Contributor

Hm, in the past we agreed that public API responses shouldn't be translated, if I remember correctly. But in this case all API calls happen as a specific logged-in user, so it is probably OK.... 👍

@rullzer
Copy link
Contributor Author

rullzer commented Apr 26, 2016

@schiesbn O wasn't aware of that.
The issue here is that the response codes from the OCS Share API are to limited. So often clients will just display the error message from the server. It is weird if that is in english while the users might have a different language on their system.

@DeepDiver1975
Copy link
Member

@schiesbn O wasn't aware of that.
The issue here is that the response codes from the OCS Share API are to limited. So often clients will just display the error message from the server. It is weird if that is in english while the users might have a different language on their system.

Some releases back we did add the capability to read the client's language from the request and send back the messages in the asked language.

@DeepDiver1975 DeepDiver1975 merged commit 887045b into master Apr 26, 2016
@DeepDiver1975 DeepDiver1975 deleted the translate_ocs_share branch April 26, 2016 12:42
@lock
Copy link

lock bot commented Aug 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants