Open NathanLovato opened 2 years ago
Hi Nathan. Can you describe this issue a bit more. I dont get exactly what you mean with
We need to reproduce that when extracting the translation strings.
I guess it has something to do with PracticeTeste.gd
or/and maybe with PracticeInfoPanel.gd
(set_tests_status
)
PracticeTester.gd has a function named _find_test_method_names() Which finds the functions used for testing practices and we then capitalize that and use the generated strings in the user interface to display the requirements the student has to pass in the practice.
These strings are currently not translated at all. They are not even collected when we generate the translation strings in res://i18n/extract.py
.
This task thus has two requirements:
PracticeTester._find_test_method_names()
in extract.py
to output all these strings to a new .pot file. The pot files are files used by translators to translate the app's many strings efficiently.PracticeTester._find_test_method_names()
(the keys of the _test_methods
variable)For the first requirement, ideally we would have extract.py
get every practice check/test name from PracticeTester._find_test_method_names()
. We can likely achieve that by calling Godot with a script. The script would instantiate every practice script, get the practice check names, and print them all to the standard output. The Python script could then read them all from the standard output through a pipe.
Does it make sense?
Hi Nathan.
Thanks for clarification. Yes, i had seen _find_test_method_names()
but i wasnt really aware of the Python script extract.py
and how this is handle all together.
I like take a deepe look here: https://github.com/GDQuest/learn-gdscript/blob/main/i18n/working-with-translations.md and also on the extract.py
Yes, it makes sense. But at the moment i´m not familiar with calling Godot with a script to instantiate every practive script and get then the standard output. Therfore a have to get more information how thisi could be done.
In this case, I think this is best if we handle it because we have experienced doing those kinds of things. But thank you very much for offering your help!
Okay, no problem. Is there any thing i can help with let me know.
If your PR is then ready to solve this, i will may have look at it to get an overview how it works. If i dont forget it 😄
For the practice check names we directly process the function names inside of the test scripts. We need to reproduce that when extracting the translation strings.