jnavila / git-manpages-l10n

Translation of git manpages
GNU General Public License v2.0
310 stars 212 forks source link

git-svn(zh_HANS-CN): avoid bogus `file://` link #106

Closed dscho closed 5 months ago

dscho commented 5 months ago

The way the description is currently written, there is no space after the file:// in the translation, even if there is a space there in the original.

This is important because the way AsciiDoc is parsed, a missing space will mistake the text for being an actual hyperlink, see e.g. here. At the time of writing, this bogus link can be experienced on Git's home page:

image

However, the "domain name" is quite bogus seeing as it reads, according to Bing Translate:

access), but want to publish in metadata with public

which is obviously not a valid domain name.

Firefox is smart enough to realize that this is not a valid domain name, and "auto-fixes" it to file:///. However, Edge (and therefore most likely Chrome, too), as well as link checkers such as Lychee translate this into an internationalized domain name starting with the "ASCII-Compatible Encoding" prefix "xn--" which is immediately followed by a closing parenthesis, i.e. an invalid character in internet host/domain names, but at least Lychee tries to follow it nevertheless:

file://xn--),-ry2c56bzyech9a071b11ispsycrp191dutgptg8hx808c0kpb/

Let's clearly separate file:// from the next word and avoid letting AsciiDoc mark this as a hyperlink.

jnavila commented 5 months ago

Thanks for the report. The checks need to be muscled on this kind of issues...