Skip to content
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

[i18n] Offer some indication when a fallback page is being viewed? #5871

Open
chalin opened this issue Jan 4, 2025 · 2 comments
Open

[i18n] Offer some indication when a fallback page is being viewed? #5871

chalin opened this issue Jan 4, 2025 · 2 comments
Labels
discussion Input from everyone is helpful to drive this forward i18n internationalization

Comments

@chalin
Copy link
Contributor

chalin commented Jan 4, 2025

Here is part of a discussion from #otel-docs-localization. @EzzioMoreira wrote:

Hello, I noticed something strange with the concepts/instrumentation/zero-code doc. When I choose a different language in the opentelemetry documentation the zero-code page is not translated to the chosen language.
The PT team translated this page:: https://github.com/open-telemetry/opentelemetry.io/blob/main/content/pt/docs/concepts/instrumentation/zero-code.md

Here's my (@chalin) response:

Hi @Ezzio Moreira - the website docs are setup so that that each language shows the entire set of doc pages. When a page localization does not exist, Hugo uses the English version as a “fallback”.

This provides, in my opinion, for a smoother user experience where a reader can choose to never leaves their locale pages, and they get to seamlessly see those (sporadic) pages that have been translated.

The alternative is to have (large) page gaps and holes in the locale’s docs, and force the user to “leave” their locale docs and to enter the English locale. But then it is becomes more of a challenge for the reader to figure out which pages are available in the reader’s originally intended locale (they have to consult the language dropdown for each page). In the current scheme, if the page is translated, then it simply is shown as is.

I suspect that @EzzioMoreira's question will pop up again, and so it might be worth considering ways to make this clearer for site readers, though I'm not entirely convinced that it's worth the effort given that it is in a sense obvious when a page hasn't been translated. (Of course, the doubt that arises, as it did for @EzzioMoreira, is whether this is a bug or a feature.) In any case, I'm creating this issue as a place to discuss options, and track any implemented solution.

One rather radical solution would be to drop fallback pages. From a usability point of view, I don't think that that is the best solution, but I'm willing to entertain it.

Another might be to mark fallback page titles in a special way in all or some of the following places:

  • The locale/language drop-down menu
  • The page title
  • The linkTitle (hence the left-nav) page title
@chalin chalin added i18n internationalization discussion Input from everyone is helpful to drive this forward labels Jan 4, 2025
@vitorvasc
Copy link
Contributor

Hey, guys. Happy new year! 🍾

In this particular case, I've noticed that the path was changed from /concepts/instrumentation/zero-code.md to /concepts/instrumentation/zero-code/index.md, which resulted on showing the fallback translations for pages that were already translated.

Here is the PR that fixes it for both Portuguese and Japanese languages: #5882

I don't know if there are any other pages that might have changed also, I can take a look on it to see if I can find anything else.


However, about the discussion, it would be nice if we could show a small warning explaining that the translation for the requested page is not available yet.

@chalin
Copy link
Contributor Author

chalin commented Jan 6, 2025

Happy new year to you too @vitorvasc!

I'm leaning towards some indication that the page is a fallback too, though, as I mentioned, I'm still not entirely convinced that it is worth the implementation effort. Glad to discuss this at our next Comms meeting on Jan. 20.

As for the updates to the pt and ja pages, see #5882 (review). As I mention there,
for all the details about handling non-English page drift (which must be done with care), see Keeping track of localized-page drift.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Input from everyone is helpful to drive this forward i18n internationalization
Projects
Status: No status
Development

No branches or pull requests

2 participants