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

Show percent translated on the translation form page #337

Closed
liammulh opened this issue Dec 21, 2022 · 1 comment
Closed

Show percent translated on the translation form page #337

liammulh opened this issue Dec 21, 2022 · 1 comment

Comments

@liammulh
Copy link
Member

liammulh commented Dec 21, 2022

In phetsims/qa#869, @DianaTavares asked:

It is possible to have the information in the picture always visible while we are translating the strings? I always give a fast scroll up-down to be sure that I translate all strings, but having this information, I think, is more efficient.

image

I think this is a feature @kathy-phet also thought would be nice.

I'm not sure how we'd show the percentage dynamically. Maybe every time the translation form data changes, we compute the string percentages:

// This is just pseudocode.

const [translatedStringsData, setTranslatedStringsData] = useState({});
useEffect(() => {
  const newData = computeTranslatedStringsData(translationValues);
  setTranslatedStringsData(newData);
}, [translationFormData]);

And then in the JSX:

// This is just pseudocode.

const formJsx = (
  <div>
    <h2>Sim-Specific Strings</h2>
    <p>{translatedStringsData.translated} of {translatedStringsData.total}</p>
  </div>
);

(We'd need to compute the percentage again, I think. And we'd need to do the pseudocode for each type of strings. And we might want to make the percentage show at the top of the screen in a sticky container so it's always visible.)

@oliver-phet
Copy link
Contributor

This will be accomplished in #417

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

No branches or pull requests

2 participants