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

math on the other side #124

Closed
maelle opened this issue Oct 18, 2024 · 2 comments · Fixed by #125
Closed

math on the other side #124

maelle opened this issue Oct 18, 2024 · 2 comments · Fixed by #125
Assignees

Comments

@maelle
Copy link
Member

maelle commented Oct 18, 2024

In French we put the currency after the numbers. Now, the example that does not work has wrong punctuation but still, might be worth a note in the docs?

Sys.setenv(DEEPL_API_KEY = keyring::key_get("deepl"))

# works
babeldown::deepl_translate_markdown_string(
  "Plein de sous: $100",
  source_lang = "fr",
  target_lang = "EN-US"
)
#> [1] "Lots of money: $100"

# works
babeldown::deepl_translate_markdown_string(
  "Plein de sous: 100$!",
  source_lang = "fr",
  target_lang = "EN-US"
)
#> [1] "Lots of money: 100$!"

# doesn't work
babeldown::deepl_translate_markdown_string(
  "Plein de sous: 100$",
  source_lang = "fr",
  target_lang = "EN-US"
)
#> Error in `purrr::map()`:
#> ℹ In index: 1.
#> ℹ With name: 1.
#> Caused by error:
#> ! Inline math delimiters are not balanced.
#> 
#> HINT: If you are writing BASIC code, make sure you wrap variable
#>       names and code in backtics like so: `INKEY$`.
#> 
#> Below are the pairs that were found:
#> start...end
#> -----...---
#>      ...Plein de sous: 100$

Created on 2024-10-18 with reprex v2.1.0

@zkamvar
Copy link
Member

zkamvar commented Oct 18, 2024

In French we put the currency after the numbers.

This is why international collaboration is important! I did not know this! We might be able to apply the same sort of rule as in #122 and maybe even apply the zipper in #123 in the reverse order to clean up.

@zkamvar zkamvar self-assigned this Oct 18, 2024
@maelle
Copy link
Member Author

maelle commented Oct 22, 2024

I also read that in French we need to put a space before the $ but I had no idea so am not sure it's widespread.

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 a pull request may close this issue.

2 participants