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

Enable i18n #3486

Merged
merged 8 commits into from Mar 18, 2024
Merged

Enable i18n #3486

merged 8 commits into from Mar 18, 2024

Conversation

pavish
Copy link
Member

@pavish pavish commented Mar 13, 2024

This PR Enables switching languages

Tasks:

  • Use system default for login page
  • After logging in, use value stored for user
  • Ensure both en and js get loaded in parallel
  • Add docs for building po files in Wiki (added in GH workflow to create draft release with built static files #3489)
  • Build .po files in Dockerfile
  • Show language switcher dropdown in password change page and superuser creation page? (Out of scope for this PR)
  • Test a production setup

UX considerations

  • Within the app, the language switcher is present in the profile page and users page.
    • Screenshot 2024-03-15 at 5 49 21 PM
  • When the user installs and runs Mathesar for the first time, the language is automatically chosen based on the locale of the browser.
  • In the super admin creation page, there's no option to switch languages.
    • Screenshot 2024-03-15 at 5 45 59 PM
  • In the login page, there's an option to switch languages.
    • Screenshot 2024-03-15 at 5 38 36 PM
  • Once the user logs in and sets their preference, it is retained in a cookie and the login page will choose the language based on that cookie, but the option is still present.
  • Do we need the option to switch languages in the login page?
  • Do we need this option in the super user creation page?
  • If yes to the above, should we hide that select menu until we visually style it? (It's currently the default select menu and the appearance varies based on the browser)

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the develop branch of the repository
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no
    visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@pavish pavish added this to the v0.1.6 milestone Mar 13, 2024
@pavish pavish added the pr-status: review A PR awaiting review label Mar 15, 2024
@pavish pavish marked this pull request as ready for review March 15, 2024 12:23
@pavish
Copy link
Member Author

pavish commented Mar 15, 2024

@ghislaineguerin @kgodey I've assigned you to review this PR to take a call on the UX considerations mentioned above for the language switcher that is visible on the login page, which was added as part of this PR.

Copy link
Contributor

@seancolsen seancolsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this out and it looks like it works great. Code changes look straightforward.

私たちのアプリケーションが日本語で表示されるのは本当にエキサイティングです!

...It's really exciting to see our application in Japanese!

@seancolsen seancolsen removed their assignment Mar 15, 2024
@kgodey
Copy link
Contributor

kgodey commented Mar 15, 2024

@pavish I would just merge this as-is and make a separate GitHub issue for the UX concerns you've listed here, I agree that the experience could be improved but I don't think it's bad enough to block release / we can fix in the next release.

@kgodey kgodey assigned pavish and unassigned kgodey and ghislaineguerin Mar 15, 2024
@pavish
Copy link
Member Author

pavish commented Mar 18, 2024

make a separate GitHub issue for the UX concerns you've listed here

Sounds good.

@pavish pavish enabled auto-merge March 18, 2024 07:21
@pavish pavish added this pull request to the merge queue Mar 18, 2024
Merged via the queue into develop with commit cd190fa Mar 18, 2024
38 checks passed
@pavish pavish deleted the enable-i18n branch March 18, 2024 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-status: review A PR awaiting review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants