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

fix R-level fr-FR translation #1176

Open
wants to merge 31 commits into
base: main
Choose a base branch
from

Conversation

cregouby
Copy link
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
Copy link
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
Collaborator Author

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

@dfalbel
Copy link
Member

dfalbel commented Jun 20, 2024

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

@dfalbel
Copy link
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
Collaborator Author

Thanks, I feel honored !

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