Merge pull request #5188 from gabrielbazan7/feat/addTranslations
adding language detection and language preferences
This commit is contained in:
commit
b413303c85
7 changed files with 68 additions and 67 deletions
|
|
@ -5,8 +5,8 @@ angular.module('copayApp.controllers').controller('preferencesLanguageController
|
|||
|
||||
$scope.availableLanguages = uxLanguage.getLanguages();
|
||||
|
||||
$scope.openExternalLink = function(url, target) {
|
||||
externalLinkService.open(url, target);
|
||||
$scope.openExternalLink = function(url, optIn, title, message, okText, cancelText) {
|
||||
externalLinkService.open(url, optIn, title, message, okText, cancelText);
|
||||
};
|
||||
|
||||
$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();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
angular.module('copayApp.controllers').controller('translatorsController',
|
||||
function($scope, externalLinkService) {
|
||||
$scope.openExternalLink = function(url, target) {
|
||||
externalLinkService.open(url, target);
|
||||
$scope.openExternalLink = function(url, optIn, title, message, okText, cancelText) {
|
||||
externalLinkService.open(url, optIn, title, message, okText, cancelText);
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -8,42 +8,39 @@ angular.module('copayApp.services')
|
|||
root.availableLanguages = [{
|
||||
name: 'English',
|
||||
isoCode: 'en',
|
||||
}, {
|
||||
name: 'Český',
|
||||
isoCode: 'cs',
|
||||
}, {
|
||||
name: 'Français',
|
||||
isoCode: 'fr',
|
||||
}, {
|
||||
name: 'Italiano',
|
||||
isoCode: 'it',
|
||||
}, {
|
||||
name: 'Deutsch',
|
||||
isoCode: 'de',
|
||||
}, {
|
||||
name: 'Español',
|
||||
isoCode: 'es',
|
||||
}, {
|
||||
name: '日本語',
|
||||
isoCode: 'ja',
|
||||
useIdeograms: true,
|
||||
}, {
|
||||
name: '中文(简体)',
|
||||
isoCode: 'zh',
|
||||
useIdeograms: true,
|
||||
}, {
|
||||
name: 'Polski',
|
||||
isoCode: 'pl',
|
||||
}, {
|
||||
name: 'Pусский',
|
||||
isoCode: 'ru',
|
||||
name: 'Français',
|
||||
isoCode: 'fr',
|
||||
// }, {
|
||||
// name: 'Český',
|
||||
// isoCode: 'cs',
|
||||
// }, {
|
||||
// name: 'Italiano',
|
||||
// isoCode: 'it',
|
||||
// }, {
|
||||
// name: 'Deutsch',
|
||||
// isoCode: 'de',
|
||||
// }, {
|
||||
// name: '日本語',
|
||||
// isoCode: 'ja',
|
||||
// useIdeograms: true,
|
||||
// }, {
|
||||
// name: '中文(简体)',
|
||||
// isoCode: 'zh',
|
||||
// useIdeograms: true,
|
||||
// }, {
|
||||
// name: 'Polski',
|
||||
// isoCode: 'pl',
|
||||
// }, {
|
||||
// name: 'Pусский',
|
||||
// isoCode: 'ru',
|
||||
}];
|
||||
|
||||
|
||||
root._detect = function(cb) {
|
||||
|
||||
return cb('en'); //disable auto detection for release;
|
||||
|
||||
var userLang, androidLang;
|
||||
if (navigator && navigator.globalization) {
|
||||
|
||||
|
|
|
|||
|
|
@ -30,11 +30,11 @@
|
|||
<span translate>Terms of Use</span>
|
||||
<i class="icon bp-arrow-right"></i>
|
||||
</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>
|
||||
<span translate>Translators</span>
|
||||
<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">
|
||||
<i class="icon ion-ios-copy-outline"></i>
|
||||
<span translate>Session log</span>
|
||||
|
|
|
|||
|
|
@ -12,14 +12,18 @@
|
|||
ng-click="save(lang.isoCode)">{{lang.name}}
|
||||
</ion-radio>
|
||||
</div>
|
||||
<div class="padding">
|
||||
<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>
|
||||
<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!
|
||||
', 'Open Crowdin', 'Go Back')" translate>Contribute Translations
|
||||
</button>
|
||||
<span translate>
|
||||
Don't see your language on Crowdin? Contact the Owner on Crowdin! We'd love to support your language.
|
||||
</span>
|
||||
<div class="settings-explanation">
|
||||
<div class="settings-description" 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.
|
||||
</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-view>
|
||||
|
|
|
|||
|
|
@ -53,18 +53,16 @@
|
|||
<span translate>Notifications</span>
|
||||
<i class="icon bp-arrow-right"></i>
|
||||
</a>
|
||||
<!-- See https://github.com/bitpay/bitpay-wallet/issues/265 -->
|
||||
<!-- <a class="item item-icon-left item-icon-right" ui-sref="tabs.language"> -->
|
||||
<!-- <i class="icon big-icon-svg"> -->
|
||||
<!-- <img src="img/icon-language.svg" class="bg"/> -->
|
||||
<!-- </i> -->
|
||||
<!-- <span translate>Language</span> -->
|
||||
<!-- <span class="item-note"> -->
|
||||
<!-- {{currentLanguageName|translate}} -->
|
||||
<!-- </span> -->
|
||||
<!-- <i class="icon bp-arrow-right"></i> -->
|
||||
<!-- </a> -->
|
||||
<!-- -->
|
||||
<a class="item item-icon-left item-icon-right" ui-sref="tabs.language">
|
||||
<i class="icon big-icon-svg">
|
||||
<img src="img/icon-language.svg" class="bg"/>
|
||||
</i>
|
||||
<span translate>Language</span>
|
||||
<span class="item-note">
|
||||
{{currentLanguageName|translate}}
|
||||
</span>
|
||||
<i class="icon bp-arrow-right"></i>
|
||||
</a>
|
||||
<a class="item has-setting-value item-icon-left item-icon-right" ui-sref="tabs.unit">
|
||||
<i class="icon big-icon-svg">
|
||||
<img src="img/icon-unit.svg" class="bg"/>
|
||||
|
|
|
|||
|
|
@ -9,26 +9,28 @@
|
|||
<div class="item item-divider" translate>
|
||||
Translation Credits
|
||||
</div>
|
||||
<div class="item">kinoshitajona<span class="item-note" translate>Japanese</span></div>
|
||||
<!-- <div class="item">kinoshitajona<span class="item-note" translate>Japanese</span></div> -->
|
||||
<div class="item">Kirvx<span class="item-note" translate>French</span></div>
|
||||
<div class="item">saschad<span class="item-note" translate>German</span></div>
|
||||
<!-- <div class="item">saschad<span class="item-note" translate>German</span></div> -->
|
||||
<div class="item">cmgustavo83<span class="item-note" translate>Spanish</span></div>
|
||||
<div class="item">RussianNeuroMancer<span class="item-note" translate>Russian</span></div>
|
||||
<!-- <div class="item">RussianNeuroMancer<span class="item-note" translate>Russian</span></div>
|
||||
<div class="item">HostFat<span class="item-note" translate>Italian</span></div>
|
||||
<div class="item">xm2hi<span class="item-note" translate>Chinese</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 class="settings-explanation">
|
||||
<div class="settings-description" 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.
|
||||
</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">
|
||||
<p>
|
||||
<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>
|
||||
<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!
|
||||
', 'Open Crowdin', 'Go Back')" translate>Contribute Translations
|
||||
</button>
|
||||
</p>
|
||||
<span translate>
|
||||
Don't see your language on Crowdin? Contact the Owner on Crowdin! We'd love to support your language.
|
||||
</span>
|
||||
<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-view>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue