w3c / wai-translations

Future home of translations guidance and information on translated resources
5 stars 5 forks source link

Language of links to other pages - shouldn't indicate the language of the destination #8

Closed r12a closed 5 years ago

r12a commented 5 years ago

? Leave the title in English and include in the link "(in English)" in that language, e.g., Stories of Web Users (en anglais)

This is a tricky one. Basically, it makes sense to warn readers if the link goes to a page that is not in the same language. However, adding '(en anglais)' could very quickly become incorrect when someone is providing French translations and translates that page. If a translation becomes available, you don't want to leave it there as it is likely to discourage people from following the link (that's why you put the warning there in the first place, right?), but searching for all links to the newly translated page in order to remove the 'en anglais' warning would quickly become extremely painful to maintain.

The only good solution i can think of is to automatically find out whether there is a translation of that resource in the same language, as the page is displayed, and modify the link text while the page is rendered. For the i18n pages, we could actually do something like that for our articles, i believe, because we are able to query whether a given article is translated or not into a given language, however we don't currently do so.

yatil commented 5 years ago

We will be able to test if a translation exists and automatically re-write the link when the page is generated. (I guess that is a todo for me :-D)

shawna-slh commented 5 years ago

@yatil, woo-hoo! great that you can automate the best user experience on this one!

Will that require extra code/markup around each link?

shawna-slh commented 5 years ago

In the wiki page, I moved this info to a new section: Language of links/resource titles within the content

@r12a & @yail — Do you agree with that's proposed there:

For WAI pages When the page is not available in the language of the translation, Title translated and include in the link "(in English)" in that language, e.g., "Quelques utilisateurs du Web (en anglais)"

What about links to non-WAI pages? Translate the title but don't include a language?

yatil commented 5 years ago

Will that require extra code/markup around each link?

Unfortunately, yes. (Links would look like {% include_cached link.html text="Linktext" path="/to/page/" class="(optional)" format="(optional)" %} or so. I don’t think it’ll be too bad in the end.)

notabene commented 5 years ago

+1 for automation

yatil commented 5 years ago

What about links to non-WAI pages? Translate the title but don't include a language?

If the link is in a sentence, it should be translated. If it is a stand-alone link, I lean towards keeping the English title w/lang=en&hreflang=en.

shawna-slh commented 5 years ago

I thought some more about the question of "don't include a language?", and @r12a 's original point "shouldn't indicate the language of the destination" because "could very quickly become incorrect when someone is providing French translations and translates that page".

My conclusion (for now) is:

I updated the section with a bit more thoughts: Language of links/resource titles within the content

Note: The question of whether navigation links are in English or translated is in a different issue: Language of site navigation.

This issue was about indicating the language or not. I think we've addressed that. Feel free to re-open this issue if you want us to consider other options.

r12a commented 5 years ago

Given the types of pages we link to, it would be extremely rare that we link to a page in English that later becomes available in the translated language.

Without reopening the issue, i'll just note here that it's quite probable that any i18n articles you link to will later become available in the translated language. ;-)

shawna-slh commented 5 years ago

Got it, @r12a.

I think the only i18n articles that WAI pages link to will be in our Instructions to Translators, e.g., https://www.w3.org/International/2004/06/translation-checklist (and it looks like that one is not translated at all -- which makes sense since most people using that content are translators who know English).