yzane / vscode-markdown-pdf

Markdown converter for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=yzane.markdown-pdf
Other
1.01k stars 206 forks source link

Fix: Pass language to markdown-pdf puppeteer #172

Closed martilidad closed 4 years ago

martilidad commented 4 years ago

this fixes #95

yzane commented 4 years ago

Thanks for your PR!

fuhrmanator commented 2 years ago

Apart from the typo with vscode.env.langauage (maybe I'm wrong about that), vscode.env.language seems to only be configurable to en but not en-CA or en-AU. https://code.visualstudio.com/docs/getstarted/locales

I'm in Quebec, which can be both English and French, so if I set my locale to French in VSCode, I get a date that looks great: 06/02/2022 (dd/mm/yyyy) which is consistent with fr and also en-CA (but I can't see how to set the latter in VScode).

How does @martilidad specify a VSCode local of en-AU (as in the example of #95)?

martilidad commented 2 years ago

This was a dirty fix at the time, because I just wanted to export a markdown with the correct date format myself and just quickly pushed a commit here to try to help. It seems that vscode may have changed something about how to set languages/how it stores the user language.

The easiest fix would be to have a separate plugin setting for the format and/or language passed to the pupetteer. (e.g. markdown-pdf.export-locale) This is probably an easy first issue @fuhrmanator .