sjhoeksma / cordova-plugin-keychain-touch-id

Touch ID plugin with saving password in keychain for IOS and android
87 stars 160 forks source link

window.plugins.touchid.setLocale() #28

Open qliqdev opened 6 years ago

qliqdev commented 6 years ago

setLocale didn't work for me using FingerprintAuth that is included in plugin platform: android ionic: 1.3.1 "name": "cordova-plugin-keychain-touch-id", "version": "3.2.1",

window.plugins.touchid.isAvailable(function () {

window.plugins.touchid.has('XXXXXX', function () {
    //Touch ID avaialble and Password key available
    window.plugins.touchid.setLocale('ru_RU', function () {
        window.plugins.touchid.verify('XXXXXX', $translate.instant('ATTACH_FINGER_TO_ENTER'), function (password) {
            authorize();
        }, function (err) {
            console.log('canceled');
            AppPopup.toast('ATTENTION', 'BIO_CANCELED_ENTER_PIN');
        });
    }, function (err) {
        console.log('no locale');
    })
    }, function () {
        //Touch ID available but no Password Key available
        AppPopup.toast('ATTENTION', 'ENTER_PIN_TO_REGISTER_TOUCH_ID');
    }); 
},  function (msg) {
//Touch ID not available
});

sykaeh commented 6 years ago

@abbazer Currently only English and Spanish are implemented by this plugin. If you need a different language, then you have to add it. I have added the ones relevant to me (see #30). You would also have to call it with 'ru' only (not 'ru_RU').

qliqdev commented 6 years ago

i've tried both of 'ru' and 'ru_RU', cuz I saw in code some part where locales converts to single 'ru' when entry is 'ru_RU'.

i hope in last update of review locales will work fine. depending on #30

thanks for your answer

fabrz commented 6 years ago

@sjhoeksma I'm experiencing this issue too. Is this plugin still being maintained?

qliqdev commented 6 years ago

@fabrz I have added Russian Lang, fork in my projects