Bug 66616 - French: Misleading HTTP 401 error description ("La requête nécessite une authentification HTTP.")
Summary: French: Misleading HTTP 401 error description ("La requête nécessite une auth...
Status: VERIFIED FIXED
Alias: None
Product: Tomcat 10
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 10.1.9
Hardware: All All
: P2 normal (vote)
Target Milestone: ------
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-26 20:13 UTC by Philippe Cloutier
Modified: 2023-06-09 21:40 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Cloutier 2023-05-26 20:13:43 UTC
When a resource requires HTTP auth, Tomcat understandably returns an HTTP 401 status code. In French, the result is the following when no credentials are provided:
> État HTTP 401 – Non autorisé
> Type Rapport d'état

> description La requête nécessite une authentification HTTP.

> Apache Tomcat/8.5.85

While the sentence may not be valid/clear, one understands that credentials are missing.

Unfortunately, the result (including the description) is exactly the same no matter what caused an 401 error. This understandably causes confusion when invalid credentials are provided.

This issue does not exist in English, where the description remains constant, but is vague enough to cover both situations:
> The request has not been applied because it lacks valid authentication credentials for the target resource.

The French version used to correspond to the English, but did not follow after a 2017 change in r1779641: https://svn.apache.org/viewvc?view=revision&revision=1779641

One challenge is that French does not have an equivalent as clear and canonical as "login credentials" to my knowledge. One possible up-to-date translation would be:
> La requête n'a pas été appliquée car elle n'a pas d'informations d'authentification valides pour la ressource cible.

However, "applying a request" does not seem valid to me, and I would rather recommend changing the English version to "has not been treated", "has not been processed" or "has not been granted", and the French translation to:
> La requête n'a pas été traitée car elle n'a pas d'informations d'authentification valides pour la ressource cible.

...or:
> La requête a été refusée car elle n'a pas d'informations d'authentification valides pour la ressource cible.

This persists in the most current code: 
https://github.com/apache/tomcat/blob/main/java/org/apache/catalina/valves/LocalStrings_fr.properties#L53
vs https://github.com/apache/tomcat/blob/main/java/org/apache/catalina/valves/LocalStrings.properties#L55
Comment 1 Mark Thomas 2023-05-29 07:30:11 UTC
The English text has been taken directly from RFC 9110. While I agree the language is a little odd, I prefer keeping the message aligned with the RFC.

Translations do not have to be literal. It is the sense that is important so the French can be changed if a different translation is a better translation of the sense of the message then it can be changed.

Translations of Tomcat messages are managed via POEditor. Anyone can create an account and submit an updated translation. Links for POEditor and a description of how we keep the translations in sync is on the wiki:

https://cwiki.apache.org/confluence/display/TOMCAT/Managing+translations

Closing as MOVED as that is the closest state we have to "You can fix this yourself at POEditor".
Comment 2 Philippe Cloutier 2023-05-30 13:52:27 UTC
Ah, I never suspected that; thank you very much for that precious piece of information Mark. I reported that in https://www.rfc-editor.org/errata/eid7530

I don't even have an account at POEditor and surely can't fix this myself, but I think French should stick to the English version as much as possible, if only to make it easier to accurately translate from French to another language. Thanks for the information anyway, I might submit a revision if the English version gets fixed.
Comment 3 Mark Thomas 2023-05-31 06:20:42 UTC
As per the errata discussion, requests are applied to resources (that terminology is used throughout RFC 9110) so the current English text will not be changed.

The French and Spanish translations have been removed in POEditor for "http.401.desc" since they do not convey the correct meaning. The English will be used until such time updated translations are provided. Given we have committers who are fluent in French and Spanish that will probably be quite soon.

The updated translations will be merged from POEditor shortly before the next set of release tags.
Comment 4 Philippe Cloutier 2023-06-09 21:40:57 UTC
There are issues with the new translation which were duly reported, but it is no longer misleading.
Thanks Mark