[WIP] Translation of strings starter#5031
Draft
Felienne wants to merge 29 commits into
Draft
Conversation
…nto translate-starter
for more information, see https://pre-commit.ci
…nto translate-starter
for more information, see https://pre-commit.ci
…nto translate-starter
for more information, see https://pre-commit.ci
…nto translate-starter
for more information, see https://pre-commit.ci
…nto translate-starter
Member
Author
|
Hi @rania74! I have made a small starter for that that translates code! I will add some more details but you can start exploring this PR. |
Member
Author
|
This PR is a starter for @rania74, so it should stay open! |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…nto translate-starter
Member
Author
|
Hi people reading along (most likely @rania74) I have made this PR a bit more extensive, now calling Google translate, and translating content inside of ASK. |
for more information, see https://pre-commit.ci
674bb9f to
207fc8b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Work in progress for the simplest first step in #4656, translating a plain text string from one language to the other. I will make a list of steps here that I have taken, and a list of things that remain to be done.
How does current, keyword translation work?
Translation now work by analyzing the parse tree, adding nodes that need translation (currently only keywords) and then replaces these keywords with simple string replacement. If you need more details, @boryanagoncharenko (who is also in Discord) created this and can help you out.
Steps taken in this PR
hedy/tests/test_translation_level/test_translation_level_01.py
Line 28 in 82e83c4
hedy/hedy_translation.py
Line 80 in 82e83c4
https://github.com/hedyorg/hedy/pull/5031/files#diff-a56a00929e6afb2237fa3c501e2430585ea2e1200516c2ba837243d684e8d993R236
https://github.com/hedyorg/hedy/pull/5031/files#diff-a56a00929e6afb2237fa3c501e2430585ea2e1200516c2ba837243d684e8d993R76