added warn if default pri key is being used. increased threshold len for translation to 10

This commit is contained in:
Vishal 2022-08-31 17:01:26 +05:30
parent 20f5295e54
commit a46e2a19c5
2 changed files with 9 additions and 1 deletions

View File

@ -75,6 +75,14 @@ Future<void> main(List<String> arguments) async {
userPublicKey = getPublicKey(userPrivateKey);
print("Going to use the provided private key");
}
// write informative message in case user is using the default private key
if( userPrivateKey == gDefaultPrivateKey) {
print("${gWarningColor}You seem to be using the default private key, which comes bundled with this $exename and is used by all users of this program$gColorEndMarker");
print("You can also create your own private key and use it with ${gWarningColor}--prikey$gColorEndMarker program argument. ");
print("You can create your own private key from ${gWarningColor}astral.ninja or branle.netlify.app$gColorEndMarker, or other such tools.\n");
}
if( argResults[relayArg] != null) {
defaultServerUrl = argResults[relayArg];
print("Going to use relay: $defaultServerUrl");

View File

@ -113,7 +113,7 @@ extension StringX on String {
isEnglish( ) {
// since smaller words can be smileys they should not be translated
if( length < 6)
if( length < 10)
return true;
if( !isLatinAlphabet())