phetsims / joist

Joist is the main framework for PhET Interactive Simulations. Joist creates and displays the simulation content, home screen, navigation bar, About dialog, enables switching between tabs, and other framework-related features.
MIT License
8 stars 6 forks source link

Visible strings are not translatable because they are under the `a11y` key #852

Closed zepumph closed 2 years ago

zepumph commented 2 years ago

While working on https://github.com/phetsims/joist/issues/850, I found this. My understanding is that all visible strings need to be available to translators.

This blocks publication of RAP and Friction

zepumph commented 2 years ago

We need to refactor most strings in the toolbar and voicing section to no longer be under the a11y key.

jessegreenberg commented 2 years ago

So far these were excluded intentionally and Voicing is not available unless running with English locale. I'm not sure if these should be available to translators, maybe we should hide or remove voicing if localeProperty is not English, or maybe even if running with multiple locales available? I'm not sure.

jessegreenberg commented 2 years ago

This is blocked until we have decisions made in https://github.com/phetsims/joist/issues/853

jessegreenberg commented 2 years ago

In https://github.com/phetsims/joist/issues/853 we decided that this content should be hidden when not running in the "en" locale. There is a comment currently above the strings that reads

// none of the Voicing strings or feature is translatable yet, all strings in this file // are nested under the 'a11y' section to make sure that they are not translatable const voicingLabelString = joistStrings.a11y.preferences.tabs.audio.voicing.titleStringProperty; const voicingDescriptionString = joistStrings.a11y.preferences.tabs.audio.voicing.descriptionStringProperty; const toolbarLabelString = joistStrings.a11y.preferences.tabs.audio.voicing.toolbar.titleStringProperty; ...

@zepumph would it be more clear for next time if the strings were removed from the translatable strings file and defined locally? I am happy to do that. Otherwise I think this can be closed.

EDIT: If changing would be more clear, self-reminder to do this for both VoicingToolbarItem and VoicingPanelSection.

zepumph commented 2 years ago

Sounds good to me!