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

@@ -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));