Include translator comments from parent nodes in en.json5
instead of just terminal nodes
#4565
Labels
🤖 aspect: dx
Concerns developers' experience with the codebase
🧰 goal: internal improvement
Improvement that benefits maintainers, not users
🟩 priority: low
Low priority and doesn't need to be rushed
🧱 stack: mgmt
Related to repo management and automations
Problem
Given the following
en.json5
fragment, the intended translator comments do not appear in the.pot
:Instead, it's necessary to move the comment on
content
to each ofhomepage.content.a
and.b
, which means duplicating this information. This can be quite tedious to maintain, especially when details about a string change. The repeated comments also make the file harder to read (and it's already pretty bad in that regard, being just a huge blob of json!).Description
We should include comments from parent nodes when pulling the comments for each Entry in
json-to-pot
. Currently, it only retrieves the comment from the current Entry node (which is always a terminal one ingetComment
). It should walk up the tree ofentry.parent...
until!parent
and include each comment.Additional context
Noticed during #4549.
The text was updated successfully, but these errors were encountered: