ttag-org / ttag

:orange_book: simple approach for javascript localization
https://ttag.js.org/
MIT License
345 stars 43 forks source link

docs: add section documenting using ttag with gatsby #138

Closed jaredh159 closed 5 years ago

jaredh159 commented 5 years ago

Closes #133. See also #134. Here's a basic shot at a page adding documentation for integrating ttag with Gatsby. I followed the pattern of the CRA tutorial pretty closely.

If you guys wanted me to transfer the gatsby default starter I created (mentioned at the bottom of the tutorial) to your organization, let me know, I'd be happy to do that.

Let me know if this seems agreeable, or if you have any modifications you want. 👍

jaredh159 commented 5 years ago

Not sure about the CI error guys, I thought since I was just touching .md files I wouldn't have to worry about breaking the build...

AlexMost commented 5 years ago

Hi @jaredh159, thanks a lot! The tutorial looks great. CI fails because of this issue - https://github.com/ttag-org/ttag/issues/136.

One thing that came to my mind is that there is one more option to use precompiled translations. We can also use ttag.macro - https://github.com/ttag-org/ttag.macro to avoid "babel-preset-gatsby" installation. Seems gatsby has plugins support - https://www.gatsbyjs.org/docs/babel-plugin-macros/. But that will require to use an extra ttag.macro package, so maybe your approach is better. Anyway, I really appreciate your effort. Going to merge and publish soon.

AlexMost commented 5 years ago

:tada: - https://ttag.js.org/docs/gatsby.html You can join our ttag org if you would like. I have sent you an invitation.

AlexMost commented 5 years ago

Ah, almost missed that :)

If you guys wanted me to transfer the gatsby default starter I created

Yes, that would be nice.