Description

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]]

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.

Solutions

...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).

<Aside>

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: