fix(l10n): Rephrasing some exceptions to be translated#47782
Conversation
susnux
left a comment
There was a problem hiding this comment.
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.
| // 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.
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 🫣 |
provokateurin
left a comment
There was a problem hiding this comment.
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 <12234510+solracsf@users.noreply.github.com> fix: tests Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: Fix tests Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
cb810fe to
dcbe8da
Compare
|
/backport to stable30 |
Checklist