Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Keila
Keila
@keila@fosstodon.org  ·  activity timestamp 3 hours ago

Updating Gettext from 0.x to 1.0 isn't entirely trivial - because Keila has custom translation helpers for handling Markdown. Fortunately there's a great explainer post by @whatyouhide - so if you've also been delaying the update, give it a read! https://andrealeopardi.com/posts/refactoring-gettext-to-speed-up-compilation/ #myelixirstatus #elixirlang #opensource #buildinpublic

Reducing Compile-Time Dependencies in Gettext for Elixir

This is how we significantly improved compilation time for Elixir projects that use Gettext, using a few metaprogramming tricks and ten years of Elixir experience since we wrote the first version of this library.
  • Copy link
  • Flag this post
  • Block
Keila
Keila
@keila@fosstodon.org replied  ·  activity timestamp 3 hours ago

Keila will use a structure that's slightly different from the new Phoenix default:
lib/keila_web/gettext.ex
lib/keila_web/gettext/backend.ex
lib/keila_web/gettext/markdown_helpers.ex

The KeilaWeb.Gettext module exports a __using__ macro which simply adds "use Gettext" and "import MarkdownHelpers".

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1-beta.35 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct