refactor(histogram): don't reach into Grafana's global i18n translations
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
},
|
||||
"files": [
|
||||
"./dist",
|
||||
"./src/locales",
|
||||
"./README.md",
|
||||
"./CHANGELOG.md",
|
||||
"./LICENSE_APACHE2"
|
||||
@@ -35,6 +36,7 @@
|
||||
"bundle": "rollup -c rollup.config.ts --configPlugin esbuild",
|
||||
"clean": "rimraf ./dist ./compiled ./package.tgz",
|
||||
"typecheck": "tsc --emitDeclarationOnly false --noEmit",
|
||||
"i18n-extract": "i18next --config src/locales/i18next-parser.config.cjs",
|
||||
"prepack": "cp package.json package.json.bak && node ../../scripts/prepare-npm-package.js",
|
||||
"postpack": "mv package.json.bak package.json"
|
||||
},
|
||||
|
||||
@@ -64,9 +64,7 @@ export const HistogramPanel = ({ data, options, fieldConfig, width, height }: Pr
|
||||
return (
|
||||
<div className="panel-empty">
|
||||
<p>
|
||||
<Trans i18nKey="histogram.histogram-panel.no-histogram-found-in-response">
|
||||
No histogram found in response
|
||||
</Trans>
|
||||
<Trans i18nKey="grafana-histogram.panel.no-data-message">No histogram found in response</Trans>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"grafana-histogram": {
|
||||
"panel": {
|
||||
"no-data-message": "No histogram found in response"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
module.exports = {
|
||||
locales: ['en-US'], // Only en-US is updated - Crowdin will PR with other languages
|
||||
sort: true,
|
||||
createOldCatalogs: false,
|
||||
failOnWarnings: true,
|
||||
verbose: false,
|
||||
resetDefaultValueLocale: 'en-US', // Updates extracted values when they change in code
|
||||
|
||||
defaultNamespace: 'grafana-histogram',
|
||||
input: ['../**/*.{tsx,ts}'],
|
||||
output: './src/locales/$LOCALE/$NAMESPACE.json',
|
||||
};
|
||||
@@ -9047,9 +9047,6 @@
|
||||
},
|
||||
"histogram": {
|
||||
"category-histogram": "Histogram",
|
||||
"histogram-panel": {
|
||||
"no-histogram-found-in-response": "No histogram found in response"
|
||||
},
|
||||
"name-fill-opacity": "Fill opacity",
|
||||
"name-gradient-mode": "Gradient mode",
|
||||
"name-line-width": "Line width",
|
||||
|
||||
Reference in New Issue
Block a user