What is the problem?
If logged into SVGTranslate with a user who does not have reupload rights on Commons, when attempting to upload a translation the user sees:
500: Internal Server Error A file with this name already exists, and cannot be overwritten. If you still want to upload your file, please go back and use a new name. [[File:2D_Polar_2.svg|thumb|center|2D_Polar_2.svg]]
It is not necessarily obvious to the user what the problem is.
According to https://commons.wikimedia.org/wiki/Commons:Autoconfirmed_users, on Commons users do not have the reupload right until their account is over 4 days old. If a user creates an account especially to use SVGTranslate, they may hit this problem and not know what to do.
A new user could still upload their own SVG file and submit translations to it, as this is determined by a different right: reupload-own.
...might be tricky as I believe the above error message is returned from MediaWiki.
Moreover, SVGTranslate is not aware of which rights a user has.
However, perhaps it could find out through the API? Then show its own error message. Or prevent the user from uploading, telling them why and how to rectify it (e.g. ask an admin to give them the right).
Steps to reproduce problem
- Create a new user on Commons
- Find an SVG file on Commons
- Attempt to upload a translation
Expected behavior: A helpful error message. Or, perhaps the user is prevented from uploading and told why.
Observed behavior: The above error message.
Apart from the above, there are a number of other reasons a user might not be able to upload a translations. I have investigated a couple of others. So far, the behaviour seems reasonable, as the user is informed more precisely what the issue is. There are probably more to investigate.
If a user is attempting to upload a translation to a protected file, they see:
500: Internal Server Error This page has been protected to prevent editing or other actions.
If attempting to translate a file while blocked from editing, they see:
500: Internal Server Error You have been blocked from editing.