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

Should the register function add a lang key to _quarto.yml? #71

Closed
Nenuial opened this issue Sep 11, 2024 · 3 comments · Fixed by #73
Closed

Should the register function add a lang key to _quarto.yml? #71

Nenuial opened this issue Sep 11, 2024 · 3 comments · Fixed by #73

Comments

@Nenuial
Copy link
Collaborator

Nenuial commented Sep 11, 2024

Following @joelnitta in #66:

Why is the last lang:en needed? Isn't that redundant, considering that we already have mainlanguage: 'en'?

sprintf("lang: %s", main_language)

I wonder if we should really "force" this option on the user. It isn't redundant as I explained in #66 but it also isn't absolutely necessary and I believe it should remain the choice of the user whether to have this in _quarto.yml

@maelle what do you think?

@maelle
Copy link
Contributor

maelle commented Sep 12, 2024

So, recently in a book where I used babelquarto, I used quarto::quarto_render() to ensure a fix I had done worked for the main language before I added it to other languages. Now my book's main language was English, but I still feel it could be useful and does not hurt?

Feel free to disagree!

@Nenuial
Copy link
Collaborator Author

Nenuial commented Sep 12, 2024

it could be useful and does not hurt?

I agree that it's useful. It can however hurt if you start from an existing project and already have a lang: en (or other language) in your config and then add the main language using register_main_language().

I'd therefore suggest checking if lang already exists and if there is no lang key, then we add it.
I've made a PR that would do that.

@maelle
Copy link
Contributor

maelle commented Sep 13, 2024

thank you!!

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