Skip to content

Commit

Permalink
Remove angular-translate (elastic#13066)
Browse files Browse the repository at this point in the history
* remove angular translate

* remove angular-translate deps from yarn.lock
  • Loading branch information
epixa authored Jan 12, 2018
1 parent 7431ec1 commit 61c7f21
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 244 deletions.
186 changes: 0 additions & 186 deletions docs/development/plugin/development-internationalization.asciidoc

This file was deleted.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
"angular-route": "1.4.7",
"angular-sanitize": "1.5.7",
"angular-sortable-view": "0.0.15",
"angular-translate": "2.13.1",
"autoprefixer": "6.5.4",
"babel-core": "6.21.0",
"babel-jest": "21.0.0",
Expand Down Expand Up @@ -243,7 +242,6 @@
"faker": "1.1.0",
"getopts": "2.0.0",
"grunt": "1.0.1",
"grunt-angular-translate": "0.3.0",
"grunt-aws-s3": "0.14.5",
"grunt-babel": "6.0.0",
"grunt-cli": "0.1.13",
Expand Down
3 changes: 0 additions & 3 deletions src/ui/public/debounce/__tests__/debounce.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ function init() {

debounce = $injector.get('debounce');
debounceFromProvider = Private(DebounceProvider);

// ensure there is a clean slate before testing deferred tasks
$timeout.flush();
});
}

Expand Down
11 changes: 2 additions & 9 deletions tasks/build/verify_translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ import { collectUiExports } from '../../src/ui';
import { I18n } from '../../src/ui/ui_i18n/i18n';

export default function (grunt) {

grunt.registerTask('_build:verifyTranslations', [
'i18nextract',
'_build:check'
]);

grunt.registerTask('_build:check', async function () {
grunt.registerTask('_build:verifyTranslations', async function () {
const done = this.async();

try {
Expand All @@ -36,8 +30,7 @@ export default function (grunt) {
}

async function verifyTranslations(uiExports) {
const angularTranslations = require(fromRoot('build/i18n_extract/en.json'));
const keysUsedInViews = Object.keys(angularTranslations);
const keysUsedInViews = [];

// Search files for used translation keys
const translationPatterns = [
Expand Down
9 changes: 0 additions & 9 deletions tasks/config/i18nextract.js

This file was deleted.

3 changes: 1 addition & 2 deletions webpackShims/angular.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
require('jquery');
require('../node_modules/angular/angular');
require('../node_modules/angular-translate');
module.exports = window.angular;

require('../node_modules/angular-elastic/elastic');

require('ui/modules').get('kibana', ['monospaced.elastic', 'pascalprecht.translate']);
require('ui/modules').get('kibana', ['monospaced.elastic']);
12 changes: 2 additions & 10 deletions webpackShims/ui-bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
require('angular');
require('ui/angular-bootstrap');
var uiModules = require('ui/modules').uiModules;
var chrome = require('ui/chrome');

var kibana = uiModules.get('kibana', ['ui.bootstrap', 'pascalprecht.translate']);
var kibana = uiModules.get('kibana', ['ui.bootstrap']);

module.exports = kibana.config(function ($tooltipProvider) {
$tooltipProvider.setTriggers({ 'mouseenter': 'mouseleave click' });
})
.config(function ($translateProvider) {
$translateProvider.translations('default', chrome.getTranslations());
$translateProvider.preferredLanguage('default');
// Enable escaping of HTML
// issue in https://angular-translate.github.io/docs/#/guide/19_security
$translateProvider.useSanitizeValueStrategy('escape');
});
});
26 changes: 3 additions & 23 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,7 @@ angular-sortable-view@0.0.15:
version "0.0.15"
resolved "https://registry.yarnpkg.com/angular-sortable-view/-/angular-sortable-view-0.0.15.tgz#e8463df909db83d641b028f0773a10d50292874f"

angular-translate@2.13.1:
version "2.13.1"
resolved "https://registry.yarnpkg.com/angular-translate/-/angular-translate-2.13.1.tgz#05673eb371986fc11edc151f590299d7e0c46228"
dependencies:
angular ">=1.2.26 <=1.6"

angular@1.6.5, angular@>=1.0.6, "angular@>=1.2.26 <=1.6":
angular@1.6.5, angular@>=1.0.6:
version "1.6.5"
resolved "https://registry.yarnpkg.com/angular/-/angular-1.6.5.tgz#37f788eebec5ce2e3fa02b17bbcb2a231576a0d6"

Expand Down Expand Up @@ -4157,12 +4151,6 @@ flat-cache@^1.2.1:
graceful-fs "^4.1.2"
write "^0.2.1"

flat@^1.2.0:
version "1.6.1"
resolved "https://registry.yarnpkg.com/flat/-/flat-1.6.1.tgz#476b9dbb70d5e9340dbbc038bde084a20945921c"
dependencies:
is-buffer "~1.1.2"

flatten@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
Expand Down Expand Up @@ -4698,14 +4686,6 @@ growly@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"

grunt-angular-translate@0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/grunt-angular-translate/-/grunt-angular-translate-0.3.0.tgz#bd0118afa24d8f570231fd8d52d829d808c511b3"
dependencies:
flat "^1.2.0"
json-stable-stringify "^1.0.0"
lodash "~2.4.1"

grunt-aws-s3@0.14.5:
version "0.14.5"
resolved "https://registry.yarnpkg.com/grunt-aws-s3/-/grunt-aws-s3-0.14.5.tgz#f55019acfbeb05b89b245a51ccf1a81dbf868df4"
Expand Down Expand Up @@ -5588,7 +5568,7 @@ is-binary-path@^1.0.0:
dependencies:
binary-extensions "^1.0.0"

is-buffer@^1.0.2, is-buffer@^1.1.4, is-buffer@^1.1.5, is-buffer@~1.1.2:
is-buffer@^1.0.2, is-buffer@^1.1.4, is-buffer@^1.1.5:
version "1.1.6"
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"

Expand Down Expand Up @@ -6482,7 +6462,7 @@ json-stable-stringify-without-jsonify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"

json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1:
json-stable-stringify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af"
dependencies:
Expand Down

0 comments on commit 61c7f21

Please sign in to comment.