Skip to content

Commit

Permalink
i18n-ify and simplify text
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasolson committed May 1, 2019
1 parent cae1f06 commit 82f085f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -85,7 +85,8 @@
</form>
<button ng-disabled="migration.isMigrating || !migration.newTitle.trim()" class="kuiButton kuiButton--primary kuiButton--iconText" ng-click="migrate()">
<span ng-if="migration.isMigrating" class="euiLoadingSpinner euiLoadingSpinner--medium" />
Migrate
<span i18n-id="kbn.management.editIndexPattern.migrate"
i18n-default-message="Migrate"></span>
</button>
</div>
</div>
Expand Down
7 changes: 3 additions & 4 deletions src/legacy/ui/public/index_patterns/_index_pattern.js
Expand Up @@ -35,6 +35,7 @@ import { IndexPatternsPatternCacheProvider } from './_pattern_cache';
import { FieldsFetcherProvider } from './fields_fetcher_provider';
import { SavedObjectsClientProvider, findObjectByTitle } from '../saved_objects';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n/react';

export function getRoutes() {
return {
Expand Down Expand Up @@ -122,9 +123,7 @@ export function IndexPatternProvider(Private, config, Promise, confirmModalPromi
});

const warningText = i18n.translate('common.ui.indexPattern.warningText', {
defaultMessage: 'Instead of querying indices only matching the pattern {title}, you are now querying all indices ' +
'matching {index}. This index pattern should be migrated to a wildcard-based index pattern. To do so, edit the ' +
'index pattern in Management.',
defaultMessage: 'Currently querying all indices matching {index}. {title} should be migrated to a wildcard-based index pattern.',
values: {
title: indexPattern.title,
index: indexPattern.getIndex()
Expand All @@ -139,7 +138,7 @@ export function IndexPatternProvider(Private, config, Promise, confirmModalPromi
<EuiFlexGroup justifyContent="flexEnd" gutterSize="s">
<EuiFlexItem grow={false}>
<EuiButton size="s" href={kbnUrl.getRouteHref(indexPattern, 'edit')}>
Edit index pattern
<FormattedMessage id="common.ui.indexPattern.editIndexPattern" defaultMessage="Edit index pattern" />
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
Expand Down

0 comments on commit 82f085f

Please sign in to comment.