Skip to content

fix R-level fr-FR translation#1176

Merged
dfalbel merged 33 commits intomlverse:mainfrom
cregouby:bugfix/fr_translation
Nov 14, 2024
Merged

fix R-level fr-FR translation#1176
dfalbel merged 33 commits intomlverse:mainfrom
cregouby:bugfix/fr_translation

Conversation

@cregouby
Copy link
Copy Markdown
Collaborator

@cregouby cregouby commented Jun 14, 2024

After some exchange with Philippe Grosjean during the French Rencontre R 2024,
I finally got the correct way to wrap R-level messages so that they get translated.

> withr::with_language(lang = "fr",
+                      torch_scalar_tensor(torch_randn(8, 2, 7))
+ )
Error in `value_error()` at torch/R/creation-ops.R:380:5:
! les valeurs doivent être de longueur 1
Run `rlang::last_trace()` to see where the error occurred.
Called from: signal_abort(cnd, .file)
Browse[1]> 
> 

Note
Cpp-level translation is

  • missing (no collection of the messages in po(t) files yet)
  • not working as it requires wrapping all C/C++ level "messages" into _("message") but gettext does not get the one in Rcpp::stop(). I'll make it explicit in a issue.

@cregouby cregouby changed the title fix fr-FR translation fix R-level fr-FR translation Jun 15, 2024
@dfalbel dfalbel force-pushed the bugfix/fr_translation branch from c535435 to efbf2f1 Compare June 20, 2024 13:22
@dfalbel
Copy link
Copy Markdown
Member

dfalbel commented Jun 20, 2024

@cregouby I rebased the PR. Some test cases are failing, and they seem related to this PR.

@cregouby
Copy link
Copy Markdown
Collaborator Author

Oh ! Sorry for that.
Please give me some time to have a deeper look...

@dfalbel
Copy link
Copy Markdown
Member

dfalbel commented Jun 20, 2024

No worries, let me know if you want me to take a look too!

@dfalbel
Copy link
Copy Markdown
Member

dfalbel commented Jun 20, 2024

I also just added you as a collaborator so you don't need to wait for me to approve and run your PR's.

@cregouby
Copy link
Copy Markdown
Collaborator Author

Thanks, I feel honored !

@dfalbel dfalbel merged commit 37084e4 into mlverse:main Nov 14, 2024
@cregouby cregouby deleted the bugfix/fr_translation branch June 23, 2025 20:58
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.

3 participants