diff options
author | shentao999 <shentao@chinamobile.com> | 2019-04-02 09:29:10 +0800 |
---|---|---|
committer | shentao999 <shentao@chinamobile.com> | 2019-04-02 09:29:11 +0800 |
commit | 75d35b5965542bb77c03999fed0e6663cbdd8a27 (patch) | |
tree | 484680826bd3a7b950ab2710b4bd1fb6759351f1 /ecomp-portal-FE-os/client/src | |
parent | 18def1dcb43684553ba04647cfdb6acdaf8bda4d (diff) |
Modify html label to support multi-language
Change-Id: I080a1abce7daeebab1a1c3ab01c6ad9af94e13ed
Issue-ID: PORTAL-377
Signed-off-by: shentao999 <shentao@chinamobile.com>
Diffstat (limited to 'ecomp-portal-FE-os/client/src')
3 files changed, 13 insertions, 7 deletions
diff --git a/ecomp-portal-FE-os/client/src/app.js b/ecomp-portal-FE-os/client/src/app.js index ec531846..c60dfe9a 100644 --- a/ecomp-portal-FE-os/client/src/app.js +++ b/ecomp-portal-FE-os/client/src/app.js @@ -53,13 +53,19 @@ var app = angular.module('ecompApp', [ 'ui.bootstrap', 'ngMaterial', 'oc.lazyLoad', - 'b2b.att' + 'b2b.att', + 'pascalprecht.translate' ]) - .config(($stateProvider, $urlRouterProvider, $locationProvider, $httpProvider, ngDialogProvider, $controllerProvider, hammerDefaultOptsProvider, $sanitizeProvider) => { + .config(($stateProvider, $translateProvider, $urlRouterProvider, $locationProvider, $httpProvider, ngDialogProvider, $controllerProvider, hammerDefaultOptsProvider) => { app.controllerProvider = $controllerProvider; $urlRouterProvider.otherwise('/error404'); $locationProvider.html5Mode(true); - + var lang = window.localStorage.lang||'EN'; + $translateProvider.preferredLanguage(lang); + $translateProvider.useStaticFilesLoader({ + prefix: '././assets/i18n/', + suffix: '.json' + }) //initialize get if not there if (!$httpProvider.defaults.headers.get) { $httpProvider.defaults.headers.get = {}; diff --git a/ecomp-portal-FE-os/client/src/views/applications/applications.tpl.html b/ecomp-portal-FE-os/client/src/views/applications/applications.tpl.html index 316bc13a..aaba92bf 100644 --- a/ecomp-portal-FE-os/client/src/views/applications/applications.tpl.html +++ b/ecomp-portal-FE-os/client/src/views/applications/applications.tpl.html @@ -40,7 +40,7 @@ <div class="applications-page-main" id="page-content"> <div id='app-title' class="w-ecomp-main-view-title"> - <h1 class="heading-page" >Application Onboarding</h1> + <h1 class="heading-page" >{{'Application Onboarding'|T}}</h1> </div> <div class="apps-table"> <div class="table-control"> @@ -50,7 +50,7 @@ </div> </div> <div class="table-control-buttons"> - <button class="btn btn-alt btn-small" ng-click="apps.openAddNewAppModal()"><i class="icon-people-userbookmark" aria-hidden="true"></i> Add App</button> + <button class="btn btn-alt btn-small" ng-click="apps.openAddNewAppModal()"><i class="icon-people-userbookmark" aria-hidden="true"></i> {{'Add App'|T}}</button> </div> </div> <span class="ecomp-spinner" ng-show="apps.isLoadingTable"></span> diff --git a/ecomp-portal-FE-os/client/src/views/functionalMenu/functionalMenu.tpl.html b/ecomp-portal-FE-os/client/src/views/functionalMenu/functionalMenu.tpl.html index 538ac4e7..669cf9f5 100644 --- a/ecomp-portal-FE-os/client/src/views/functionalMenu/functionalMenu.tpl.html +++ b/ecomp-portal-FE-os/client/src/views/functionalMenu/functionalMenu.tpl.html @@ -38,7 +38,7 @@ <div class="functional-menu-main"> <div class="functional-menu-container" id="page-content"> <div id="title" class="w-ecomp-main-view-title"> - <h1 class="heading-page" >Edit Functional Menu</h1> + <h1 class="heading-page" >{{'Edit Functional Menu'|T}}</h1> </div> <div id="tree1"> <div id="Service_Creation"></div> @@ -57,7 +57,7 @@ </ul> </script> <div class="functional-admin-button-container"> - <button id="regenrate-functionalmenu-btn" class="btn btn-alt btn-small" ng-click="functionalMenu.regenerateFunctionalMenuAncestors()">Regenerate Menu</button> + <button id="regenrate-functionalmenu-btn" class="btn btn-alt btn-small" ng-click="functionalMenu.regenerateFunctionalMenuAncestors()">{{'Regenerate Menu'|T}}</button> <span class="n16r" style="color:black">Click when you are done with your changes</span> </div> </div> |