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

Add Korean translations #634

Merged
merged 4 commits into from
Jan 10, 2022
Merged

Add Korean translations #634

merged 4 commits into from
Jan 10, 2022

Conversation

choonghyunryu
Copy link
Contributor

Create Korean "button", "text", "praise", "encouragement" for Korean language translations in the tutorial.

I hope that the Korean translation in the tutorial will be helpful in making R and data analysis courses for Koreans.
Thanks for providing such a great tool.

I have modified the file below.

  • data-raw/i18n_random-phrases.yml
  • data-raw/i18n_translations.yml
  • inst/internals/i18n_random_phrases.rds
  • inst/internals/i18n_translations.rds
  • tests/testthat/test-i18n.R

PR task list:

  • Update NEWS
  • Add tests (if possible)
  • Update documentation with devtools::document()

@CLAassistant
Copy link

CLAassistant commented Jan 2, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@gadenbuie gadenbuie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much @choonghyunryu! I just one small question about the test you added.

Also, if you don't mind, could you please add your name and this PR number to the acknowledgements in the NEWS file here? https://github.com/choonghyunryu/learnr/blob/main/NEWS.md?plain=1#L26-L32

Comment on lines 303 to 312
ex <- mock_exercise(
user_code = c(
'i18n_set_language_option("ko")',
'knit_opt <- knitr::opts_knit$get("tutorial.language")',
'env_var <- Sys.getenv("LANGUAGE")'
)
)
result <- withr::with_tempdir(render_exercise(ex, new.env()))
expect_equal(result$envir_result$knit_opt, "ko")
expect_equal(result$envir_result$env_var, "ko")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just wanted to check: are you intending to simply check that the Korean translation was added correctly? If so, we can remove this test, since we don't specifically test the exact languages that are included in the translations.

We do test the infrastructure around internationalization; for example this test is about checking that learnr does the right thing for variants of a language, e.g. Canadian French vs. generic French. Is there anything unusual about variants of the Korean language in this regard that we should be testing?

Copy link
Contributor Author

@choonghyunryu choonghyunryu Jan 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank so much @gadenbuie.

I've already done the Korean translation correctly, and I've also verified that it actually works.
So, I removed that logic from testthat. And I modified the README.md.

Now in South Korea, we can create a learnr tutorial where buttons and messages are printed in Korean.

Remove the logic of Korean translation test.
added name and this PR number to the acknowledgements in the NEWS file.
@gadenbuie gadenbuie merged commit a121ff1 into rstudio:main Jan 10, 2022
@gadenbuie
Copy link
Member

Thanks again @choonghyunryu!

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

Successfully merging this pull request may close these issues.

None yet

3 participants