fix: button translations missing (#11187)

* button translations missing

* blank space before text
This commit is contained in:
rubenSastre 2020-10-16 06:27:26 +02:00 committed by GitHub
parent dde69d82b3
commit 4f0a06dda5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 9 deletions

View File

@ -50,7 +50,7 @@ describe('QueryAndSaveButtons', () => {
it('renders buttons with correct text', () => {
expect(wrapper.find(Button).contains('Run')).toBe(true);
expect(wrapper.find(Button).contains(' Save')).toBe(true);
expect(wrapper.find(Button).contains('Save')).toBe(true);
});
it('calls onQuery when query button is clicked', () => {

View File

@ -188,7 +188,7 @@ export function Menu({
<Nav className="navbar-right">
{!navbarRight.user_is_anonymous && <NewMenu />}
{settings && settings.length > 0 && (
<NavDropdown id="settings-dropdown" title="Settings">
<NavDropdown id="settings-dropdown" title={t('Settings')}>
{flatSettings.map((section, index) => {
if (section === '-') {
return (

View File

@ -69,7 +69,7 @@ export default class PublishedStatus extends React.Component {
this.togglePublished();
}}
>
Draft
{t('Draft')}
</Label>
</TooltipWrapper>
);
@ -80,7 +80,7 @@ export default class PublishedStatus extends React.Component {
placement="bottom"
tooltip={draftDivTooltip}
>
<Label>Draft</Label>
<Label>{t('Draft')}</Label>
</TooltipWrapper>
);
}
@ -98,7 +98,7 @@ export default class PublishedStatus extends React.Component {
this.togglePublished();
}}
>
Published
{t('Published')}
</Label>
</TooltipWrapper>
);

View File

@ -88,7 +88,7 @@ export default function QueryAndSaveBtns({
buttonSize="small"
disabled={!canAdd}
>
<i className="fa fa-stop-circle-o" /> Stop
<i className="fa fa-stop-circle-o" /> {t('Stop')}
</Button>
) : (
<Button
@ -116,7 +116,7 @@ export default function QueryAndSaveBtns({
onClick={onSave}
data-test="query-save-button"
>
<i className="fa fa-plus-circle" /> Save
<i className="fa fa-plus-circle" /> {t('Save')}
</Button>
</ButtonGroup>
{errorMessage && (

View File

@ -37,7 +37,7 @@
</table>
<div class="filter-action" style="display:none">
<button type="submit" class="btn btn-sm btn-primary" id="search-action">
Search&nbsp;&nbsp;<i class="fa fa-search"></i>
{{_("Search")}}&nbsp;&nbsp;<i class="fa fa-search"></i>
</button>
</div>
</div>
@ -54,7 +54,7 @@
$('.filter-action').toggle(true);
} else {
$('.filter-action').toggle(true);
$('.filter-action > button').html('Refresh&nbsp;&nbsp;<i class="fa fa-refresh"></i>');
$('.filter-action > button').html('{{_("Refresh")}}&nbsp;&nbsp;<i class="fa fa-refresh"></i>');
}
}

View File

@ -74,6 +74,7 @@ class DashboardMixin: # pylint: disable=too-few-public-methods
"slug": _("Slug"),
"charts": _("Charts"),
"owners": _("Owners"),
"published": _("Published"),
"creator": _("Creator"),
"modified": _("Modified"),
"position_json": _("Position JSON"),