key缺少,添加权限多语言

This commit is contained in:
2026-03-07 13:29:29 +08:00
parent e03287605c
commit cbcf8c4197
47 changed files with 986 additions and 225 deletions

View File

@@ -304,8 +304,10 @@
NSUInteger charIndex = [layoutManager characterIndexForGlyphAtIndex:glyphIndex];
NSString *lowerFull = textView.text.lowercaseString ?: @"";
NSRange termsRange = [lowerFull rangeOfString:@"terms of service"];
NSRange privacyRange = [lowerFull rangeOfString:@"privacy policy"];
NSString *termsText = [KBLocalized(@"terms of service") lowercaseString];
NSString *privacyText = [KBLocalized(@"privacy policy") lowercaseString];
NSRange termsRange = [lowerFull rangeOfString:termsText];
NSRange privacyRange = [lowerFull rangeOfString:privacyText];
BOOL hitTerms = (termsRange.location != NSNotFound && NSLocationInRange(charIndex, termsRange));
BOOL hitPrivacy = (privacyRange.location != NSNotFound && NSLocationInRange(charIndex, privacyRange));
@@ -513,9 +515,9 @@
_agreementTextView.textContainerInset = UIEdgeInsetsZero;
_agreementTextView.textContainer.lineFragmentPadding = 0;
NSString *fullText = @"By continuing, you agree to our terms of service and confirm that you have read our privacy policy";
NSString *termsText = @"terms of service";
NSString *privacyText = @"privacy policy";
NSString *fullText = KBLocalized(@"By continuing, you agree to our terms of service and confirm that you have read our privacy policy");
NSString *termsText = KBLocalized(@"terms of service");
NSString *privacyText = KBLocalized(@"privacy policy");
NSMutableParagraphStyle *paragraph = [[NSMutableParagraphStyle alloc] init];
paragraph.alignment = NSTextAlignmentCenter;

View File

@@ -386,19 +386,17 @@
NSUInteger charIndex = [layoutManager characterIndexForGlyphAtIndex:glyphIndex];
NSString *lowerFull = textView.text.lowercaseString ?: @"";
NSRange termsRange = [lowerFull rangeOfString:@"terms of service"];
NSRange privacyRange = [lowerFull rangeOfString:@"privacy policy"];
NSString *termsText = [KBLocalized(@"terms of service") lowercaseString];
NSString *privacyText = [KBLocalized(@"privacy policy") lowercaseString];
NSRange termsRange = [lowerFull rangeOfString:termsText];
NSRange privacyRange = [lowerFull rangeOfString:privacyText];
BOOL hitTerms = (termsRange.location != NSNotFound && NSLocationInRange(charIndex, termsRange));
BOOL hitPrivacy = (privacyRange.location != NSNotFound && NSLocationInRange(charIndex, privacyRange));
if (hitTerms || hitPrivacy) {
KBLOG(@"tap policy in KBEmailRegistVC");
//
if (hitTerms == true) {
[KBHUD showInfo:@"hitTerms"];
}else{
[KBHUD showInfo:@"hitPrivacy"];
}
[KBHUD showInfo:KBLocalized(@"Open agreement")];
}
}
@@ -723,9 +721,9 @@
_agreementTextView.textContainerInset = UIEdgeInsetsZero;
_agreementTextView.textContainer.lineFragmentPadding = 0;
NSString *fullText = @"By continuing, you agree to our terms of service and confirm that you have read our privacy policy";
NSString *termsText = @"terms of service";
NSString *privacyText = @"privacy policy";
NSString *fullText = KBLocalized(@"By continuing, you agree to our terms of service and confirm that you have read our privacy policy");
NSString *termsText = KBLocalized(@"terms of service");
NSString *privacyText = KBLocalized(@"privacy policy");
NSMutableParagraphStyle *paragraph = [[NSMutableParagraphStyle alloc] init];
paragraph.alignment = NSTextAlignmentCenter;

View File

@@ -372,9 +372,9 @@
_agreementTextView.textContainer.lineFragmentPadding = 0;
// terms of service / privacy policy #717171
NSString *fullText = @"By continuing, you agree to our terms of service and confirm that you have read our privacy policy";
NSString *termsText = @"terms of service";
NSString *privacyText = @"privacy policy";
NSString *fullText = KBLocalized(@"By continuing, you agree to our terms of service and confirm that you have read our privacy policy");
NSString *termsText = KBLocalized(@"terms of service");
NSString *privacyText = KBLocalized(@"privacy policy");
NSMutableParagraphStyle *paragraph = [[NSMutableParagraphStyle alloc] init];
paragraph.alignment = NSTextAlignmentCenter; //
@@ -488,8 +488,10 @@
NSUInteger charIndex = [layoutManager characterIndexForGlyphAtIndex:glyphIndex];
NSString *lowerFull = textView.text.lowercaseString ?: @"";
NSRange termsRange = [lowerFull rangeOfString:@"terms of service"];
NSRange privacyRange = [lowerFull rangeOfString:@"privacy policy"];
NSString *termsText = [KBLocalized(@"terms of service") lowercaseString];
NSString *privacyText = [KBLocalized(@"privacy policy") lowercaseString];
NSRange termsRange = [lowerFull rangeOfString:termsText];
NSRange privacyRange = [lowerFull rangeOfString:privacyText];
BOOL hitTerms = (termsRange.location != NSNotFound && NSLocationInRange(charIndex, termsRange));
BOOL hitPrivacy = (privacyRange.location != NSNotFound && NSLocationInRange(charIndex, privacyRange));

View File

@@ -107,7 +107,7 @@
- (UIButton *)compatHintButton {
if (!_compatHintButton) {
_compatHintButton = [UIButton buttonWithType:UIButtonTypeSystem];
[_compatHintButton setTitle:KBLocalized(@"需要 iOS13+ 才能使用 Apple 登录") forState:UIControlStateNormal];
[_compatHintButton setTitle:KBLocalized(@"Sign in with Apple requires iOS 13+") forState:UIControlStateNormal];
_compatHintButton.enabled = NO;
}
return _compatHintButton;