Skip to content

Adds localization features to blog #256

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

Merged
merged 3 commits into from
Nov 8, 2019

Conversation

bitschmidty
Copy link
Contributor

Changes:

  • on individual blog pages, show available translations, if they exist
  • filters on blog page for english posts only

Notes:

  • translations will be located in _posts/[language-code]/ , similar to newsletters
  • to test, add a '_posts/ja/2019-10-29-schnorr-taproot-workshop.md' file duplicating '_posts/en/2019-10-29-schnorr-taproot-workshop.md' content but changing lang to 'ja' and setting slug and name to '2019-10-21-schnorr-taproot-workshop-ja'
  • Im not happy with duplication of code on the _layouts/post.html template when compared to _layouts/newsletter.html @harding let me know if you think there is an improvement here

@harding
Copy link
Collaborator

harding commented Nov 5, 2019

I'm not happy with duplication of code on the _layouts/post.html template when compared to _layouts/newsletter.html @harding let me know if you think there is an improvement here

If you're worried about duplication of template code, you can use an included file. You can pass data to an included file for anything that differs between instances. For example, see the linker we use at the bottom of each newsletter for generating the URLs for PRs mentioned in the newsletter, or see the Jekyll documentation: https://jekyllrb.com/docs/includes/

@bitschmidty
Copy link
Contributor Author

@harding thanks for the suggestion. Ive pulled the localization finder piece into its own include in the latest commit.

@jnewbery
Copy link
Contributor

jnewbery commented Nov 7, 2019

@bitschmidty - can you provide some motivation for this? Are CG planning to also translate blog posts as well as newsletters?

@jnewbery jnewbery added the internationalization Making the site appropriate for multiple localizations label Nov 7, 2019
@bitschmidty
Copy link
Contributor Author

@jnewbery Sorry, was thinking I should start with issues and then PR against them for context.

CG has translated the workshop blog post.

@jnewbery
Copy link
Contributor

jnewbery commented Nov 8, 2019

ACK 68aa87b.

Looks good @bitschmidty . Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internationalization Making the site appropriate for multiple localizations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants