opral / inlang-paraglide-js

Tree-shakable i18n library build on the inlang ecosystem.
https://inlang.com/m/gerre34r/library-inlang-paraglideJs
42 stars 0 forks source link

Paraglide Pattern de-duping #25

Closed LorisSigrist closed 6 months ago

LorisSigrist commented 7 months ago

(non-urgent, won't spend time on this now, opening for future reference)

Problem

If a pattern is used multiple times then it will be shipped multiple times.

With the message persistence and our philosophy of "don't reuse messages" it is increasingly likely that we get identical message-patterns. Once we start having multiple patterns per message this will get even more pronounced.

Proposal

The paraglide compiler could detect duplicate patterns and re-use them internally. This wouldn't be visible to the developers and is largely an implementation detail.

linear[bot] commented 6 months ago

PARJS-28 Paraglide Pattern de-duping