jperasmus / docsify-copy-code

A docsify plugin that copies Markdown code block to your clipboard
MIT License
99 stars 72 forks source link

i18n / l10n #14

Closed jhildenbiddle closed 5 years ago

jhildenbiddle commented 5 years ago

From CHANGELOG.md

Other:

To test:

  1. npm run dev
  2. Visit http://localhost:3000
  3. Select different locals from the "Translations" navbar at the top of the screen
  4. Test docsify-copy-code buttons for each local
jhildenbiddle commented 5 years ago

Hey @jperasmus!

Figured I'd take a crack at the i18n/l10n stuff. The implementation here mimics the one used by docsify's full text search plugin which seemed like the easiest approach since many folks will be accustomed do it.

There area a few style changes to better align with theme styles and fix IE issues (the current version doesn't show "Copied!" in IE).

The demo sites just makes testing easier and provides a clean example of how to do localization using directories and the new plugin options.

Other changes are self-explanatory.

Let me know what you think. If all is well we can merge and publish.

Thanks!

jperasmus commented 5 years ago

Awesome, happy for this to be merged 👏

jhildenbiddle commented 5 years ago

Merged!

Do you mind handling the version bump to 2.1.0 and publishing the update to npm? If not I can give it a shot. I only ask because I'm not sure if I have the correct permissions since I haven't published this package previously.

jperasmus commented 5 years ago

No problem, I'll get it released quick.

jperasmus commented 5 years ago

Done, v2.1.0 is available on NPM now. Thanks again for tackling this one. Looks like you had fun with it.

jhildenbiddle commented 5 years ago

Thank you, @jperasmus. Always a pleasure.