summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-os/client
diff options
context:
space:
mode:
authorshentao999 <shentao@chinamobile.com>2019-04-02 09:29:10 +0800
committershentao999 <shentao@chinamobile.com>2019-04-02 09:29:11 +0800
commit75d35b5965542bb77c03999fed0e6663cbdd8a27 (patch)
tree484680826bd3a7b950ab2710b4bd1fb6759351f1 /ecomp-portal-FE-os/client
parent18def1dcb43684553ba04647cfdb6acdaf8bda4d (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')
-rw-r--r--ecomp-portal-FE-os/client/index.html4
-rw-r--r--ecomp-portal-FE-os/client/src/app.js12
-rw-r--r--ecomp-portal-FE-os/client/src/views/applications/applications.tpl.html4
-rw-r--r--ecomp-portal-FE-os/client/src/views/functionalMenu/functionalMenu.tpl.html4
4 files changed, 17 insertions, 7 deletions
diff --git a/ecomp-portal-FE-os/client/index.html b/ecomp-portal-FE-os/client/index.html
index 14a36033..648174e4 100644
--- a/ecomp-portal-FE-os/client/index.html
+++ b/ecomp-portal-FE-os/client/index.html
@@ -206,6 +206,8 @@
<script src="bower_components_external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<script src="bower_components/angular-translate/angular-translate.js"></script>
+<script src="bower_components/angular-translate-loader-static-files/angular-translate-loader-static-files.js"></script>
<!-- end-->
<!-- Avoid ^M (control-M, i.e., carriage-return, i.e., Windows line endings here. -->
@@ -229,6 +231,7 @@
<script src="app/directives/search-users/search-users.directive.js"></script>
<script src="app/filters/elipsis/elipsis.filter.js"></script>
<script src="app/filters/pagination-start-from/start-from.filter.js"></script>
+ <script src="app/filters/translate/translate.filter.js"></script>
<script src="app/filters/trusted-url/trusted-url.filter.js"></script>
<script src="app/router.js"></script>
<script src="app/services/admins/admins.service.js"></script>
@@ -255,6 +258,7 @@
<script src="app/services/scheduler/scheduler.service.js"></script>
<script src="app/services/support/getAccess/get-access.service.js"></script>
<script src="app/services/support/session/session.service.js"></script>
+ <script src="app/services/translate/translate.service.js"></script>
<script src="app/services/userProfile/userProfile.service.js"></script>
<script src="app/services/userbar/userbar.update.service.js"></script>
<script src="app/services/users/users.service.js"></script>
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>&nbsp;Add App</button>
+ <button class="btn btn-alt btn-small" ng-click="apps.openAddNewAppModal()"><i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;{{'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>