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

feat(Edit Project Info): Multiple languages setting #1546

Conversation

hirokiterashima
Copy link
Member

Notes

  • Don't worry about styling for this PR- we can do that in a separate branch.

Changes

  • Create EditProjectLanguageSettingComponent to allow authors to specify default language and add/delete supported languages for the project.

Test (in Unit Authoring > Info view)

  • default language
    • displays previously-chosen value
      • for units without a default language (e.g., older units), it should show "English"
    • can be changed, and saves immediately upon change
    • must always have 1 default language (i.e., can't be empty)
  • supported languages
    • displays previously-chosen value
      • for units without a default language (e.g., older units), it should show empty
    • can be changed (add/delete languages), and saves immediately upon change

Test (in unit preview and student VLE views)

  • Supported languages options appear in the "Language" dropdown at the top-right corner of the page

@hirokiterashima hirokiterashima added the enhancement New feature of any size or improvement (UI, performance, security) label Dec 1, 2023
@hirokiterashima hirokiterashima self-assigned this Dec 1, 2023
@hirokiterashima hirokiterashima changed the title feat(Edit Project Info): Edit Multiple Languages setting feat(Edit Project Info): Multiple languages setting Dec 1, 2023
@hirokiterashima hirokiterashima marked this pull request as ready for review December 1, 2023 18:00
Copy link
Member

@geoffreykwan geoffreykwan left a comment

Choose a reason for hiding this comment

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

Here are some things I noticed.

  1. Language settings do not get saved if the project does not have a metadata.locale field. All old and new projects do not have a metadata.locale field.

  2. If the default language is not added to "additional languages", the default language will not show up in the student upper right language select so they won't be able to switch back to the default language.

  3. Should the languages in the drop downs be ordered alphabetically?

  4. Do we need to specify "Dutch (Netherlands)" or is "Dutch" by itself ok?

  5. The "additional languages" select adding/deleting feels a little inconsistent. When you add a language, it closes the drop down. When you have the drop down open and delete a language by clicking it in the drop down, it keeps the drop down open.

Here are potential other configurations to consider.

Here is an example of the drop down staying open when adding and deleting. (use the first demo and open the drop down and delete and then add "Karyn Wright")

Here is an example of options being removed from the drop down and only being able to delete using the x button. (use the second demo and add and then delete "Karyn Wright")

@hirokiterashima
Copy link
Member Author

hirokiterashima commented Dec 5, 2023

@geoffreykwan good catch. I think I've resolved all the issues you found. PTAL. Remember this branch still uses the old project.json format using [field].i18nId keys.

Copy link
Member

@geoffreykwan geoffreykwan left a comment

Choose a reason for hiding this comment

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

Looks good.

Copy link
Member

@breity breity left a comment

Choose a reason for hiding this comment

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

Looks good.

@hirokiterashima hirokiterashima merged commit 6eaebf0 into issue-1513-multiple-languages-per-unit Dec 5, 2023
@hirokiterashima hirokiterashima deleted the multiple-languages-edit-languages-options-in-at branch December 5, 2023 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature of any size or improvement (UI, performance, security)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants