schizophrenicmaniac opened a new pull request, #45458:
URL: https://github.com/apache/superset/pull/45458
### SUMMARY
The candlestick chart labels its values with `t('Open')`, `t('High')`,
`t('Low')` and `t('Close')`, in both the tooltip (`OHLC_LABELS` in
`Candlestick/constants.ts`) and the metric controls in `controlPanel.tsx`.
`Close` is the same msgid as the close button in dialogs and modals, so a
catalog can only have one translation for both. In Japanese the chart showed
閉じる ("close a window") where it should say 終値 (closing price).
The frontend `t()` has no msgctxt support, so the fix gives the labels their
own msgids: "Open price", "Close price", "High price" and "Low price". I
renamed all four rather than just Close so the tooltip and control panel stay
consistent. Nothing is lost: "Open", "High" and "Low" weren't translated in any
catalog and aren't used anywhere else, so they drop out of the template.
"Close" stays for the dialogs.
`messages.pot` and the `.po` catalogs are updated to match. I also filled in
the Japanese translations (始値, 高値, 安値, 終値), using the same terms the ja catalog
already uses for "Opening/Highest/Lowest/Closing value for each period."
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screenshots still to be added. Before: the tooltip and the Query section
show "Open", "Close", "High", "Low", and in Japanese "Close" shows as 閉じる.
After: they show "Open price", "Close price", "High price", "Low price", and in
Japanese 始値, 終値, 高値, 安値.
### TESTING INSTRUCTIONS
1. Create or open a Candlestick chart and check that the Query section
labels the metric controls "Open price", "Close price", "High price" and "Low
price".
2. Hover a candle and check that the tooltip uses the same four labels.
3. Switch the UI language to Japanese (with translations built) and check
that the chart shows 始値/終値/高値/安値, while dialog close buttons still say 閉じる.
4. `npm run test -- plugins/plugin-chart-echarts/test/Candlestick`
### ADDITIONAL INFORMATION
- [x] Has associated issue: Fixes #45442
- [ ] Required feature flags:
- [x] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]