()
| 96 | } |
| 97 | |
| 98 | export function getI18nInstance(): typeof i18n { |
| 99 | // in Grafana versions < 12.1.0 the i18n instance is exposed through the default export |
| 100 | // used by plugins that support translations from Grafana >= 11.0.0 |
| 101 | const instance: typeof i18n & { default?: typeof i18n } = i18n; |
| 102 | if (instance && instance.default) { |
| 103 | return instance.default; |
| 104 | } |
| 105 | |
| 106 | return instance; |
| 107 | } |
| 108 | |
| 109 | interface Module { |
| 110 | type: 'backend'; |
no outgoing calls
no test coverage detected