adding language detection and language preferences
This commit is contained in:
parent
54b6f2aa59
commit
af960555b4
7 changed files with 39 additions and 38 deletions
|
|
@ -5,8 +5,8 @@ angular.module('copayApp.controllers').controller('preferencesLanguageController
|
||||||
|
|
||||||
$scope.availableLanguages = uxLanguage.getLanguages();
|
$scope.availableLanguages = uxLanguage.getLanguages();
|
||||||
|
|
||||||
$scope.openExternalLink = function(url, target) {
|
$scope.openExternalLink = function(url, optIn, title, message, okText, cancelText) {
|
||||||
externalLinkService.open(url, target);
|
externalLinkService.open(url, optIn, title, message, okText, cancelText);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.save = function(newLang) {
|
$scope.save = function(newLang) {
|
||||||
|
|
@ -30,7 +30,7 @@ angular.module('copayApp.controllers').controller('preferencesLanguageController
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.$on("$ionicView.enter", function(event, data){
|
$scope.$on("$ionicView.enter", function(event, data) {
|
||||||
$scope.currentLanguage = uxLanguage.getCurrentLanguage();
|
$scope.currentLanguage = uxLanguage.getCurrentLanguage();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('translatorsController',
|
angular.module('copayApp.controllers').controller('translatorsController',
|
||||||
function($scope, externalLinkService) {
|
function($scope, externalLinkService) {
|
||||||
$scope.openExternalLink = function(url, target) {
|
$scope.openExternalLink = function(url, optIn, title, message, okText, cancelText) {
|
||||||
externalLinkService.open(url, target);
|
externalLinkService.open(url, optIn, title, message, okText, cancelText);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,6 @@ angular.module('copayApp.services')
|
||||||
|
|
||||||
|
|
||||||
root._detect = function(cb) {
|
root._detect = function(cb) {
|
||||||
|
|
||||||
return cb('en'); //disable auto detection for release;
|
|
||||||
|
|
||||||
var userLang, androidLang;
|
var userLang, androidLang;
|
||||||
if (navigator && navigator.globalization) {
|
if (navigator && navigator.globalization) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,11 +30,11 @@
|
||||||
<span translate>Terms of Use</span>
|
<span translate>Terms of Use</span>
|
||||||
<i class="icon bp-arrow-right"></i>
|
<i class="icon bp-arrow-right"></i>
|
||||||
</a>
|
</a>
|
||||||
<!-- <a class="item item-icon-left item-icon-right" ui-sref="tabs.about.translators">
|
<a class="item item-icon-left item-icon-right" ui-sref="tabs.about.translators">
|
||||||
<i class="icon ion-ios-people-outline"></i>
|
<i class="icon ion-ios-people-outline"></i>
|
||||||
<span translate>Translators</span>
|
<span translate>Translators</span>
|
||||||
<i class="icon bp-arrow-right"></i>
|
<i class="icon bp-arrow-right"></i>
|
||||||
</a> Disabled for release-->
|
</a>
|
||||||
<a class="item item-icon-left item-icon-right" ui-sref="tabs.about.logs">
|
<a class="item item-icon-left item-icon-right" ui-sref="tabs.about.logs">
|
||||||
<i class="icon ion-ios-copy-outline"></i>
|
<i class="icon ion-ios-copy-outline"></i>
|
||||||
<span translate>Session log</span>
|
<span translate>Session log</span>
|
||||||
|
|
|
||||||
|
|
@ -12,14 +12,18 @@
|
||||||
ng-click="save(lang.isoCode)">{{lang.name}}
|
ng-click="save(lang.isoCode)">{{lang.name}}
|
||||||
</ion-radio>
|
</ion-radio>
|
||||||
</div>
|
</div>
|
||||||
<div class="padding">
|
<div class="settings-explanation">
|
||||||
<span translate>We’re always looking for translation contributions! You can make corrections or help to make this app available in your native language by joining our community on Crowdin.</span>
|
<div class="settings-description" translate>
|
||||||
<button class="button button-standard button-primary" ng-click="openExternalLink(true, 'Open Translation Community', 'You can make contributions by signing up on our Crowdin community translation website. We’re looking forward to hearing from you!
|
We’re always looking for translation contributions! You can make corrections or help to make this app available in your native language by joining our community on Crowdin.
|
||||||
', 'Open Crowdin', 'Go Back')" translate>Contribute Translations
|
</div>
|
||||||
</button>
|
|
||||||
<span translate>
|
|
||||||
Don't see your language on Crowdin? Contact the Owner on Crowdin! We'd love to support your language.
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="settings-explanation">
|
||||||
|
<div class="settings-description" translate>
|
||||||
|
Don't see your language on Crowdin? Contact the Owner on Crowdin! We'd love to support your language.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="padding">
|
||||||
|
<a class="button button-standard button-primary" ng-click="openExternalLink('https://crowdin.com/project/copay', true, 'Open Translation Community', 'You can make contributions by signing up on our Crowdin community translation website. We’re looking forward to hearing from you!', 'Open Crowdin', 'Go Back')" translate>Contribute Translations</a>
|
||||||
|
<div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
</ion-view>
|
</ion-view>
|
||||||
|
|
|
||||||
|
|
@ -53,18 +53,16 @@
|
||||||
<span translate>Notifications</span>
|
<span translate>Notifications</span>
|
||||||
<i class="icon bp-arrow-right"></i>
|
<i class="icon bp-arrow-right"></i>
|
||||||
</a>
|
</a>
|
||||||
<!-- See https://github.com/bitpay/bitpay-wallet/issues/265 -->
|
<a class="item item-icon-left item-icon-right" ui-sref="tabs.language">
|
||||||
<!-- <a class="item item-icon-left item-icon-right" ui-sref="tabs.language"> -->
|
<i class="icon big-icon-svg">
|
||||||
<!-- <i class="icon big-icon-svg"> -->
|
<img src="img/icon-language.svg" class="bg"/>
|
||||||
<!-- <img src="img/icon-language.svg" class="bg"/> -->
|
</i>
|
||||||
<!-- </i> -->
|
<span translate>Language</span>
|
||||||
<!-- <span translate>Language</span> -->
|
<span class="item-note">
|
||||||
<!-- <span class="item-note"> -->
|
{{currentLanguageName|translate}}
|
||||||
<!-- {{currentLanguageName|translate}} -->
|
</span>
|
||||||
<!-- </span> -->
|
<i class="icon bp-arrow-right"></i>
|
||||||
<!-- <i class="icon bp-arrow-right"></i> -->
|
</a>
|
||||||
<!-- </a> -->
|
|
||||||
<!-- -->
|
|
||||||
<a class="item has-setting-value item-icon-left item-icon-right" ui-sref="tabs.unit">
|
<a class="item has-setting-value item-icon-left item-icon-right" ui-sref="tabs.unit">
|
||||||
<i class="icon big-icon-svg">
|
<i class="icon big-icon-svg">
|
||||||
<img src="img/icon-unit.svg" class="bg"/>
|
<img src="img/icon-unit.svg" class="bg"/>
|
||||||
|
|
|
||||||
|
|
@ -19,16 +19,18 @@
|
||||||
<div class="item">Pirx1618<span class="item-note" translate>Polish</span></div>
|
<div class="item">Pirx1618<span class="item-note" translate>Polish</span></div>
|
||||||
<div class="item">mareksip<span class="item-note" translate>Czech</span></div>
|
<div class="item">mareksip<span class="item-note" translate>Czech</span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="padding">
|
<div class="settings-explanation">
|
||||||
<p>
|
<div class="settings-description" translate>
|
||||||
<span translate>We’re always looking for translation contributions! You can make corrections or help to make this app available in your native language by joining our community on Crowdin.</span>
|
We’re always looking for translation contributions! You can make corrections or help to make this app available in your native language by joining our community on Crowdin.
|
||||||
<button class="button button-standard button-primary" ng-click="openExternalLink(true, 'Open Translation Community', 'You can make contributions by signing up on our Crowdin community translation website. We’re looking forward to hearing from you!
|
</div>
|
||||||
', 'Open Crowdin', 'Go Back')" translate>Contribute Translations
|
</div>
|
||||||
</button>
|
<div class="settings-explanation">
|
||||||
</p>
|
<div class="settings-description" translate>
|
||||||
<span translate>
|
|
||||||
Don't see your language on Crowdin? Contact the Owner on Crowdin! We'd love to support your language.
|
Don't see your language on Crowdin? Contact the Owner on Crowdin! We'd love to support your language.
|
||||||
</span>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="padding">
|
||||||
|
<a class="button button-standard button-primary" ng-click="openExternalLink('https://crowdin.com/project/copay', true, 'Open Translation Community', 'You can make contributions by signing up on our Crowdin community translation website. We’re looking forward to hearing from you!', 'Open Crowdin', 'Go Back')" translate>Contribute Translations</a>
|
||||||
</div>
|
</div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
</ion-view>
|
</ion-view>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue