ux icon indicating copy to clipboard operation
ux copied to clipboard

[Translator] Add "by-domain" translation dumper

Open maelanleborgne opened this issue 1 year ago • 1 comments

Q A
Bug fix? no
New feature? yes
Issues Fix #1225
License MIT

Will follow #1930

  • Adds a new translation dumper to dump translations by domains in separated files. Theses files can be imported and registered with the new registerDomain(domain) js function, and accessed using the existing trans function by passing the translation key as a first argument.

TODO:

  • [x] Add documentation
  • [ ] Add entry to changelog
  • [ ] Add better TS typing to the new functions/object
  • [ ] Add a TS declaration file for the new domains files ?

maelanleborgne avatar Jun 19 '24 12:06 maelanleborgne

Hi, and thanks for your contribution! :)

I didn't look for everything, but isn't there too much things for a single PR? I see dump per domains, global domains filters, but also a new dumper for AssetMapper... is it too much?

Hi, I thought indeed about making two PRs : one for the filtering and another one for the 'per-domain' dump (which is what the AssetMapperDumper does, there won't be any change on the actual webpack-oriented behavior). I made it in one PR because it all came from the same issue, but I can still split the PR if need be.

maelanleborgne avatar Jun 19 '24 15:06 maelanleborgne

Hi @maelanleborgne : do you need anything on this one ?

smnandre avatar Jul 30 '24 20:07 smnandre

I am closing due to inactivity, feel free to re-open the PR if necessary. Thanks for the contribution!

Kocal avatar Oct 09 '25 09:10 Kocal