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

Language Selection doesn't always switch language #23456

Closed
3 tasks done
IamJeffG opened this issue Mar 22, 2023 · 13 comments
Closed
3 tasks done

Language Selection doesn't always switch language #23456

IamJeffG opened this issue Mar 22, 2023 · 13 comments
Assignees
Labels
#bug Bug report

Comments

@IamJeffG
Copy link

IamJeffG commented Mar 22, 2023

Language Selection doesn't always switch language

How to reproduce the bug

  1. Run superset with LANGUAGES set in config. I'm using LANGUAGES={"en": {"flag": "us", "name": "English"}, "pt_BR": {"flag": "br", "name": "Português"}, "es": {"flag": "mx", "name": "Español"}, "fr": {"flag": "fr", "name": "Français"}, "nl": {"flag": "sr", "name": "Nederlands"}}
  2. Open web browser. You can replicate this from any page, including before logging in.
  3. Click the flag in the top-right corner. Select a different language.
  4. The page flashes to refresh in the new language. Sometimes (not always) the language has changed, sometimes you are still seeing the old language!

Expected results

The page flash to refresh is fine. But afterward it should show in the language I just clicked on.

Actual results

Sometimes you are still seeing the old language after having clicked a different one. Specifically

  • the flag icon remains unchanged
  • the text strings on the rest of the page remain unchanged

Screenshots

Peek 2023-03-22 11-54

Environment

I did not see this bug when running from the docker image apache/superset:2.0.1
I do see this bug running from the docker image apache/superset:2.1.0rc3.

  • browser type and version: Firefox 111.0 (64-bit) on Linux. Also Chromium Version 111.0.5563.64 (Official Build) (64-bit) on Linux
  • superset version: Superset 2.1.0
  • python version: Python 3.8.16
  • node.js version:
$ docker exec -it superset_app node -v
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "node": executable file not found in $PATH: unknown
  • any feature flags active:
FEATURE_FLAGS = {
    "ALERT_REPORTS": True,
}

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
    • no errors, just logs from the /lang/nl (or whatever language code) route and other routes needed for the current page.
    • the /lang/nl route returns a 302 redirect with Location: /
  • I have reproduced the issue with at least the latest released version of superset.
    • no bug on 2.0.1
    • bug on 2.1.0rc3
  • I have checked the issue tracker for the same issue and I haven't found one similar.
@IamJeffG IamJeffG added the #bug Bug report label Mar 22, 2023
@IamJeffG
Copy link
Author

IamJeffG commented Mar 22, 2023

This might be less straightforward than stated above. I also see some slightly different (but still buggy) behaviors in addition to that described above.

  • Once in a blue moon, I'll select a different language; the current page won't change language, as described above. But then I navigate to a new page and that new page is in the desired language. This one is really hard to reproduce.
  • I've also seen cases where the page text does change to my new language but the flag icon doesn't:

Screenshot from 2023-03-22 13-41-22

@dawnmarch
Copy link

We encountered the same problem. Changing the language works fine in versions 2.0.0 and 2.0.1, but it doesn't work as expected in version 2.1.0rc3.

@evvs
Copy link

evvs commented Apr 18, 2023

We encountered the same problem. Changing the language works fine in versions 2.0.0 and 2.0.1, but it doesn't work as expected in version 2.1.0rc3.

We have the same issue. That's why we don't update to the latest version ☹️

@andrey-pervushin
Copy link

this bug is still actual

@mpostelnicu
Copy link

same issue in 2.1.1rc1

@eschutho eschutho self-assigned this Jul 6, 2023
@eschutho
Copy link
Member

eschutho commented Jul 6, 2023

Thank you for reporting this. We'll find someone to take a look, unless anyone else wants to open a PR for it.

@mpostelnicu
Copy link

still happening in 2.1.1rc2

@rusackas
Copy link
Member

rusackas commented Mar 6, 2024

I believe this was resolved by the linked PR, but the issue was never closed. Closing now, bu happy to revisit if needed.

@rusackas rusackas closed this as completed Mar 6, 2024
@AghastyGD
Copy link

this bug is still actual

yes, it's still with this

@rusackas
Copy link
Member

rusackas commented Jun 4, 2024

@AghastyGD in which version of Superset? I was able to switch languages no problem on current master

@AghastyGD
Copy link

AghastyGD commented Jun 5, 2024

@AghastyGD in which version of Superset? I was able to switch languages no problem on current master

@rusackas I am using the version 4.0.1 from PyPi Package, when I change to Brazilian the screen goes into blank with an infinite loading of superset logo

But it's working well in another languages like Portuguese Portugal

@rusackas
Copy link
Member

rusackas commented Jun 7, 2024

Weird... I'm on master but I'm able two switch between all languages, including both Portuguese variants. Are you getting any browser console errors or server errors or something? Do you have any customized Superset code that might not be handling redirects correctly?

@AghastyGD
Copy link

AghastyGD commented Jun 11, 2024

Hi, thank you for your assistance, I was making a small mistake in the language selection settings, I was using "br" instead of "pt-BR", I just changed that, and now it's working correctly. that's why it was giving me this error in the console:
image

just changed to this:
image

I'm sorry for any misunderstandings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report
Projects
None yet
Development

No branches or pull requests

8 participants