Is it possible to duplicate the "submenu" in the json file? #320
-
I’m working on a simple package with a number of menu items. The menu json file looks something like this: {
"context-menu": {
"atom-text-editor": [{
"label": "Pulsar Text Tools",
"submenu": [
// collection of items
]
}]
},
"menu": [{
"label": "Packages",
"submenu": [{
"label": "Pulsar Text Tools",
"submenu": [
// the same as above
]
}]
}]
} As commented (I know, you can’t comment a JSON file), I want the main submenu to have the same content as the context menu. Apart from the tedium (all right, copy & paste isn’t so difficult, but it’s annoying every time I want to make a change), there’s also the risk of error. Is there a way of setting one submenu and using it for the other? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
I was in that section of code some time ago working on localization, and iirc there unfortunately isn't any established method to duplicate this data. You could add a build step in your package maybe to do this kind of work? Or if there's something you have in mind we could look at a PR or feature request |
Beta Was this translation helpful? Give feedback.
I was in that section of code some time ago working on localization, and iirc there unfortunately isn't any established method to duplicate this data.
You could add a build step in your package maybe to do this kind of work? Or if there's something you have in mind we could look at a PR or feature request