lvgl / lv_i18n

Internationalization (i18n) for LVGL
MIT License
57 stars 17 forks source link

Add option --dump-sourceref to generate a file containing sourceKeys #52

Open bubeck opened 1 year ago

bubeck commented 1 year ago

This helps translators to find the context of a message to better understand the meaning of a message. It generates (at the end of "extract") a file containing (mainly) sourceKeys in a meaningfull sorting order like:

[
  {
    "key": "Device init",
    "line": 384,
    "plural": false,
    "fileName": "../fc/fc.c"
  },
  {
    "key": "Device ready",
    "line": 388,
    "plural": false,
    "fileName": "../fc/fc.c"
  },
  ...
puzrin commented 1 year ago

I know about optional "context" in big systems. But is this really worth add for embedded? Usually simple text search in IDE shows all locations at once.

bubeck commented 1 year ago

Thanks for your review!

We have currently around 500 keys and will probably get to 700+. "context" could help translators to understand, what the meaning is. We have around 827 files and this is not an simple text search. So it helps, but does not harm from my point of view. It also does not add much complexity to lv_i18n.

puzrin commented 1 year ago

Ok. If not urgent - let's keep it open for a while. I will think about possible solutions for this feature. No principal objections to land it it somehow.

bubeck commented 1 year ago

Fine. I will rebase the PR to master, so that it does not use lodash anymore and is easily mergable. Stay tuned.