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

Internationalization : UI toggle for language selection #4685

Closed
JayanthyChengan opened this issue May 17, 2018 · 35 comments
Closed

Internationalization : UI toggle for language selection #4685

JayanthyChengan opened this issue May 17, 2018 · 35 comments

Comments

@JayanthyChengan
Copy link
Contributor

Have to figure out where to place the toggle button in the main page?

@djbrooke
Copy link
Contributor

Thanks @JayanthyChengan for this (and for all the internationalization PRs!). We discussed this briefly in standup today, and since this is getting into UI/UX land, I'll tag @TaniaSchlatter.

Can you let us know what you're thinking?

@JayanthyChengan
Copy link
Contributor Author

@djbrooke : Thanks for involving Tania for UI design.

  • Would like to figure out from Harvard team where to place the toggle button on the main page ?
  • Incorporate code changes to fetch language from the user selection and choose corresponding bundle properties

@pdurbin pdurbin added the UX & UI: Design This issue needs input on the design of the UI and from the product owner label May 17, 2018
@TaniaSchlatter
Copy link
Member

TaniaSchlatter commented May 18, 2018

Hi @JayanthyChengan and @djbrooke, see the image attached for button appearance and placement. I suggest placement in the navbar using UL Dropdown, even if there are just two languages. Reference for the mockup is here:
https://bootsnipp.com/snippets/mprMM
Also tagging @mheppler
scholarsportal_language

@JayanthyChengan
Copy link
Contributor Author

@djbrooke @scolapasta : To get the dropdown list of languages dynamically, planning to have a database table for languages and pull the values from it. So, we can use CURL commands to add new languages and fetch corresponding bundle.properties in the application. Let me know, if there is any other better approach to tackle this.

To establish the locale into the web application, I will follow https://docs.oracle.com/javaee/6/tutorial/doc/bnaxw.html

Please confirm with your thoughts. Thanks

@amberleahey
Copy link

Just to follow up, we are starting to develop the UI toggle to support testing the new internationalization code and eventual use of DV in different languages. The mock-ups and database design considerations are helpful.

After some discussion at SP, we are considering placing the button far right, after 'Login'. Any objections? I've provided some additional examples.

Without opening too much of a debate around languages and flags, is this required for the toggle?
languagetoggle2
languagetoggle3
languagetoggle4

@amberleahey
Copy link

same additional input from google https://support.google.com/webmasters/answer/182192?hl=en

@djbrooke
Copy link
Contributor

@amberleahey @JayanthyChengan we missed this in the all the OR2018 and DCM excitement. We'll have the design team take a quick look and provide some feedback.

@TaniaSchlatter
Copy link
Member

TaniaSchlatter commented Jun 21, 2018

Hi @amberleahey, the rationale for the suggested language toggle was concern about length and shifting placement of items in the navigation bar. Placing the toggle to the right of the other items would cause placement to shift with the varying length of user names. I liked that the suggested toggle was short, clear, and consistent in length. What are the SP team's concerns? Maybe asking what is preferable in the alternative examples is a better way to limit debate? :)

Thanks for posting the google link. It has good a good summary of things to keep in mind. We will need to discuss with @mheppler and @scolapasta.

@mheppler
Copy link
Contributor

mheppler commented Jun 21, 2018

@amberleahey @JayanthyChengan After reviewing the UI options with @TaniaSchlatter and discussing in a little more detail with a our visiting German developer, I have some recommendations -- and a mockup!

screen shot 2018-06-21 at 4 04 36 pm

  • Navbar link should contain the language name (e.g. "English") as opposed to "Language", as well as an icon of some sort, in order to ease the discovery of where to go to change the language (the "A"/font icon I used from Bootstrap is not the best, we could use another icon, the "language" icon used in one of the screenshots above is from FontAwesome, which we can get from PrimeFaces)
  • Username navbar dropdown link should remain in the far right, with the language dropdown just to it's left
  • Selected language should be highlighted in the dropdown, I've also included a checkmark icon in order to aid visual recognition outside of words
  • Language options in the dropdown should be language names listed in their language, as one of the screenshot examples above shows

We're happy to discuss further and research other options. Let us know if you have any feedback.

@amberleahey
Copy link

Makes sense, we were a bit worried about disruption in the nav bar, but this looks good! Thanks for the tips and mock-up.

@pdurbin
Copy link
Member

pdurbin commented Jun 27, 2018

To get the dropdown list of languages dynamically, planning to have a database table for languages and pull the values from it.

@JayanthyChengan I don't see any objections above and this is fine with me.

