LearnToCodeRPG icon indicating copy to clipboard operation
LearnToCodeRPG copied to clipboard

Localized Versions

Open raisedadead opened this issue 4 years ago • 8 comments

What feature would you like to suggest?

We would want to deploy localized versions of the app in major world languages. Similar to the setup we have for our core learning platform.

Additional Information

We can track the needs & user stories here in this thread;

  • [x] Understand how strings are stored in the context of this project and implement the localization, for ex: we use react-i18n-next on the main learning platform.
  • [ ] Create and set up a Crowdin Project with the required configurations.
  • [ ] Create and set up the GitHub actions workflows to upload and download translations.
  • [ ] ...

raisedadead avatar Jan 03 '22 08:01 raisedadead

Git branch to spike on: https://github.com/freeCodeCamp/LearnToCodeRPG/tree/localization tl folder: https://github.com/freeCodeCamp/LearnToCodeRPG/tree/localization/game/tl

  • [ ] Maybe we can keep only game/tl on the branch that Crowdin is pushing and pulling from so that the original scripts that end in .rpy (ex. https://github.com/freeCodeCamp/LearnToCodeRPG/blob/localization/game/gui.rpy) don't get ported into Crowdin
  • [ ] After we've written the Crowdin script, we can inject some pseudolocalization and I can download and verify the game on my local
  • [x] Spike on possible text tags that need to be left alone and update this comment

Ex.1

https://github.com/freeCodeCamp/LearnToCodeRPG/blob/351f26074b441d056ab9d6e1381e8be1e9ede8b1/game/tl/traditional_chinese/script.rpy#L61

Before translation

# game/script.rpy:92  <-- lock this line, it's a Python comment
translate traditional_chinese start_after_interview_941d689f: <-- lock this line

    # "[player_name]? What a coincidence! Our VIP team member {a=[vip_profile_url]}[player_name]{/a} will be honored to hear that."  <-- lock this line, it's a Python comment
    "[player_name]? What a coincidence! Our VIP team member {a=[vip_profile_url]}[player_name]{/a} will be honored to hear that."  <--- this is the line that needs to be translated. see translation below

After translation

# game/script.rpy:92
translate traditional_chinese start_after_interview_941d689f:

    # "[player_name]? What a coincidence! Our VIP team member {a=[vip_profile_url]}[player_name]{/a} will be honored to hear that."
    "[player_name]?好巧,我们的VIP队友{a=[vip_profile_url]}[player_name]{/a}会很高兴的。"

The [] and {} tags should be left intact.

Ex.2

https://github.com/freeCodeCamp/LearnToCodeRPG/blob/351f26074b441d056ab9d6e1381e8be1e9ede8b1/game/tl/traditional_chinese/screens.rpy#L15

Before translation

    # game/screens.rpy:261 <-- lock this line, it's a Python comment
    old "{icon=icon-fast-forward} Skip" <-- lock this line, it's the original text
    new "{icon=icon-fast-forward} Skip" <-- translate this line, see below

After translation

    # game/screens.rpy:261
    old "{icon=icon-fast-forward} Skip"
    new "{icon=icon-fast-forward} 跳过"

Again, the [] and {} tags should be left intact.

RuolinZheng08 avatar Jan 07 '22 15:01 RuolinZheng08

# game/script.rpy:14
translate simplified_chinese start_1b5d8b8d:

    # "Hi there. Thanks for applying to our software engineering role!"
    ""

So looking at the localisation branch, the files are pre-populated with empty strings. Can they be prepopulated with the English text instead? Otherwise this creates issues with Crowdin's translation memory.

naomi-lgbt avatar Jan 07 '22 20:01 naomi-lgbt

So looking at the localisation branch, the files are pre-populated with empty strings. Can they be prepopulated with the English text instead?

Yes - we would need that done ahead of time before we push files to Crowdin.

raisedadead avatar Jan 08 '22 06:01 raisedadead

So looking at the localisation branch, the files are pre-populated with empty strings. Can they be prepopulated with the English text instead?

Yes - we would need that done ahead of time before we push files to Crowdin.

@nhcarrigan @raisedadead Hi Nick and Mrugesh, Here's the pre-populated source folder: https://github.com/freeCodeCamp/LearnToCodeRPG/tree/localization/game/tl/english

Let me know if you'd like me to add anything else. Thanks!

RuolinZheng08 avatar Jan 09 '22 03:01 RuolinZheng08

@nhcarrigan Hi Nick. Thanks for the hard work and sorry for the repeated ping 😅

I saw some issues with the Crowdin translation: Some strings that should be translated aren't marked as so (important), and some strings that aren't translatable are marked as translatable (not too important).

  • The strings that should be translated but aren't marked as so are narrations that don't have a speaker prefix
  • The strings that aren't translatable but are marked as translatable are the # TODO comments at the beginning of each file

See script.rpy on Crowdin

Screen Shot 2022-01-14 at 16 01 06

RuolinZheng08 avatar Jan 15 '22 00:01 RuolinZheng08

Hey @RuolinZheng08,

I'll take a look at this over the weekend and see if I can get the issue resolved. For now, to maintain our goal of translating this before the Chinese new year, I'm thinking we should go ahead and make the crowdin project public to allow people to start translating the other files. What do you think?

naomi-lgbt avatar Jan 15 '22 01:01 naomi-lgbt

Just dropping screenshots of Crowdin so I can refer to those in other PRs

Line to be translated:

player @ surprised "{b}Full-stack{/b}... What is that? I better take notes so I can learn more about it."

Crowdin chopped it into three parts:

Screen Shot 2022-01-23 at 10 36 43
# original
player @ surprised "{b}Full-stack{/b}
# translated, keeping the opening quotes `"`
player @ surprised "{b}全栈{/b}
Screen Shot 2022-01-23 at 10 36 49
# original
What is that?
# translated, no quotes on either side
这是什么?
Screen Shot 2022-01-23 at 10 36 54
# original
I better take notes so I can learn more about it."
# translated, keeping the closing quotes `"`
我最好做笔记,这样我可以学习更多东西。"

RuolinZheng08 avatar Jan 23 '22 19:01 RuolinZheng08

Hey its been a while since the last activity and was wondering if the translation effort was abandoned?

Yelinz avatar Jan 29 '24 11:01 Yelinz