aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCourt Ewing <court@epixa.com>2017-07-24 12:49:16 -0400
committerGitHub <noreply@github.com>2017-07-24 12:49:16 -0400
commit90c713fd18133cba55dcaa5bc665bcb9d48e4ccc (patch)
tree8df03d13389df604190019aef7306a4bcd95f906
parent190cd5f3f64f3b3f35e413dd9c9a0d60ce55313e (diff)
Remove translations from management section (#13049)
We need to revisit how we embed translations into templates, so until we do we might as well go back to embedding text directly in the page. The translation implementation now makes it difficult to navigate throughout complicated HTML. It also suffers from an inability to flag on unused translation keys, which creates a good deal of technical debt. Close to half of all translation keys in the translation file in this initial pilot were already unused since it was introduced a couple of months ago.
-rw-r--r--src/core_plugins/kibana/public/management/sections/indices/create_index_pattern/create_index_pattern.html49
-rw-r--r--src/core_plugins/kibana/public/management/sections/indices/create_index_pattern/create_index_pattern.js8
-rw-r--r--src/core_plugins/kibana/public/management/sections/indices/create_index_pattern/pick_create_button_text.js10
-rw-r--r--src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/edit_index_pattern.html2
-rw-r--r--src/core_plugins/kibana/public/management/sections/indices/index.html8
-rw-r--r--src/core_plugins/kibana/translations/en.json44
6 files changed, 37 insertions, 84 deletions
diff --git a/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern/create_index_pattern.html b/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern/create_index_pattern.html
index ad497a5f4..b3a65d8db 100644
--- a/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern/create_index_pattern.html
+++ b/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern/create_index_pattern.html
@@ -5,15 +5,15 @@
data-test-subj="createIndexPatternContainer"
class="kuiViewContent"
>
- <h1
- class="kuiTitle kuiVerticalRhythm"
- translate="KIBANA-CONFIGURE_INDEX_PATTERN"
- ></h1>
+ <h1 class="kuiTitle kuiVerticalRhythm">
+ Configure an index pattern
+ </h1>
- <p
- class="kuiText kuiVerticalRhythm"
- translate="KIBANA-MUST_CONFIGURE_INDEX_PATTERN"
- ></p>
+ <p class="kuiText kuiVerticalRhythm">
+ In order to use Kibana you must configure at least one index pattern.
+ Index patterns are used to identify the Elasticsearch index to run
+ search and analytics against. They are also used to configure fields.
+ </p>
<div class="kuiVerticalRhythm">
<!-- Form -->
@@ -27,14 +27,15 @@
<!-- Index pattern input -->
<div class="kuiVerticalRhythm">
<label class="kuiLabel kuiVerticalRhythmSmall">
- <span translate="KIBANA-INDEX_PATTERN"></span>
+ <span>Index pattern</span>
<small>
<a
class="kuiLink"
ng-click="controller.toggleAdvancedIndexOptions();"
- translate="KIBANA-ADVANCED_OPTIONS"
- ></a>
+ >
+ advanced options
+ </a>
</small>
</label>
@@ -67,18 +68,16 @@
<!-- Input help text -->
<div class="kuiVerticalRhythm">
- <p
- class="kuiSubText kuiVerticalRhythmSmall"
- translate="KIBANA-WILDCARD_DYNAMIC_INDEX_PATTERNS"
- ></p>
+ <p class="kuiSubText kuiVerticalRhythmSmall">
+ Patterns allow you to define dynamic index names using * as a wildcard. Example: logstash-*
+ </p>
</div>
</div>
<!-- Index pattern id input -->
<div class="kuiVerticalRhythm" ng-if="controller.showAdvancedOptions">
- <label
- class="kuiLabel kuiVerticalRhythmSmall"
- translate="KIBANA-INDEX_PATTERN_ID">
+ <label class="kuiLabel kuiVerticalRhythmSmall">
+ Index pattern ID
</label>
<div class="kuiVerticalRhythm kuiVerticalRhythmSmall">
@@ -96,26 +95,24 @@
<!-- ID help text -->
<div class="kuiVerticalRhythm">
- <p
- class="kuiSubText kuiVerticalRhythmSmall"
- translate="KIBANA-INDEX_PATTERN_SPECIFY_ID"
- ></p>
+ <p class="kuiSubText kuiVerticalRhythmSmall">
+ Creates the index pattern with the specified ID.
+ </p>
</div>
</div>
<!-- Time field select -->
<div class="kuiVerticalRhythm">
<label class="kuiLabel kuiVerticalRhythmSmall">
- <span translate="KIBANA-TIME_FILTER_FIELD_NAME"></span>
+ <span>Time Filter field name</span>
&nbsp;
- <kbn-info info="{{ 'KIBANA-FIELD_FILTER_EVENTS_GLOBAL_TIME' | translate }}"></kbn-info>
+ <kbn-info info="This field will be used to filter events with the global time filter"></kbn-info>
&nbsp;
<small>
<a
class="kuiLink"
ng-click="controller.refreshTimeFieldOptions();"
- translate="KIBANA-REFRESH_FIELDS"
- ></a>
+ >refresh fields</a>
</small>
</label>
diff --git a/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern/create_index_pattern.js b/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern/create_index_pattern.js
index 6ef9fe980..dba0550e0 100644
--- a/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern/create_index_pattern.js
+++ b/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern/create_index_pattern.js
@@ -57,7 +57,7 @@ uiModules.get('apps/management')
return {
options: [
{
- display: $translate.instant('KIBANA-INDICES_DONT_CONTAIN_TIME_FIELDS')
+ display: `The indices which match this index pattern don't contain any time fields.`
}
]
};
@@ -66,7 +66,7 @@ uiModules.get('apps/management')
return {
options: [
{
- display: $translate.instant('KIBANA-NO_DATE_FIELD_DESIRED')
+ display: `I don't want to use the Time Filter`
},
...dateFields.map(field => ({
display: field.name,
@@ -78,7 +78,7 @@ uiModules.get('apps/management')
.catch(err => {
if (err instanceof IndexPatternMissingIndices) {
return {
- error: $translate.instant('KIBANA-INDICES_MATCH_PATTERN')
+ error: 'Unable to fetch mapping. Do you have indices matching the pattern?'
};
}
@@ -221,7 +221,7 @@ uiModules.get('apps/management')
loadingCount = Infinity;
}).catch(err => {
if (err instanceof IndexPatternMissingIndices) {
- return notify.error($translate.instant('KIBANA-NO_INDICES_MATCHING_PATTERN'));
+ return notify.error('Could not locate any indices matching that pattern. Please add the index to Elasticsearch');
}
notify.fatal(err);
diff --git a/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern/pick_create_button_text.js b/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern/pick_create_button_text.js
index 44c5462ac..03416502e 100644
--- a/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern/pick_create_button_text.js
+++ b/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern/pick_create_button_text.js
@@ -6,18 +6,16 @@ export function pickCreateButtonText($translate, state) {
} = state;
if (loading) {
- return $translate.instant('KIBANA-LOADING');
+ return 'Loading';
}
if (invalidIndexName) {
- return $translate.instant('KIBANA-INVALID_INDEX_PATTERN');
+ return 'Invalid index name pattern.';
}
if (!timeFieldOption) {
- return $translate.instant('KIBANA-FIELD_IS_REQUIRED', {
- fieldName: $translate.instant('KIBANA-TIME_FILTER_FIELD_NAME')
- });
+ return 'Time Filter field name is required';
}
- return $translate.instant('KIBANA-CREATE');
+ return 'Create';
}
diff --git a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/edit_index_pattern.html b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/edit_index_pattern.html
index e54b7a4f5..94a12aa77 100644
--- a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/edit_index_pattern.html
+++ b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/edit_index_pattern.html
@@ -15,7 +15,7 @@
<p ng-if="indexPattern.timeFieldName" class="kuiText kuiVerticalRhythm">
<span class="label label-success">
- <i class="fa fa-clock-o"></i><span translate="KIBANA-TIME_FILTER_FIELD_NAME"></span>: {{indexPattern.timeFieldName}}
+ <i class="fa fa-clock-o"></i><span>Time Filter field name</span>: {{indexPattern.timeFieldName}}
</span>
</p>
diff --git a/src/core_plugins/kibana/public/management/sections/indices/index.html b/src/core_plugins/kibana/public/management/sections/indices/index.html
index 03f2b974a..71fac6935 100644
--- a/src/core_plugins/kibana/public/management/sections/indices/index.html
+++ b/src/core_plugins/kibana/public/management/sections/indices/index.html
@@ -6,10 +6,10 @@
ng-if="editingId"
href="#/management/kibana/index"
class="kuiButton kuiButton--primary kuiButton--small"
- aria-label="{{ 'KIBANA-ADD_NEW' | translate }}"
+ aria-label="Create Index Pattern"
>
<span aria-hidden="true" class="kuiIcon fa-plus"></span>
- <span translate="KIBANA-ADD_NEW"></span>
+ <span>Create Index Pattern</span>
</a>
</h5>
</div>
@@ -19,8 +19,8 @@
class="sidebar-item"
>
<div class="sidebar-item-title full-title">
- <span class="label label-warning" translate="KIBANA-WARNING"></span>
- <p translate="KIBANA-NO_DEFAULT_INDEX_PATTERN"></p>
+ <span class="label label-warning">Warning</span>
+ <p>No default index pattern. You must select or create one to continue.</p>
</div>
</li>
diff --git a/src/core_plugins/kibana/translations/en.json b/src/core_plugins/kibana/translations/en.json
index 3b64d9651..ddb7a272e 100644
--- a/src/core_plugins/kibana/translations/en.json
+++ b/src/core_plugins/kibana/translations/en.json
@@ -1,46 +1,4 @@
{
"UI-WELCOME_MESSAGE": "Loading Kibana",
- "UI-WELCOME_ERROR": "Kibana did not load properly. Check the server output for more information.",
- "KIBANA-CONFIGURE_INDEX_PATTERN": "Configure an index pattern",
- "KIBANA-MUST_CONFIGURE_INDEX_PATTERN": "In order to use Kibana you must configure at least one index pattern. Index patterns are used to identify the Elasticsearch index to run search and analytics against. They are also used to configure fields.",
- "KIBANA-INDEX_NAME_CREATED_BY_EVENT_TIMES": "Use event times to create index names ",
- "KIBANA-ALERT_INDEX_PATTERN_DEPRECATED": "Time-interval based index patterns are deprecated!",
- "KIBANA-WE": " We",
- "KIBANA-STRONGLY_RECOMMEND": " strongly recommend",
- "KIBANA-WILD_CARD_PATTERN": " using wildcard pattern names instead of time-interval based index patterns.",
- "KIBANA-RECOMMEND_WILD_CARD_PATTERN_DETAILS": "Kibana is now smart enough to automatically determine which indices to search against within the current time range for wildcard index patterns. This means that wildcard index patterns now get the same performance optimizations when searching within a time range as time-interval patterns.",
- "KIBANA-INDEX_PATTERN_INTERVAL": "Index pattern interval",
- "KIBANA-INDEX_PATTERN": "Index pattern",
- "KIBANA-INDEX_PATTERN_ID": "Index pattern ID",
- "KIBANA-INDEX_PATTERN_SPECIFY_ID": "Creates the index pattern with the specified ID.",
- "KIBANA-WILDCARD_DYNAMIC_INDEX_PATTERNS": "Patterns allow you to define dynamic index names using * as a wildcard. Example: logstash-*",
- "KIBANA-STATIC_TEXT_IN_DYNAMIC_INDEX_PATTERNS": "Patterns allow you to define dynamic index names. Static text in an index name is denoted using brackets. Example: [logstash-]YYYY.MM.DD. Please note that weeks are setup to use ISO weeks which start on Monday.",
- "KIBANA-NOTE_COLON": "Note:",
- "KIBANA-WEEKLY_ISO_NOTICE": "I noticed you are using weekly indices. Kibana requires ISO weeks be used in your index creation.",
- "KIBANA-SAMPLE_ALERT": "Attempted to match the following indices and aliases:",
- "KIBANA-EXPAND_SEARCH": "Expand Search",
- "KIBANA-EXISTING_MATCH_PERCENT": "Pattern matches {{indexExistingMatchPercent}} of existing indices and aliases",
- "KIBANA-NON_MATCHING_INDICES_AND_ALIASES": "Indices and aliases that were found, but did not match the pattern:",
- "KIBANA-MORE": "more",
- "KIBANA-ADVANCED_OPTIONS": "advanced options",
- "KIBANA-TIME_FILTER_FIELD_NAME": "Time Filter field name",
- "KIBANA-NO_DATE_FIELD_DESIRED": "I don't want to use the Time Filter",
- "KIBANA-REFRESH_FIELDS": "refresh fields",
- "KIBANA-INDICES_DONT_CONTAIN_TIME_FIELDS": "The indices which match this index pattern don't contain any time fields.",
- "KIBANA-INVALID_INDEX_PATTERN": "Invalid index name pattern.",
- "KIBANA-DATE_FORMAT_DOCS": "Date Format Documentation",
- "KIBANA-WIKI_ISO_WEEK_DATE": "Wikipedia: ISO Week Date",
- "KIBANA-NO_INDICES_MATCHING_PATTERN": "Could not locate any indices matching that pattern. Please add the index to Elasticsearch",
- "KIBANA-PATTERN_DOES_NOT_MATCH_EXIST_INDICES": "Pattern does not match any existing indices",
- "KIBANA-INVALID_NON_UNIQUE_INDEX_NAME_CREATED": "Invalid pattern, interval does not create unique index names",
- "KIBANA-FIELD_FILTER_EVENTS_GLOBAL_TIME" : "This field will be used to filter events with the global time filter",
- "KIBANA-INTERVAL_INDEX_NAMES_ROTATE" : "The interval at which index names rotate.",
- "KIBANA-WARNING" : "Warning",
- "KIBANA-NO_DEFAULT_INDEX_PATTERN" : "No default index pattern. You must select or create one to continue.",
- "KIBANA-LOADING": "Loading",
- "KIBANA-INDICES_MATCH_PATTERN" : "Unable to fetch mapping. Do you have indices matching the pattern?",
- "KIBANA-ADD_NEW" : "Create Index Pattern",
- "KIBANA-SEE" : "See",
- "KIBANA-CREATE" : "Create",
- "KIBANA-FIELD_IS_REQUIRED": "{{fieldName}} is required"
+ "UI-WELCOME_ERROR": "Kibana did not load properly. Check the server output for more information."
}