- for (const key of [ 'label', 'html', 'descriptionHTML' ]) {
- if (setting[key]) setting[key] = await this.pluginService.translateBy(npmName, setting[key])
- }
-
- if (Array.isArray(setting.options)) {
- const newOptions = []
-
- for (const o of setting.options) {
- newOptions.push({
- value: o.value,
- label: await this.pluginService.translateBy(npmName, o.label)
- })
- }
-
- setting.options = newOptions
- }