-
Notifications
You must be signed in to change notification settings - Fork 288
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
amaGama returns a 404 with same language pairs #4759
Comments
amaGama itself avoids handling translation from same language to same language: https://github.com/translate/amagama/blob/master/amagama/tmdb.py#L441-L443 Perhaps this is not dealt with in the best way on the amaGama side, but the point is that Pootle should avoid sending requests for getting translation suggestion from a language to the same language. |
You might ask why this matters, but the use-case is actually important. I routinely "translate" new projects into the lang-en project as a review for i18n issues. Pootle conveniently allows me to flag strings as "Needs Work", with the understanding that the work needed is on i18n, not L10n. |
My understanding is that in that particular use-case results from amaGama are unnecessary. |
There are three aspects here:
|
@dwaynebailey , I think maybe a 400 Bad Request is better in this case? |
Just for reference https://en.wikipedia.org/wiki/List_of_HTTP_status_codes 400 might be better, but I haven't looked carefully at the available options. |
Landed the fix in fa7c118 to prevent querying amaGama if source and target language are the same. amaGama issues still to be addressed on amaGama side. |
Reopening this. Pootle will still fail if it gets a 404 as far as I can understand, so this is a workaround but its not fixing the core issue that Pootle won't fail correctly if amaGama is broken in some way. |
No, it won't fail. It will catch the error and will just display the message seen in the screenshot in the first message in the issue. See https://github.com/translate/pootle/blob/master/pootle/static/js/editor/app.js#L1056-L1079 for the shared handling code. |
From a translation perspective, I think if Amagama fails for whatever I am not sure if this is what happens but from a usability standpoint, this |
Created translate/amagama#3210 to track the amaGama side of things. |
Created #4771 to track the bigger issue with XHR request failures on Pootle. As a result I will be closing this issue. |
Use case-Improvement of template language messages. In this case, the user is translating the template languages (in English) to English.
When translating in the /en/ project, a request is issued to Amagama.
An error message results in Pootle due to the 404
Perhaps an HTTP 204 would be more appropriate?
The text was updated successfully, but these errors were encountered: