-
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: Add french translation missing #20061
Changes from 3 commits
6ffca53
21c1c03
d92bf95
eb43b7a
fb9c84d
5e741ff
6032030
6eb0613
7da2812
338e336
ba099e4
3af150c
1d270f4
086c1df
1c459c9
3d41d90
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 |
---|---|---|
|
@@ -35,6 +35,7 @@ import { | |
} from 'src/dashboard/util/constants'; | ||
import { slicePropShape } from 'src/dashboard/util/propShapes'; | ||
import { FILTER_BOX_MIGRATION_STATES } from 'src/explore/constants'; | ||
import moment from 'moment'; | ||
import AddSliceCard from './AddSliceCard'; | ||
import AddSliceDragPreview from './dnd/AddSliceDragPreview'; | ||
import DragDroppable from './dnd/DragDroppable'; | ||
|
@@ -221,7 +222,7 @@ class SliceAdder extends React.Component { | |
innerRef={dragSourceRef} | ||
style={style} | ||
sliceName={cellData.slice_name} | ||
lastModified={cellData.changed_on_humanized} | ||
lastModified={moment.utc(cellData.changed_on).fromNow()} | ||
visType={cellData.viz_type} | ||
datasourceUrl={cellData.datasource_url} | ||
datasourceName={cellData.datasource_name} | ||
|
@@ -253,7 +254,7 @@ class SliceAdder extends React.Component { | |
value={this.state.sortBy} | ||
onChange={this.handleSelect} | ||
options={Object.entries(KEYS_TO_SORT).map(([key, label]) => ({ | ||
label: t('Sort by %s', label), | ||
label: t('Sort by %s', t(label)), | ||
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. This doesn't look right; you can't translate variables like this (the original code looks correct) 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. PR: #20080 |
||
value: key, | ||
}))} | ||
placeholder={t('Sort by')} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ import React from 'react'; | |
import PropTypes from 'prop-types'; | ||
import { DragLayer } from 'react-dnd'; | ||
|
||
import moment from 'moment'; | ||
import AddSliceCard from '../AddSliceCard'; | ||
import { slicePropShape } from '../../util/propShapes'; | ||
import { | ||
|
@@ -72,7 +73,7 @@ function AddSliceDragPreview({ dragItem, slices, isDragging, currentOffset }) { | |
transform: `translate(${currentOffset.x}px, ${currentOffset.y}px)`, | ||
}} | ||
sliceName={slice.slice_name} | ||
lastModified={slice.changed_on_humanized} | ||
lastModified={moment.utc(slice.changed_on).fromNow()} | ||
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 |
||
visType={slice.viz_type} | ||
datasourceUrl={slice.datasource_url} | ||
datasourceName={slice.datasource_name} | ||
|
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. Again, you can't translate a variable (please see e.g. https://stackoverflow.com/questions/34579316/flask-babel-how-to-translate-variables for an explanation why this is the case) 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. change has been move in this PR : #20080 |
||
{!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> | ||
|
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 should not be changed (@dpgaspar can comment in more detail, but IIRC, the
changed_on
property needs to be constructed in the backend right now)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.
changed_on_humanized has no translation. I will be glade to keep 'changed_on_humanized' but what can I change so that the translation is done
I move the change on this PR : #20082
we can discuss about that on the new PR