manifest2po: Parse also keywords
This commit is contained in:
parent
23e8eb1591
commit
ec85d30d0f
1 changed files with 13 additions and 0 deletions
|
|
@ -87,6 +87,17 @@ function process_manifest(manifest) {
|
|||
process_menu(manifest.tools);
|
||||
}
|
||||
|
||||
function process_keywords(keywords) {
|
||||
keywords.forEach(v => {
|
||||
v.matches.forEach(keyword =>
|
||||
push({
|
||||
msgid: keyword,
|
||||
locations: [ filename ]
|
||||
})
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
function process_menu(menu) {
|
||||
for (var m in menu) {
|
||||
if (menu[m].label) {
|
||||
|
|
@ -95,6 +106,8 @@ function process_menu(menu) {
|
|||
locations: [ filename ]
|
||||
});
|
||||
}
|
||||
if (menu[m].keywords)
|
||||
process_keywords(menu[m].keywords);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue