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

Sequence style parameter lists values in multiple translations #541

Open
azmec opened this issue Jul 23, 2024 · 1 comment
Open

Sequence style parameter lists values in multiple translations #541

azmec opened this issue Jul 23, 2024 · 1 comment
Assignees
Labels
defect Something isn't working as intended or a design isn't serving our stakeholders localization Anything related to natural language. projects Anything related to project management.
Milestone

Comments

@azmec
Copy link

azmec commented Jul 23, 2024

What happened?

When Wordplay lists the possible values of a function or constructor parameter, it should list only one translation of those values. However, switching between localizations appends the translation for the selected locale to the list of possible values for Sequence's style parameter.

  1. Open a blank Wordplay project.
  2. Write foo: Sequence(spin() 5s style: ""). Do not list a style.
  3. Observe that the program stage and conflict resolutions list only "straight", "cautious", "pokey", and "zippy" as possible options for the style parameter.
  4. Switch to Spanish-Mexico locale.
  5. Observe that the program stage and conflict resolutions now list the English and Spanish translations for the style parameter.
  6. Switch to the Chinese locale.
  7. Observe that the program stage and conflict resolutions now list the English, Spanish, and Chinese translations for the style parameter.

Anything else?

Below is an image of the defect.

image

What browsers are you seeing the problem on?

Chrome

What operating system are you using?

Linux

@azmec azmec added defect Something isn't working as intended or a design isn't serving our stakeholders needs triage The product lead has yet to triage the issue labels Jul 23, 2024
@amyjko
Copy link
Collaborator

amyjko commented Jul 23, 2024

The underlying cause of this is that we remember all previously used locales and use that to generate a localized definition of all APIs. This project previously used Spanish and Chinese, and so these locales are included. This usually isn't noticeable, but it shows up here because text types aren't language filtered in error messages. It also shows up in the translation dialog, where the history of languages is shown.

Two possible remedies:

  • On save, only save the locales of the names actually used and the current locales chosen, so the list is more semantically consistent with what is used
  • Tag the text in the union types and filter errors by languages in error messages

@amyjko amyjko self-assigned this Jul 23, 2024
@amyjko amyjko added projects Anything related to project management. and removed needs triage The product lead has yet to triage the issue labels Jul 23, 2024
@amyjko amyjko moved this to Backlog in Wordplay Backlog Jul 23, 2024
@amyjko amyjko added this to the 1.0 milestone Jul 23, 2024
@amyjko amyjko added the localization Anything related to natural language. label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Something isn't working as intended or a design isn't serving our stakeholders localization Anything related to natural language. projects Anything related to project management.
Projects
Status: Backlog
Development

No branches or pull requests

2 participants