@JayanthyChengan
Copy link
Contributor Author

@pdurbin

  • Instead of Database table, languages were populated from json file src/main/webapp/resources/lang/languages.json in src/main/java/edu/harvard/iq/dataverse/DataverseLocaleBean.java

@mheppler

  • I submitted pull request, please review. I was not successful when I tried to implement "fontAwesome" and "Checkmark" icon, Can I get help from your team to implement them ?

@mheppler
Copy link
Contributor

Cleaned up the alignment of the language selectOneMenu form input in the navbar, but need to look into responsive width issues. Will have a commit ready when I can get that resolved.

screen shot 2018-06-28 at 4 48 23 pm

@JayanthyChengan
Copy link
Contributor Author

Thanks @mheppler

@mheppler
Copy link
Contributor

mheppler commented Jul 13, 2018

With the help of @scolapasta (java) and @pdurbin (git), I was able to get the language dropdown for the navbar converted over from a selectOneMenu form component, to a list of links, in the Bootstrap styling we had originally mocked up.

screen shot 2018-07-13 at 12 49 21 pm

I created a new branch, and pull request, and linked it to this issue. Will move it to Code Review now, so that @scolapasta can revisit some of the backing bean logic he helped "get working". I will also need to revisit some of the inline CSS I quickly added in order to get looking a lil more Bootstrappy.

@mheppler
Copy link
Contributor

mheppler commented Jul 13, 2018

NOTE: This branch will most likely need to be updated with develop, as well as have some documentation added, before it is ready for QA. I can take care of those next week, either as part of the revisions from the review, or before the review gets started. Just wanted to get this code into GitHub while it was still warm and fresh! 🍰 😎

@mheppler mheppler removed their assignment Jul 13, 2018
@4tikhonov
Copy link
Contributor

@JayanthyChengan, we're very interested to try this new switch languages functionality in DataverseEU project. At the moment we have Bundle.properties for French, German, Slovenian, Swedish, Ukrainian and Spanish languages, how can we connect to web interface to see all available languages there?

@pdurbin
Copy link
Member

pdurbin commented Sep 10, 2018

@4tikhonov you should check out the new :Languages database setting at https://github.com/IQSS/dataverse/blob/79c6dc3cd8dd1c88e00b441c37f95e26454085af/doc/sphinx-guides/source/installation/config.rst#languages and keep an eye on pull request #5023 for how we want to try keeping the bundle files outside the main app in the future.

@amberleahey
Copy link

amberleahey commented Sep 10, 2018

I'll post something about this upcoming DV release and community objectives around collecting additional languages and the maintenance of them (to the Google Group). Thanks @4tikhonov for those additional language files they will be great for testing. We don't have a public DV instance w/this code accessible at the moment, but we will work on that with the Harvard team.

@pdurbin
Copy link
Member

pdurbin commented Sep 10, 2018

@4tikhonov here's a screenshot of how the language toggle looks on https://dev1.dataverse.org

screen shot 2018-09-10 at 9 53 28 am

@amberleahey I'm looking forward to your write up! Thanks!

@4tikhonov
Copy link
Contributor

Phil, looks great! Is it possible to get different languages on different subdomains/paths, for example, fr.dataverse.org or dataverse.org/fr for French?

@pdurbin
Copy link
Member

pdurbin commented Sep 10, 2018

@4tikhonov no, I don't think so. If this is something you want or need, please open an issue for it.

@4tikhonov
Copy link
Contributor

This is what we're implementing with running different containers for all languages. But if there is possibility to get it as a part of core functionality it would be great.

@4tikhonov
Copy link
Contributor

Great, I have another question then about metadata schema: is it also already translated to French if you'll switch to it?

@amberleahey
Copy link

Update from the community call today, many people require having Dataverse in a specific language locale e.g. EN-CA, FR-FR, etc., and to be able to differentiate this in the UI toggle. Can we revisit the design of the UI toggle to incorporate these country/locales codes? Someone mentioned using ISO country and language codes or some combination of plain language and code might be best. see: https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html as example of codes to combine...

@pdurbin
Copy link
Member

pdurbin commented Sep 11, 2018

@amberleahey we're always open to revisiting anything but can you please create a new GitHub issue for the language toggle? This closed issue represents the work that was done in pull request #4841 for the next version of Dataverse (the current version is 4.9.2). Thanks!

@pdurbin
Copy link
Member

pdurbin commented Sep 12, 2018

Let's continue the conversation at #5046 (thanks for creating that issue, @amberleahey !).

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

No branches or pull requests