context storage
Opened this issue · 2 comments
It's often useful to be able to give a translator a short description of the context needed for a particular translation. Especially when translating from English, which has a lot of different meanings with the same spelling. It would be useful for us if lv_i18n could store context descriptions alongside in the yml file somehow. Ex:
de:
Close: schließe #An action, close a window or close the door
de:
Close: in der Nähe #adverb, nearby, not far away
Currently lv_i18n extract
discards comments though, I saw Puzrin mentioned js-yaml doesn't have an AST, so there's not a good way to update just the values and keep the comments and formatting. I wanted to mention the idea of storing context since it has always been useful to supply to translators for a number of projects, perhaps others also would use it.
If you need advanced metadata management, it's probably better to select more advanced projects for translation. This one was done to be compact for "small projects," and having no metadata support is a trade-off.
Also, you can partially dim the problem by embedding context into variables:
- "schedule_close__door_or_window".
- "Close## An action, close a window or close the door" - cut str after
##
in translation at post-processor.
That will also require a translation file for English, but the content will be descriptive.