Description
Problem
Given the following en.json5
fragment, the intended translator comments do not appear in the .pot
:
{
homepage: {
/** homepage.content.a-b are used to describe blah blah blah */
content: {
a: "",
b: "",
},
},
}
Instead, it's necessary to move the comment on content
to each of homepage.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 in getComment
). It should walk up the tree of entry.parent...
until !parent
and include each comment.
Additional context
Noticed during #4549.
Metadata
Assignees
Labels
Type
Projects
Status
📋 Backlog