wordplaydev / wordplay

An accessible, language-inclusive programming language and IDE for creating interactive typography on the web.
Other
63 stars 44 forks source link

Source file name doesn't change when switching languages in tutorial #420

Closed ahuynh00 closed 7 months ago

ahuynh00 commented 8 months ago

The source file named "Start" is located on the secondary bottom bar of Learn page (as with all projects). It seems like if you have more than one language listed at the bottom right corner (next to the keyboard in the Learn window), Start will be written in the very first language on that list, even if the current locale you are on is in a different language. Similarly, in the first 2 images, there are certain words in the palette options that remain in Chinese despite the current chosen language being different (English/ Spanish).

Below are examples of Start button being in a language other than the current chosen locale:

Yes And No Scene 1 Pasted Graphic 4

Environment

Desktop

amyjko commented 7 months ago

In this issue, start refers to name of the main source file for a project. When the project is created in TutorialView, it uses the locale's name for the start file, but only gives it that one name, and so if someone switches to a different language, it still has the original name given.

I renamed this issue to reflect the root cause.

Here are some possible ways to make this clearer:

  1. Don't show the name of the source files in the tutorial view because they aren't particularly helpful anyway, since we only ever have one source file in examples.
  2. When switching to a new language while in the tutorial, add the new language's default source name to the source file's list of name aliases, so it appears in that new language as well.
  3. When switching locales (in any project context, not just the tutorial), rearrange the project's source file names to match the order of the project's list of locales
  4. Allow the project's locales to be reordered to match the selected locales, so the intended name appears

We might do all of these, or a combination of these, just to keep things consistent with selected locales, and avoid confusion like this.