You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "msyavuz (via GitHub)" <gi...@apache.org> on 2025/09/01 09:05:34 UTC
[PR] fix(ChartCreation): Translate chart description [superset]
msyavuz opened a new pull request, #34918:
URL: https://github.com/apache/superset/pull/34918
<!---
Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
Example:
fix(dashboard): load charts correctly
-->
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
Translate chart descriptions if they exist
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
After:
<img width="1162" height="920" alt="image" src="https://github.com/user-attachments/assets/5855da00-1727-440c-b929-a08c5a41cf17" />
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
Change the language and see chart descriptions update on the chart creation page
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [x] Has associated issue: Fixes #34914
- [ ] Required feature flags:
- [ ] 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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ChartCreation): Translate chart description [superset]
Posted by "korbit-ai[bot] (via GitHub)" <gi...@apache.org>.
korbit-ai[bot] commented on code in PR #34918:
URL: https://github.com/apache/superset/pull/34918#discussion_r2313356110
##########
superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx:
##########
@@ -814,8 +814,9 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) {
))}
</TagsWrapper>
<Description>
- {selectedVizMetadata?.description ||
- t('No description available.')}
+ {t(
+ selectedVizMetadata?.description || 'No description available.',
+ )}
Review Comment:
### Improper Translation of Chart Description <sub></sub>
<details>
<summary>Tell me more</summary>
###### What is the issue?
The function attempts to translate both the description and the fallback text in a single t() call, which may lead to incorrect translations for chart descriptions.
###### Why this matters
If the description contains variables or special formatting, they won't be properly handled when wrapped in a single translation call with the fallback text.
###### Suggested change ∙ *Feature Preview*
Separate the translation of the description and fallback text:
```typescript
selectedVizMetadata?.description
? t(selectedVizMetadata.description)
: t('No description available.')
```
###### Provide feedback to improve future suggestions
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/2a34c668-db57-4ddb-91b1-2f163263c227/upvote) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/2a34c668-db57-4ddb-91b1-2f163263c227?what_not_true=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/2a34c668-db57-4ddb-91b1-2f163263c227?what_out_of_scope=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/2a34c668-db57-4ddb-91b1-2f163263c227?what_not_in_standard=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/2a34c668-db57-4ddb-91b1-2f163263c227)
</details>
<sub>
💬 Looking for more details? Reply to this comment to chat with Korbit.
</sub>
<!--- korbi internal id:662d1467-a2f7-4afe-9301-005afbe12c91 -->
[](662d1467-a2f7-4afe-9301-005afbe12c91)
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ChartCreation): Translate chart description [superset]
Posted by "msyavuz (via GitHub)" <gi...@apache.org>.
msyavuz merged PR #34918:
URL: https://github.com/apache/superset/pull/34918
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org