Closed co-dax closed 7 months ago
I found this issue today. I think the note
should not be removed and the note
tag is not contains in <context-group>
tag.
The <note>
tag is very important for translation. It should be keeped.
@co-dax , @doggy8088 I'm not sure I understand your point(s).
includeContext: false
(the default value), then the note
node is not included in the translation files. Can you please double check and/or give a reproduction?includeContext
does not specifically adress the xml node context-group
, but "contextual information" such as location/meaning/description (e.g. with XLF2 naming of nodes is different).Or this this about something else entirely?
@daniel-sc Please check my repo: https://github.com/doggy8088/ng-i18n-demo/tree/ng-extract-i18n-merge
At first, check this commit: https://github.com/doggy8088/ng-i18n-demo/commit/a45ff6d2d9fd9174f5a880accbe3274f5155baa3?diff=unified&w=0
After I run ng add ng-extract-i18n-merge
and ng extract-i18n
command. The <note>
has been removed.
I think the <context-group>
should be removed by default, but the <note priority="1" from="description">放置在首頁的招呼語</note>
should be kept. It's different.
@daniel-sc I was using version 1.4 and with that version it used to work as I described above. I have just upgraded to version 2.9.1 and now it works as described by @doggy8088 just above. I thnk @doggy8088 is right in his last comment on how it should be working.
@doggy8088 @co-dax ok, finally I got your point :) Would one of you be motivated to make a PR for this bug?
@daniel-sc Good job! 😃 Thanks! 👍
At the following link https://github.com/daniel-sc/ng-extract-i18n-merge?tab=readme-ov-file#configuration the docs are saying the following in the context of
includeContext
option:...but the
note
tag in preserved in the destination/merged file which should be the correct behaviour sincenote
tag in outside ofcontext-group
to which the propertyincludeContext
is (at least should be) referring.So I would say that the excerpt:
...should be removed from the link I reported above.