Sneak peek on what's coming up for #PhanpySocialDev
Current progress with documentation.
Progress on some technical notes.
Now up on #PhanpySocialDev (dev site), so expecting bugs 🤞🐛
Docs: https://github.com/cheeaun/phanpy?tab=readme-ov-file#internationalization
76 changed files with 13,528 additions and 2,215 deletions: https://github.com/cheeaun/phanpy/commit/c2e6d732c4938dcfdcfd2ed5e6162fdd97d96609
Interesting last-minute discovery: turns out strings like '5 minutes', '1 hour', '2,000kB', '50%', etc don't need to be translated as they can be generated via `Intl.NumberFormat` or `toLocaleString()` (or `i18n.number` from Lingui)
Todos:
- Check if Crowdin-GitHub integration works.
- Prepare for translators onboarding
@cheeaun Be careful of the browser support for those `Intl` functions, the most advanced ones are not well supported even in some quite recent browsers. You might want to add dynamic detection of those, and load polyfills if not present
Good progress so far, thanks to translators! 🙇♂️👏
Crowdin project: https://crowdin.com/project/phanpy
Some languages now up on dev site (https://dev.phanpy.social/), for testing (layout issues, translation mistakes, etc) 🙏🤞
Now let's see if all the RTL stuff works 🤞
Current progress. "Development" section in the language selector only shows on local dev & dev site.
Crowdin: https://crowdin.com/project/phanpy
@renchap thanks, Phanpy had some bugs with Intl.Segmenter previously (with older Firefox) but fixed now. Now there's a (huge!) polyfill that's conditionally loaded on-demand for unsupported browsers 🫣
Will be keeping track of the other Intl APIs (Intl.Locale is also polyfilled now).
@cheeaun I wrote this verbose monstruosity a while ago for Mastodon: https://github.com/mastodon/mastodon/blob/main/app/javascript/mastodon/polyfills/intl.ts
(most is commented because we dont use those features, but I wanted to have them ready). This is relatively lightweight if your browser supports it, and only loads the current locale.