Company
Date Published
Author
Armin Ronacher
Word count
1694
Language
English
Hacker News points
None

Summary

The Sentry project has shifted from a server-side rendering approach to a rich React-powered user interface rendered purely on the client side. To solve the client-side i18n problem, they integrated their existing translation pipeline with a custom solution that matches the client and server behavior of gettext. The team had to overcome complexities such as formatting placeholders, handling complex interactions like links, and extracting translations from JavaScript code. They developed a custom Babel plugin to automate this process and created a custom webpack loader to ship translations with the frontend app. To improve their context support and ensure all strings get correctly marked for translation, they plan to enhance their tooling in the future.