Skip to content

Commit

Permalink
Update after review
Browse files Browse the repository at this point in the history
Update the following review comments:
#8766 (review)
#8766 (review)
  • Loading branch information
hickeyma committed Mar 6, 2017
1 parent 2f269f8 commit 5e94886
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 20 deletions.
11 changes: 0 additions & 11 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@ module.exports = function (grunt) {
}
}()),

i18nextract: {
default_options: {
src: [ 'src/**/*.js', 'src/**/*.html' ],
lang: ['en'],
dest: 'build/tmp'
}
},

nodeVersion: grunt.file.read('.node-version').trim(),

meta: {
Expand Down Expand Up @@ -73,7 +65,4 @@ module.exports = function (grunt) {
// load task definitions
grunt.task.loadTasks('tasks');
grunt.task.loadTasks('tasks/build');

// load NPM tasks
grunt.loadNpmTasks('grunt-angular-translate');
};
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ <h1 translate="KIBANA-CONFIGURE_INDEX_PATTERN"></h1>
<small ng-show="index.nameInterval.name == 'weeks'">
<strong translate="KIBANA-NOTE_COLON"></strong>&nbsp;
<span translate="KIBANA-WEEKLY_ISO_NOTICE"></span>
See <a href="https://en.wikipedia.org/wiki/ISO_week_date" target="_blank" title="Wikipedia: ISO Week Date" translate="KIBANA-WIKI_ISO_WEEK_DATE"></a>
<span translate="KIBANA-SEE"></span>
<a href="https://en.wikipedia.org/wiki/ISO_week_date" target="_blank" title="Wikipedia: ISO Week Date" translate="KIBANA-WIKI_ISO_WEEK_DATE"></a>
</small>
</div>

Expand Down Expand Up @@ -76,7 +77,7 @@ <h1 translate="KIBANA-CONFIGURE_INDEX_PATTERN"></h1>
<p class="help-block" translate="KIBANA-WILDCARD_DEFAULT_EXPANDED_TO_CURRENT_TIME_RANGE"></p>

<p class="help-block">
<span translate="KIBANA-SEARCH_AGAINST_INDX_PATTERN"></span>
<span translate="KIBANA-SEARCH_AGAINST_INDEX_PATTERN"></span>
<em translate="KIBANA-LOGSTASH_WILDCARD"></em>
<span translate="KIBANA-ACTUALLY_QUERY"></span>
<em translate="KIBANA-EXAMPLE_TIME_RANGE"></em>
Expand Down Expand Up @@ -163,7 +164,8 @@ <h4 translate="KIBANA-ALERT_INDEX_PATTERN_DEPRECATED"></h4>
ng-class="index.fetchFieldsError ? 'btn-default' : 'btn-success'"
type="submit"
class="btn">
<span ng-hide="form.name.$error.indexNameInput">{{index.fetchFieldsError || "Create" }}</span>
<span ng-hide="form.name.$error.indexNameInput" ng-if="index.fetchFieldsError">{{index.fetchFieldsError}}</span>
<span ng-hide="form.name.$error.indexNameInput" ng-if="!index.fetchFieldsError" translate="KIBANA-CREATE"></span>
<span ng-show="form.name.$error.indexNameInput" translate="KIBANA-INVALID_INDEX_PATTERN"></span>
</button>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ <h5>
ng-if="editingId"
href="#/management/kibana/index"
class="btn btn-primary btn-xs"
aria-label="Add New">
<span class="sr-only">Add New</span>
<i aria-hidden="true" class="fa fa-plus"></i> Add New
aria-label="{{ 'KIBANA-ADD_NEW' | translate }}">
<span class="sr-only" translate="KIBANA-ADD_NEW"></span>
<i aria-hidden="true" class="fa fa-plus"></i>
<span class="sr-only" translate="KIBANA-ADD_NEW"></span>
</a>
</h5>
</div>
Expand Down
11 changes: 9 additions & 2 deletions src/core_plugins/kibana/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"KIBANA-INDEX_NAME_VAR": "{{indexName}} ",
"KIBANA-SEARCH_ALL_DATA": "and will have to search through all matching indices regardless of whether they have data that matches the current time range.",
"KIBANA-WILDCARD_DEFAULT_EXPANDED_TO_CURRENT_TIME_RANGE": "By default, searches against any time-based index pattern that contains a wildcard will automatically be expanded to query only the indices that contain data within the currently selected time range.",
"KIBANA-SEARCH_AGAINST_INDX_PATTERN": "Searching against the index pattern ",
"KIBANA-SEARCH_AGAINST_INDEX_PATTERN": "Searching against the index pattern ",
"KIBANA-LOGSTASH_WILDCARD": "logstash-*",
"KIBANA-ACTUALLY_QUERY": " will actually query elasticsearch for the specific matching indices (e.g. ",
"KIBANA-EXAMPLE_TIME_RANGE": "logstash-2015.12.21",
Expand All @@ -45,5 +45,12 @@
"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-NO_DEFAULT_INDEX_PATTERN" : "No default index pattern. You must select or create one to continue.",
"KIBANA-LOADING": "Loading",
"KIBANA-SET_INDEX_NAME_FIRST": "Set an index name first",
"KIBANA-INTERVAL_INDICES_POPULATED" : "Select the interval at which your indices are populated.",
"KIBANA-INDICES_MATCH_PATTERN" : "Unable to fetch mapping. Do you have indices matching the pattern?",
"KIBANA-ADD_NEW" : "Add New",
"KIBANA-SEE" : "See",
"KIBANA-CREATE" : "Create"
}
2 changes: 1 addition & 1 deletion tasks/build/verify_translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function (grunt) {

function verifyTranslations(uiI18nObj)
{
const angularTranslations = require(fromRoot('build/tmp/en.json'));
const angularTranslations = require(fromRoot('build/i18n_extract/en.json'));
const translationKeys = Object.keys(angularTranslations);
const translationPatterns = [
{ regEx: 'i18n\\(\'(.*)\'\\)',
Expand Down
9 changes: 9 additions & 0 deletions tasks/config/i18nextract.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default function (grunt) {
return {
default_options: {
src: ['src/**/*.js', 'src/**/*.html'],
lang: ['en'],
dest: 'build/i18n_extract'
}
};
}

0 comments on commit 5e94886

Please sign in to comment.