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

Allow internationalization of code folding buttons using pandoc #932

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

walmes
Copy link

@walmes walmes commented Jan 7, 2017

Edit default.html and codefolding.js to reveive pandoc
arguments and set text. This allow user set names for
header code folding button, his menu, and buttons before
code chunks. User must define such variables using pandoc_args in YAML.
A full example is below. It uses text in Portuguese and unicode
code for up and down triangles.

html_document:
  pandoc_args: [
      "--variable", "code_folding_button=Código",
      "--variable", "code_folding_show=Mostrar",
      "--variable", "code_folding_hide=Esconder",
      "--variable", "code_folding_show_btn='\u25BE'",
      "--variable", "code_folding_hide_btn='\u25B4'"
    ]

  Edit default.html and codefolding.js to reveive pandoc
  arguments and set text. This allow user set names for
  header code folding button, his menu, and buttons of
  code chunk. User must define using pandoc_args in YAML.
@jjallaire
Copy link
Member

I think we should do this is a much more general fashion such that the rmarkdown package itself can include the appropriate translations and automatically include them based on the current locale. This might be based on the base mechanism for localizing R messages if it's straightforward enough to do so (I don't have experience with it so I'm not sure).

@yihui yihui force-pushed the master branch 2 times, most recently from 9ce8b28 to 2e8b846 Compare May 30, 2020 03:35
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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