lingui / js-lingui

🌍 📖 A readable, automated, and optimized (3 kb) internationalization for JavaScript
https://lingui.dev
MIT License
4.54k stars 380 forks source link

Mark translation fuzzy when source string has changed #1077

Closed braineo closed 3 years ago

braineo commented 3 years ago

Is your feature request related to a problem? Please describe. I've been working with GNU gettext and Qt linguist, one thing I miss a lot from those 2 tool chains is

detecting source string has changed and mark translated language fuzzy when I'm using fix message ID

so that translator take a quick look, whether

  1. it is just a typo fix in source text and no need to touch translation, or
  2. translation need update due to semantic change

Describe proposed solution

  1. compare source string during extraction for sourceLocale and remember changed text id
  2. Mark translation changed accordingly

Additional context Since I read the comparison in document between JSON and PO, and it mentioned

The drawback of this format is that all metadata about message are lost. That includes default message, origin of message and any message flags (obsolete, fuzzy, etc).

and I presumed fuzzy was extracted by cli.

Maybe I'm using the cli wrong. Would be great to have an official guide for this feature if exists.

semoal commented 3 years ago

I don't remember to see fuzzy messages on Lingui codebase. If you want to create a pull request, contributions are welcome =)

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.