Commit e19146f6 authored by Sascha Pfeiffer's avatar Sascha Pfeiffer

added first translations

Signed-off-by: default avatarSascha Pfeiffer <sascha.pfeiffer@psono.com>
parent d6fbc4d7
......@@ -34,6 +34,16 @@ test-linter:
- addons-linter ./build/firefox
#test-translation-terms:
# stage: build
# image: psono-docker.jfrog.io/ubuntu:16.04
# script:
# - sh ./var/build-ubuntu.sh
# - curl -X POST https://api.poeditor.com/v2/projects/upload -F api_token=$POEDITOR_API_KEY -F id="198999" -F updating="terms" -F file=@"src/common/data/translations/terms.json"
# only:
# - develop
build-docker-image:
except:
- schedules
......
......@@ -457,6 +457,32 @@
----
## angular-translate: MIT
The MIT License (MIT)
Copyright (c) 2013-2017 The angular-translate team and Pascal Precht
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
----
## ngDraggable: MIT
The MIT License (MIT)
......
......@@ -89,6 +89,10 @@ var build = function(build_path, type) {
gulp.src(['src/common/data/fonts/**/*'])
.pipe(gulp.dest(path.join(build_path, 'fonts')));
// All files in data/translations
gulp.src(['src/common/data/translations/**/*'])
.pipe(gulp.dest(path.join(build_path, 'translations')));
// All files in data/img
gulp.src(['src/common/data/img/**/*'])
.pipe(gulp.dest(path.join(build_path, 'img')));
......@@ -131,6 +135,9 @@ var build = function(build_path, type) {
"src/common/data/js/lib/angular-sanitize.min.js",
"src/common/data/js/lib/angular-local-storage.min.js",
"src/common/data/js/lib/angular-snap.min.js",
"src/common/data/js/lib/angular-translate.min.js",
"src/common/data/js/lib/angular-translate-loader-url.min.js",
"src/common/data/js/lib/angular-translate-loader-static-files.min.js",
"src/common/data/js/lib/ui-bootstrap-tpls.min.js",
"src/common/data/js/lib/ngdraggable.js",
"src/common/data/js/lib/angular-ui-select.js",
......
......@@ -129,6 +129,9 @@
<script src="js/lib/angular-sanitize.min.js" type="application/javascript"></script>
<script src="js/lib/angular-local-storage.min.js" type="application/javascript"></script>
<script src="js/lib/angular-snap.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-url.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-static-files.min.js" type="application/javascript"></script>
<script src="js/lib/ui-bootstrap-tpls.min.js" type="application/javascript"></script>
<script src="js/lib/angular-datatables.js" type="application/javascript"></script>
<script src="js/lib/ngdraggable.js" type="application/javascript"></script>
......
......@@ -56,6 +56,9 @@
<script src="js/lib/angular-sanitize.min.js" type="application/javascript"></script>
<script src="js/lib/angular-local-storage.min.js" type="application/javascript"></script>
<script src="js/lib/angular-snap.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-url.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-static-files.min.js" type="application/javascript"></script>
<script src="js/lib/ui-bootstrap-tpls.min.js" type="application/javascript"></script>
<script src="js/lib/angular-datatables.js" type="application/javascript"></script>
<script src="js/lib/ngdraggable.js" type="application/javascript"></script>
......
......@@ -109,23 +109,23 @@
<form name="loginForm" ng-if="view === 'default'" autocomplete="off">
<div ng-class="{'input-group': loginFormUsername == null || loginFormUsername.indexOf('@') == -1}">
<input type="text" class="form-control" id="loginUsername" placeholder="Username" ng-model="loginFormUsername" required aria-describedby="username-addon" autofocus>
<input type="text" class="form-control" id="loginUsername" placeholder="{{'USERNAME' | translate}}" ng-model="loginFormUsername" required aria-describedby="username-addon" autofocus>
<span class="input-group-addon" id="username-addon" ng-if="loginFormUsername == null || loginFormUsername.indexOf('@') == -1">@{{selected_server_domain}}</span>
</div>
<br>
<div class="form-group">
<input type="password" class="form-control" id="loginPassword" placeholder="Password" ng-model="loginFormPassword" required>
<input type="password" class="form-control" id="loginPassword" placeholder="{{'PASSWORD' | translate}}" ng-model="loginFormPassword" required>
</div>
<div class="checkbox">
<label><input type="checkbox" ng-model="loginFormRemember"> Remember username and server</label>
<label><input type="checkbox" ng-model="loginFormRemember"> {{'REMEMBER_USERNAME_AND_SERVER' | translate}}</label>
</div>
<div class="checkbox">
<label><input type="checkbox" ng-model="loginFormTrustDevice"> Trust device</label>
<label><input type="checkbox" ng-model="loginFormTrustDevice"> {{'TRUST_DEVICE' | translate}}</label>
</div>
<div class="form-group">
<button ng-click="initiate_login(loginFormUsername, loginFormPassword, loginFormRemember, loginFormTrustDevice, false)" type="submit" class="btn btn-danger">Login <i class="fa fa-sign-in" aria-hidden="true"></i></button>
<a href="#" ng-click="open_tab('register.html')">Register</a>
<button ng-click="initiate_login(loginFormUsername, loginFormPassword, loginFormRemember, loginFormTrustDevice, false)" type="submit" class="btn btn-danger">{{'LOGIN' | translate}} <i class="fa fa-sign-in" aria-hidden="true"></i></button>
<a href="#" ng-click="open_tab('register.html')">{{'REGISTER' | translate}}</a>
</div>
<div class="form-group alert alert-danger" ng-repeat="e in errors">
......@@ -309,7 +309,7 @@
font-size: 3em;
text-align: center;
animation: fa-spin 2s infinite linear;
vertical-align: middle;">&#xf110;</i> Loading<noscript><br>JavaScript is disabled</noscript>
vertical-align: middle;">&#xf110;</i> {{'LOADING' | translate}}<noscript><br>JavaScript is disabled</noscript>
</div>
</div>
......@@ -348,6 +348,9 @@
<script src="js/lib/angular-sanitize.min.js" type="application/javascript"></script>
<script src="js/lib/angular-local-storage.min.js" type="application/javascript"></script>
<script src="js/lib/angular-snap.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-url.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-static-files.min.js" type="application/javascript"></script>
<script src="js/lib/ui-bootstrap-tpls.min.js" type="application/javascript"></script>
<script src="js/lib/angular-datatables.js" type="application/javascript"></script>
<script src="js/lib/ngdraggable.js" type="application/javascript"></script>
......
......@@ -90,7 +90,7 @@
font-size: 3em;
text-align: center;
animation: fa-spin 2s infinite linear;
vertical-align: middle;">&#xf110;</i> Loading<noscript><br>JavaScript is disabled</noscript>
vertical-align: middle;">&#xf110;</i> {{'LOADING' | translate}}<noscript><br>JavaScript is disabled</noscript>
</div>
</div>
......@@ -129,6 +129,9 @@
<script src="js/lib/angular-sanitize.min.js" type="application/javascript"></script>
<script src="js/lib/angular-local-storage.min.js" type="application/javascript"></script>
<script src="js/lib/angular-snap.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-url.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-static-files.min.js" type="application/javascript"></script>
<script src="js/lib/ui-bootstrap-tpls.min.js" type="application/javascript"></script>
<script src="js/lib/angular-datatables.js" type="application/javascript"></script>
<script src="js/lib/ngdraggable.js" type="application/javascript"></script>
......
......@@ -182,23 +182,23 @@
<form name="loginForm" ng-if="view === 'default'" autocomplete="off">
<!-- default View -->
<div ng-class="{'input-group': loginFormUsername == null || loginFormUsername.indexOf('@') == -1}">
<input type="text" class="form-control" id="loginUsername" placeholder="Username" ng-model="loginFormUsername" required aria-describedby="username-addon" autofocus>
<input type="text" class="form-control" id="loginUsername" placeholder="{{'USERNAME' | translate}}" ng-model="loginFormUsername" required aria-describedby="username-addon" autofocus>
<span class="input-group-addon" id="username-addon" ng-if="loginFormUsername == null || loginFormUsername.indexOf('@') == -1">@{{selected_server_domain}}</span>
</div>
<br>
<div class="form-group">
<input type="password" class="form-control" id="loginPassword" placeholder="Password" ng-model="loginFormPassword" required>
<input type="password" class="form-control" id="loginPassword" placeholder="{{'PASSWORD' | translate}}" ng-model="loginFormPassword" required>
</div>
<div class="checkbox">
<label><input type="checkbox" ng-model="loginFormRemember"> Remember username and server</label>
<label><input type="checkbox" ng-model="loginFormRemember"> {{'REMEMBER_USERNAME_AND_SERVER' | translate}}</label>
</div>
<div class="checkbox">
<label><input type="checkbox" ng-model="loginFormTrustDevice"> Trust device</label>
<label><input type="checkbox" ng-model="loginFormTrustDevice"> {{'TRUST_DEVICE' | translate}}</label>
</div>
<div class="form-group">
<button ng-click="initiate_login(loginFormUsername, loginFormPassword, loginFormRemember, loginFormTrustDevice, true)" type="submit" class="btn btn-danger">Login <i class="fa fa-sign-in" aria-hidden="true"></i></button>
<a href="register.html">Register</a>
<button ng-click="initiate_login(loginFormUsername, loginFormPassword, loginFormRemember, loginFormTrustDevice, true)" type="submit" class="btn btn-danger">{{'LOGIN' | translate}} <i class="fa fa-sign-in" aria-hidden="true"></i></button>
<a href="register.html">{{'REGISTER' | translate}}</a>
</div>
<div class="form-group alert alert-danger" ng-repeat="e in errors">
......@@ -371,7 +371,7 @@
</form>
<div class="box-footer">
<a href="lost-password.html">Lost password?</a> <a href="privacy-policy.html">Privacy Policy</a>
<a href="lost-password.html">{{'LOST_PASSWORD' | translate}}?</a> <a href="privacy-policy.html">{{'PRIVACY_POLICY' | translate}}</a>
</div>
</div>
</div>
......@@ -426,6 +426,9 @@
<script src="js/lib/angular-sanitize.min.js" type="application/javascript"></script>
<script src="js/lib/angular-local-storage.min.js" type="application/javascript"></script>
<script src="js/lib/angular-snap.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-url.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-static-files.min.js" type="application/javascript"></script>
<script src="js/lib/ui-bootstrap-tpls.min.js" type="application/javascript"></script>
<script src="js/lib/angular-datatables.js" type="application/javascript"></script>
<script src="js/lib/ngdraggable.js" type="application/javascript"></script>
......
/*!
* angular-translate - v2.18.1 - 2018-05-19
*
* Copyright (c) 2018 The angular-translate team, Pascal Precht; Licensed MIT
*/
!function(e,i){"function"==typeof define&&define.amd?define([],function(){return i()}):"object"==typeof module&&module.exports?module.exports=i():i()}(0,function(){function e(n,a){"use strict";return function(r){if(!(r&&(angular.isArray(r.files)||angular.isString(r.prefix)&&angular.isString(r.suffix))))throw new Error("Couldn't load static files, no files and prefix or suffix specified!");r.files||(r.files=[{prefix:r.prefix,suffix:r.suffix}]);for(var e=function(e){if(!e||!angular.isString(e.prefix)||!angular.isString(e.suffix))throw new Error("Couldn't load static file, no prefix or suffix specified!");var i=[e.prefix,r.key,e.suffix].join("");return angular.isObject(r.fileMap)&&r.fileMap[i]&&(i=r.fileMap[i]),a(angular.extend({url:i,method:"GET"},r.$http)).then(function(e){return e.data},function(){return n.reject(r.key)})},i=[],t=r.files.length,f=0;f<t;f++)i.push(e({prefix:r.files[f].prefix,key:r.key,suffix:r.files[f].suffix}));return n.all(i).then(function(e){for(var i=e.length,r={},t=0;t<i;t++)for(var f in e[t])r[f]=e[t][f];return r})}}return e.$inject=["$q","$http"],angular.module("pascalprecht.translate").factory("$translateStaticFilesLoader",e),e.displayName="$translateStaticFilesLoader","pascalprecht.translate"});
\ No newline at end of file
/*!
* angular-translate - v2.18.1 - 2018-05-19
*
* Copyright (c) 2018 The angular-translate team, Pascal Precht; Licensed MIT
*/
!function(e,t){"function"==typeof define&&define.amd?define([],function(){return t()}):"object"==typeof module&&module.exports?module.exports=t():t()}(0,function(){function e(r,n){"use strict";return function(e){if(!e||!e.url)throw new Error("Couldn't use urlLoader since no url is given!");var t={};return t[e.queryParameter||"lang"]=e.key,n(angular.extend({url:e.url,params:t,method:"GET"},e.$http)).then(function(e){return e.data},function(){return r.reject(e.key)})}}return e.$inject=["$q","$http"],angular.module("pascalprecht.translate").factory("$translateUrlLoader",e),e.displayName="$translateUrlLoader","pascalprecht.translate"});
\ No newline at end of file
This diff is collapsed.
......@@ -49,9 +49,9 @@
angular.module('psonocli', ['ngRoute', 'ng', 'ui.bootstrap', 'snap', 'chieffancypants.loadingBar', 'ngAnimate',
'LocalStorageModule', 'ngTree', 'ngDraggable', 'ng-context-menu', 'ui.select', 'ngSanitize',
'angular-complexify', 'datatables', 'chart.js'])
.config(['$routeProvider', '$httpProvider', '$locationProvider', '$compileProvider', 'localStorageServiceProvider',
function ($routeProvider, $httpProvider, $locationProvider, $compileProvider, localStorageServiceProvider) {
'angular-complexify', 'datatables', 'chart.js', 'pascalprecht.translate'])
.config(['$translateProvider', '$routeProvider', '$httpProvider', '$locationProvider', '$compileProvider', 'localStorageServiceProvider',
function ($translateProvider, $routeProvider, $httpProvider, $locationProvider, $compileProvider, localStorageServiceProvider) {
//Router config
$routeProvider
.when('/settings', {
......@@ -125,6 +125,21 @@
$httpProvider.defaults.headers.get['Cache-Control'] = 'no-cache';
$httpProvider.defaults.headers.get['Pragma'] = 'no-cache';
$translateProvider
.useStaticFilesLoader({
prefix: 'translations/locale-',
suffix: '.json'
})
.registerAvailableLanguageKeys(['en', 'de'], {
'en_*': 'en',
'de_*': 'de',
'*': 'en'
})
.fallbackLanguage('en')
.determinePreferredLanguage()
.useSanitizeValueStrategy('escape');
}])
.filter('typeof', function() {
return function(obj) {
......
......@@ -57,7 +57,7 @@
<form name="lostpasswordForm" ng-if="!success && !recovery_enabled">
<div ng-class="{'input-group': lostpasswordFormUsername == null || lostpasswordFormUsername.indexOf('@') == -1}">
<input type="text" class="form-control" id="lostpasswordUsername" placeholder="Username"
<input type="text" class="form-control" id="lostpasswordUsername" placeholder="{{'USERNAME' | translate}}"
ng-model="lostpasswordFormUsername" required aria-describedby="username-addon" autofocus>
<span class="input-group-addon" id="username-addon"
ng-if="lostpasswordFormUsername == null || lostpasswordFormUsername.indexOf('@') == -1">@{{selected_server_domain}}</span>
......@@ -79,7 +79,7 @@
</div>
</div>
<input type="text" class="form-control" id="words" placeholder="or wordlist e.g.: follow charge genre ..."
<input type="text" class="form-control" id="words" placeholder="{{'OR_WORDLIST' | translate}}"
ng-model="lostpasswordFormWords.value"
ng-class="lostpasswordFormWords.class"
ng-change="words_changing(lostpasswordFormWords)">
......@@ -89,7 +89,7 @@
<div class="form-group">
<button ng-click="recovery_enable(lostpasswordFormUsername, lostpasswordFormCode1.value, lostpasswordFormCode2.value, lostpasswordFormWords.value)"
type="submit" class="btn btn-danger">Request Password Reset</button>
type="submit" class="btn btn-danger">{{'REQUEST_PASSWORD_RESET' | translate}}</button>
</div>
<div class="form-group alert alert-info" ng-repeat="e in msgs">
......@@ -155,7 +155,7 @@
font-size: 3em;
text-align: center;
animation: fa-spin 2s infinite linear;
vertical-align: middle;">&#xf110;</i> Loading<noscript><br>JavaScript is disabled</noscript>
vertical-align: middle;">&#xf110;</i> {{'LOADING' | translate}}<noscript><br>JavaScript is disabled</noscript>
</div>
</div>
......@@ -193,6 +193,9 @@
<script src="js/lib/angular-sanitize.min.js" type="application/javascript"></script>
<script src="js/lib/angular-local-storage.min.js" type="application/javascript"></script>
<script src="js/lib/angular-snap.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-url.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-static-files.min.js" type="application/javascript"></script>
<script src="js/lib/ui-bootstrap-tpls.min.js" type="application/javascript"></script>
<script src="js/lib/angular-datatables.js" type="application/javascript"></script>
<script src="js/lib/ngdraggable.js" type="application/javascript"></script>
......
......@@ -103,6 +103,9 @@
<script src="js/lib/angular-sanitize.min.js" type="application/javascript"></script>
<script src="js/lib/angular-local-storage.min.js" type="application/javascript"></script>
<script src="js/lib/angular-snap.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-url.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-static-files.min.js" type="application/javascript"></script>
<script src="js/lib/ui-bootstrap-tpls.min.js" type="application/javascript"></script>
<script src="js/lib/angular-datatables.js" type="application/javascript"></script>
<script src="js/lib/ngdraggable.js" type="application/javascript"></script>
......
......@@ -77,23 +77,23 @@
<form name="loginForm" ng-if="view === 'default'" autocomplete="off">
<!-- default View -->
<div ng-class="{'input-group': loginFormUsername == null || loginFormUsername.indexOf('@') == -1}">
<input type="text" class="form-control" id="loginUsername" placeholder="Username" ng-model="loginFormUsername" required aria-describedby="username-addon" autofocus>
<input type="text" class="form-control" id="loginUsername" placeholder="{{'USERNAME' | translate}}" ng-model="loginFormUsername" required aria-describedby="username-addon" autofocus>
<span class="input-group-addon" id="username-addon" ng-if="loginFormUsername == null || loginFormUsername.indexOf('@') == -1">@{{selected_server_domain}}</span>
</div>
<br>
<div class="form-group">
<input type="password" class="form-control" id="loginPassword" placeholder="Password" ng-model="loginFormPassword" required>
<input type="password" class="form-control" id="loginPassword" placeholder="{{'PASSWORD' | translate}}" ng-model="loginFormPassword" required>
</div>
<div class="checkbox">
<label><input type="checkbox" ng-model="loginFormRemember"> Remember username and server</label>
<label><input type="checkbox" ng-model="loginFormRemember"> {{'REMEMBER_USERNAME_AND_SERVER' | translate}}</label>
</div>
<div class="checkbox">
<label><input type="checkbox" ng-model="loginFormTrustDevice"> Trust device</label>
<label><input type="checkbox" ng-model="loginFormTrustDevice"> {{'TRUST_DEVICE' | translate}}</label>
</div>
<div class="form-group">
<button ng-click="initiate_login(loginFormUsername, loginFormPassword, loginFormRemember, loginFormTrustDevice, true)" type="submit" class="btn btn-danger">Login <i class="fa fa-sign-in" aria-hidden="true"></i></button>
<a href="register.html">Register</a>
<button ng-click="initiate_login(loginFormUsername, loginFormPassword, loginFormRemember, loginFormTrustDevice, true)" type="submit" class="btn btn-danger">{{'LOGIN' | translate}} <i class="fa fa-sign-in" aria-hidden="true"></i></button>
<a href="register.html">{{'REGISTER' | translate}}</a>
</div>
<div class="form-group alert alert-danger" ng-repeat="e in errors">
......@@ -266,7 +266,7 @@
</form>
<div class="box-footer">
<a href="lost-password.html">Lost password?</a> <a href="privacy-policy.html">Privacy Policy</a>
<a href="lost-password.html">{{'LOST_PASSWORD' | translate}}?</a> <a href="privacy-policy.html">{{'PRIVACY_POLICY' | translate}}</a>
</div>
</div>
</div>
......@@ -321,6 +321,9 @@
<script src="js/lib/angular-sanitize.min.js" type="application/javascript"></script>
<script src="js/lib/angular-local-storage.min.js" type="application/javascript"></script>
<script src="js/lib/angular-snap.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-url.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-static-files.min.js" type="application/javascript"></script>
<script src="js/lib/ui-bootstrap-tpls.min.js" type="application/javascript"></script>
<script src="js/lib/angular-datatables.js" type="application/javascript"></script>
<script src="js/lib/ngdraggable.js" type="application/javascript"></script>
......
......@@ -56,7 +56,7 @@
font-size: 3em;
text-align: center;
animation: fa-spin 2s infinite linear;
vertical-align: middle;">&#xf110;</i> Loading<noscript><br>JavaScript is disabled</noscript>
vertical-align: middle;">&#xf110;</i> {{'LOADING' | translate}}<noscript><br>JavaScript is disabled</noscript>
</div>
</div>
......@@ -94,6 +94,9 @@
<script src="js/lib/angular-sanitize.min.js" type="application/javascript"></script>
<script src="js/lib/angular-local-storage.min.js" type="application/javascript"></script>
<script src="js/lib/angular-snap.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-url.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-static-files.min.js" type="application/javascript"></script>
<script src="js/lib/ui-bootstrap-tpls.min.js" type="application/javascript"></script>
<script src="js/lib/angular-datatables.js" type="application/javascript"></script>
<script src="js/lib/ngdraggable.js" type="application/javascript"></script>
......
......@@ -57,7 +57,7 @@
<form name="registerForm" ng-if="!success" autocomplete="off">
<div ng-class="{'input-group': registerFormUsername == null || registerFormUsername.indexOf('@') == -1}">
<input type="text" class="form-control" id="registerUsername" placeholder="Username" ng-model="registerFormUsername" required aria-describedby="username-addon" autofocus>
<input type="text" class="form-control" id="registerUsername" placeholder="{{'USERNAME' | translate}}" ng-model="registerFormUsername" required aria-describedby="username-addon" autofocus>
<span class="input-group-addon" id="username-addon" ng-if="registerFormUsername == null || registerFormUsername.indexOf('@') == -1">@{{selected_server_domain}}</span>
</div>
<br>
......@@ -65,7 +65,7 @@
<input type="email" class="form-control" id="registerEmail" placeholder="E-Mail" ng-model="registerFormEmail" required>
</div>
<div class="form-group">
<input type="password" class="form-control" id="registerPassword" placeholder="Password" ng-model="registerFormPassword" required>
<input type="password" class="form-control" id="registerPassword" placeholder="{{'PASSWORD' | translate}}" ng-model="registerFormPassword" required>
<uib-progressbar value="registerFormPassword | complexify" ng-if="(registerFormPassword | complexify) > 0">
<span complexify="registerFormPassword"></span>%
......@@ -114,7 +114,7 @@
font-size: 3em;
text-align: center;
animation: fa-spin 2s infinite linear;
vertical-align: middle;">&#xf110;</i> Loading<noscript><br>JavaScript is disabled</noscript>
vertical-align: middle;">&#xf110;</i> {{'LOADING' | translate}}<noscript><br>JavaScript is disabled</noscript>
</div>
</div>
......@@ -153,6 +153,9 @@
<script src="js/lib/angular-sanitize.min.js" type="application/javascript"></script>
<script src="js/lib/angular-local-storage.min.js" type="application/javascript"></script>
<script src="js/lib/angular-snap.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-url.min.js" type="application/javascript"></script>
<script src="js/lib/angular-translate-loader-static-files.min.js" type="application/javascript"></script>
<script src="js/lib/ui-bootstrap-tpls.min.js" type="application/javascript"></script>
<script src="js/lib/angular-datatables.js" type="application/javascript"></script>
<script src="js/lib/ngdraggable.js" type="application/javascript"></script>
......
......@@ -82,6 +82,8 @@ self.addEventListener('install', function(event) {
'./img/sort_desc.png',
'./img/sort_desc_disabled.png',
'./translations/locale-de.json',
'./translations/locale-en.json',
'./js/lib/ecma-nacl.min.js',
'./js/lib/openpgp.min.js',
......@@ -113,6 +115,9 @@ self.addEventListener('install', function(event) {
'./js/lib/angular-sanitize.min.js',
'./js/lib/angular-local-storage.min.js',
'./js/lib/angular-snap.min.js',
'./js/lib/angular-translate.min.js',
'./js/lib/angular-translate-loader-url.min.js',
'./js/lib/angular-translate-loader-static-files.min.js',
'./js/lib/ui-bootstrap-tpls.min.js',
'./js/lib/angular-datatables.js',
'./js/lib/ngdraggable.js',
......
{
"REMEMBER_USERNAME_AND_SERVER": "Username und Server merken",
"TRUST_DEVICE": "Vertrauenswürdiges Gerät",
"REGISTER": "Registrieren",
"LOGIN": "Login",
"USERNAME": "Benutzername",
"PASSWORD": "Passwort",
"REQUEST_PASSWORD_RESET": "Passwort Zurücksetzen",
"OR_WORDLIST": "oder Wortliste z.B.: follow charge genre ...",
"LOST_PASSWORD": "Passwort verloren",
"PRIVACY_POLICY": "Datenschutz"
}
\ No newline at end of file
{
"REMEMBER_USERNAME_AND_SERVER": "Remember username and server",
"TRUST_DEVICE": "Trust device",
"REGISTER": "Register",
"LOGIN": "Login",
"USERNAME": "Username",
"PASSWORD": "Password",
"REQUEST_PASSWORD_RESET": "Request Password Reset",
"OR_WORDLIST": "or wordlist e.g.: follow charge genre ...",
"LOST_PASSWORD": "Lost password",
"PRIVACY_POLICY": "Privacy Policy"
}
\ No newline at end of file
{
"REMEMBER_USERNAME_AND_SERVER": "",
"TRUST_DEVICE": "",
"REGISTER": "",
"LOGIN": "",
"USERNAME": "",
"PASSWORD": "",
"REQUEST_PASSWORD_RESET": "",
"OR_WORDLIST": "",
"LOST_PASSWORD": "",
"PRIVACY_POLICY": ""
}
\ No newline at end of file
......@@ -102,7 +102,7 @@
<label ng-if="!user.data.user_name" class="smalllabel" for="modalAcceptShareForm-user-username">
Username <span ng-if="!user_is_trusted" class="text-danger">(not trusted)</span>
</label>
<input ng-if="!user.data.user_name" id="modalAcceptShareForm-user-username" type="text" placeholder="Username"
<input ng-if="!user.data.user_name" id="modalAcceptShareForm-user-username" type="text" placeholder="{{'USERNAME' | translate}}"
ng-value="user.data.user_username" class="form-control" disabled="disabled">
<label class="smalllabel" for="modalAcceptShareForm-user-public-key">
Public Key: <span ng-if="!user_is_trusted" class="text-danger">(not trusted)</span>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -67,6 +67,8 @@ self.addEventListener('install', function(event) {
'./img/sort_desc.png',
'./img/sort_desc_disabled.png',
'./translations/locale-de.json',
'./translations/locale-en.json',
'./js/lib/openpgp.worker.min.js',
'./js/bundle.min.js',
......
......@@ -33,6 +33,9 @@
"../src/common/data/js/lib/angular-sanitize.min.js",
"../src/common/data/js/lib/angular-local-storage.min.js",
"../src/common/data/js/lib/angular-snap.min.js",
"../src/common/data/js/lib/angular-translate.min.js",
"../src/common/data/js/lib/angular-translate-loader-url.min.js",
"../src/common/data/js/lib/angular-translate-loader-static-files.min.js",
"../src/common/data/js/lib/ui-bootstrap-tpls.min.js",
"../src/common/data/js/lib/ngdraggable.js",
"../src/common/data/js/lib/angular-ui-select.js",
......
......@@ -33,6 +33,9 @@
"../src/common/data/js/lib/angular-sanitize.min.js",
"../src/common/data/js/lib/angular-local-storage.min.js",
"../src/common/data/js/lib/angular-snap.min.js",
"../src/common/data/js/lib/angular-translate.min.js",
"../src/common/data/js/lib/angular-translate-loader-url.min.js",
"../src/common/data/js/lib/angular-translate-loader-static-files.min.js",
"../src/common/data/js/lib/ui-bootstrap-tpls.min.js",
"../src/common/data/js/lib/ngdraggable.js",
"../src/common/data/js/lib/angular-ui-select.js",
......
......@@ -33,6 +33,9 @@
"../src/common/data/js/lib/angular-sanitize.min.js",
"../src/common/data/js/lib/angular-local-storage.min.js",
"../src/common/data/js/lib/angular-snap.min.js",
"../src/common/data/js/lib/angular-translate.min.js",
"../src/common/data/js/lib/angular-translate-loader-url.min.js",
"../src/common/data/js/lib/angular-translate-loader-static-files.min.js",
"../src/common/data/js/lib/ui-bootstrap-tpls.min.js",
"../src/common/data/js/lib/ngdraggable.js",
"../src/common/data/js/lib/angular-ui-select.js",
......
......@@ -33,6 +33,9 @@
"../src/common/data/js/lib/angular-sanitize.min.js",
"../src/common/data/js/lib/angular-local-storage.min.js",
"../src/common/data/js/lib/angular-snap.min.js",
"../src/common/data/js/lib/angular-translate.min.js",
"../src/common/data/js/lib/angular-translate-loader-url.min.js",
"../src/common/data/js/lib/angular-translate-loader-static-files.min.js",
"../src/common/data/js/lib/ui-bootstrap-tpls.min.js",
"../src/common/data/js/lib/ngdraggable.js",
"../src/common/data/js/lib/angular-ui-select.js",
......
(function () {
describe('Controller: ActivationCtrl test suite', function () {
beforeEach(module('psonocli'));
beforeEach(module('psonocli', function ($translateProvider) {
$translateProvider.translations('en', {});
}));
var $controller, $rootScope, $httpBackend, $scope, config, cryptoLibrary, storage;
......
(function () {
describe('Controller: LoginCtrl test suite', function () {
beforeEach(module('psonocli'));
beforeEach(module('psonocli', function ($translateProvider) {
$translateProvider.translations('en', {});
}));
var $controller, $rootScope, $httpBackend, $scope, config, cryptoLibrary, storage;
......
(function () {
describe('Controller: LostPasswordCtrl test suite', function () {
beforeEach(module('psonocli'));
beforeEach(module('psonocli', function ($translateProvider) {
$translateProvider.translations('en', {});
}));
var $controller, $rootScope, $httpBackend, $scope, config, cryptoLibrary, storage;
......
(function () {
describe('Controller: PanelCtrl test suite', function () {
beforeEach(module('psonocli'));
beforeEach(module('psonocli', function ($translateProvider) {
$translateProvider.translations('en', {});
}));
var $controller, $rootScope, $httpBackend, $scope, $location, storage;
......
(function () {
describe('Controller: RegisterCtrl test suite', function () {
beforeEach(module('psonocli'));
beforeEach(module('psonocli', function ($translateProvider) {
$translateProvider.translations('en', {});
}));
var $controller, $rootScope, $httpBackend, $scope, config, cryptoLibrary, storage;
......
(function () {
describe('Service: account test suite', function () {
beforeEach(module('psonocli'));
beforeEach(module('psonocli', function ($translateProvider) {
$translateProvider.translations('en', {});
}));
it('account exists', inject(function (account) {
expect(account).toBeDefined();
......
(function () {
describe('Service: apiClient test suite', function () {
beforeEach(module('psonocli'));
beforeEach(module('psonocli', function ($translateProvider) {
$translateProvider.translations('en', {});
}));
var $httpBackend, cryptoLibrary;
......@@ -13,6 +16,7 @@
spyOn(cryptoLibrary, "encrypt_data").and.callFake(function(json_data, session_secret_key) {
return JSON.parse(json_data);
});
$httpBackend.when('GET', "view/datastore.html").respond({});
}));
it('apiClient exists', inject(function (apiClient) {
......
(function () {
describe('Service: browserClient test suite', function () {
beforeEach(module('psonocli'));
beforeEach(module('psonocli', function ($translateProvider) {
$translateProvider.translations('en', {});
}));
var mockedWindow;
beforeEach(function () {
......@@ -22,6 +25,7 @@
beforeEach(inject(function($injector){
// unwrap necessary services
$httpBackend = $injector.get('$httpBackend');
$httpBackend.when('GET', "view/datastore.html").respond({});
}));
it('browserClient exists', inject(function (browserClient) {
......
(function () {
describe('Service: converter test suite', function () {