-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: translating variables #20080
base: master
Are you sure you want to change the base?
fix: translating variables #20080
Changes from 11 commits
c2af98d
320ce63
e346f30
593d010
74c6634
09e1a08
47760f6
c873741
e6ff381
769d92a
c801c1d
367dd93
6ecc73d
afb2301
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -314,7 +314,7 @@ export default function DateFilterLabel(props: DateFilterControlProps) { | |
<Divider /> | ||
<div> | ||
<div className="section-title">{t('Actual time range')}</div> | ||
{validTimeRange && <div>{evalResponse}</div>} | ||
{validTimeRange && <div>{t(evalResponse)}</div>} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here... is this something we would expect to have in the translation files, or is it a more dynamic value (as it sounds, based on the name) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it's a date or it's write 'No filter', so I think in fact that will juste translate 'no filter' and don't touch to other result There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe it's worth putting a little ternary condition or similar in there, e.g. |
||
{!validTimeRange && ( | ||
<IconWrapper className="warning"> | ||
<Icons.ErrorSolidSmall iconColor={theme.colors.error.base} /> | ||
|
@@ -373,7 +373,7 @@ export default function DateFilterLabel(props: DateFilterControlProps) { | |
> | ||
<Tooltip placement="top" title={tooltipTitle}> | ||
<Label className="pointer" data-test="time-range-trigger"> | ||
{actualTimeRange} | ||
{t(actualTimeRange)} | ||
</Label> | ||
</Tooltip> | ||
</StyledPopover> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3877,7 +3877,27 @@ | |
], | ||
"Scope": ["Périmètre"], | ||
"Dependent on": ["Dépend de"], | ||
"No matching records found": ["Aucun résultat trouvé"] | ||
"No matching records found": ["Aucun résultat trouvé"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isn't the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes indeed! I thought that was covered in this PR, but that doesn't seem to be the case. |
||
"Trend": ["Tendance"], | ||
"Total (Count)": ["Total (Somme)"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Count != Somme |
||
"Total (%s)": ["Total (%s)"], | ||
"Total (Count Unique Values)": ["Total (Somme)"], | ||
"Total (List Unique Values)": ["Total (Somme)"], | ||
"Sum": ["Somme"], | ||
"Average": ["Moyenne"], | ||
"Median": ["Médiane"], | ||
"Sample Variance": ["Variance échantillon"], | ||
"Sample Standard Deviation": ["Écart-type échantillon"], | ||
"Minimum": ["Minimum"], | ||
"Maximum": ["Maximum"], | ||
"First": ["Premier"], | ||
"Last": ["Dernier"], | ||
"Sum as Fraction of Total": ["Somme comme fraction du total"], | ||
"Sum as Fraction of Rows": ["Somme comme fraction des lignes"], | ||
"Sum as Fraction of Columns": ["Somme comme fraction des colonnes"], | ||
"Count as Fraction of Total": ["Décompte comme fraction du total"], | ||
"Count as Fraction of Rows": ["Décompte comme fraction des lignes"], | ||
"Count as Fraction of Columns": ["Décompte comme fraction des colonnes"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mistercrunch do the above translations look correct to you? |
||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like something that might not have a static/expected value, is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey in my understanding of the translation framework, it does static analysis of the code to find translatable strings, it only works on constants not on variables.