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