-
Notifications
You must be signed in to change notification settings - Fork 65
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
Decide/handle behavior for accessing untranslated/unpublished translation pages #2052
Comments
A couple questions @ggeisler.
|
Ideally it should apply to the default language scenario as well (i.e., I'm viewing a Spanish About page and change locale to English/default lang and that page is not published in English). The language refs in the flash message would just be reversed ("The page you requested is not available in English. View page in Spanish").
Man, this gets complicated. Not sure this is already clear but what I intended in my mockup was actually that the link "View page in English" is a link back to the page the user was one when changing the locale (covering the scenario where the page is more important to the user than changing the locale). So I think the page we link to must be published, because they were already on it before changing the locale, right? If so, there is still the clarification that ideally, the link doesn't always say "View page in English" (or whatever the default language is). What it says is "View page in [previous locale]". So the page we link to is the page they were redirected from, in the locale they were in before changing to the locale that caused the error. Maybe changing the linked string to "View that page in [previous locale]" (added "that") makes what will happen a bit more clear.
If my answer to (2) makes sense, then I think we can always be sure there is a valid page to link to, because it was the page the user was on before changing locales. |
Would this then only apply if there are multiple languages in the exhibit? If not, then we would be changing the current behavior for exhibit's who don't care about multilingual translations at all. Is this suggesting that we want to change this behavior in general for all pages?
I understand that, but from a functional perspective there is no difference between a user getting to that page from switching locales vs. them getting there in any other way. So technically a user could get to a Spanish translated page that was unpublished/deleted and its English equivalent has also been unpublished. It may be unlikely, but in that scenario we may end up throwing an error or rending a dead link.
|
No, no, I'm just suggesting the behavior should be the same no matter what languages the user is switching to and from. But if the site doesn't have multiple languages I don't think there is any reason to apply the behavior there.
Okay, I see. Is it feasible to check the validity of the page we want to link to before presenting the link (maybe what you were asking originally)? If so, we could link as suggested in my mockup if we know the page exists, and if it isn't a valid page (for the current user), just leave off the link? In that case we're at least telling the user that the requested page isn't valid, and we let them figure out how they want to proceed from the exhibit homepage. |
See #2047 for more context/conversation.
Scenario
When on an English version page a user switches the language (using the locale switcher).
Current Behavior
Desired Behavior (as described in #2047)
Note: an acceptable answer to this is that this should be a local application customization. Just using this as an opportunity to experiment with the code needed to accomplish this and to start that discussion
The text was updated successfully, but these errors were encountered: