-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix(l10n): Rephrasing some exceptions to be translated #47782
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New messages seem to be fine.
Still I think we should not translate those errors, as this are not user facing exception (no HintException). Meaning those are developers only and translating them makes debugging log files much harder.
@@ -130,34 +130,34 @@ protected function generalCreateChecks(IShare $share, bool $isUpdate = false) { | |||
if ($share->getShareType() === IShare::TYPE_USER) { | |||
// We expect a valid user as sharedWith for user shares | |||
if (!$this->userManager->userExists($share->getSharedWith())) { | |||
throw new \InvalidArgumentException($this->l->t('SharedWith is not a valid user')); | |||
throw new \InvalidArgumentException($this->l->t('Share recipient is not a valid user')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think this should have been never be translated.
In the other side, if the user understands the Exception, he may be able to solve the situation without opening an issue... A coin has 2 sides 🫣 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @susnux, all non user facing error messages should not be translated. The fix is good though.
They can use a translator for that. The harder part is if we get a translated error message and have to figure out what the original message was. A translator might not give the exact original version and it is much harder to find the source (unless you got a stacktrace). |
But the user will not see this, or if they see it they can not fix it because those errors happen only because of invalid API usage -> broken apps or server -> if the user can fix it they are developers and probably should also understand English in our code base. On the otherhand as @provokateurin mentioned for us this makes reading issues / debugging much harder as we need to guess which error message was meant. |
Motivated by translation requirements or not (and whether for users or developers), I quite like the added clarity of these rephrasings. Good stuff! |
This comment was marked as resolved.
This comment was marked as resolved.
please merge |
a0f035e
to
cc0b521
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: Git'Fellow <[email protected]> fix: tests Signed-off-by: Git'Fellow <[email protected]> fix: Fix tests Signed-off-by: Git'Fellow <[email protected]>
cb810fe
to
dcbe8da
Compare
/backport to stable30 |
Checklist