From 329c9b7b92778631354ff9a9f68b05b55c0d4ddc Mon Sep 17 00:00:00 2001 From: True Zhuanjia Date: Thu, 4 Jul 2024 20:47:21 +0800 Subject: [PATCH] add touch mode label description --- Limelight/Base.lproj/iPad.storyboard | 1 + Limelight/Base.lproj/iPhone.storyboard | 1 + Limelight/Localization/Localizable.xcstrings | 92 +++++++++++++++++++ .../ViewControllers/SettingsViewController.h | 1 + .../ViewControllers/SettingsViewController.m | 19 ++++ Limelight/mul.lproj/iPad.xcstrings | 42 ++++++--- 6 files changed, 144 insertions(+), 12 deletions(-) diff --git a/Limelight/Base.lproj/iPad.storyboard b/Limelight/Base.lproj/iPad.storyboard index dc74fa01..d778dfb6 100644 --- a/Limelight/Base.lproj/iPad.storyboard +++ b/Limelight/Base.lproj/iPad.storyboard @@ -472,6 +472,7 @@ ICAgICAgICAgICAgICA + diff --git a/Limelight/Base.lproj/iPhone.storyboard b/Limelight/Base.lproj/iPhone.storyboard index ceb93f2f..bcb81fbc 100644 --- a/Limelight/Base.lproj/iPhone.storyboard +++ b/Limelight/Base.lproj/iPhone.storyboard @@ -490,6 +490,7 @@ ICAgICAgICAgICAgIA + diff --git a/Limelight/Localization/Localizable.xcstrings b/Limelight/Localization/Localizable.xcstrings index 51239cbe..443ea9bc 100644 --- a/Limelight/Localization/Localizable.xcstrings +++ b/Limelight/Localization/Localizable.xcstrings @@ -1964,6 +1964,98 @@ } } }, + "Touch Mode - For MacOS Direct Touch" : { + "extractionState" : "manual", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "触控模式 - 适用MacOS单点触控" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "触控模式 - 适用MacOS单点触控" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "触控模式 - 适用MacOS单点触控" + } + } + } + }, + "Touch Mode - No Mouse & Pencil Support" : { + "extractionState" : "manual", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "触控模式 - 不支持鼠标、手写笔" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "触控模式 - 不支持鼠标、手写笔" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "触控模式 - 不支持鼠标、手写笔" + } + } + } + }, + "Touch Mode - On Screen Game Controller Available" : { + "extractionState" : "manual", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "触控模式 - 支持屏显手柄" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "触控模式 - 支持屏显手柄" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "触控模式 - 支持屏显手柄" + } + } + } + }, + "Touch Mode - With Mouse & Pencil Support" : { + "extractionState" : "manual", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "触控模式 - 支持鼠标、手写笔" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "触控模式 - 支持鼠标、手写笔" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "触控模式 - 支持鼠标、手写笔" + } + } + } + }, "Touch Pointer Velocity: %d%%" : { "extractionState" : "manual", "localizations" : { diff --git a/Limelight/ViewControllers/SettingsViewController.h b/Limelight/ViewControllers/SettingsViewController.h index 0e910f4d..563eac6e 100644 --- a/Limelight/ViewControllers/SettingsViewController.h +++ b/Limelight/ViewControllers/SettingsViewController.h @@ -16,6 +16,7 @@ @property (strong, nonatomic) IBOutlet UISegmentedControl *framerateSelector; @property (strong, nonatomic) IBOutlet UISegmentedControl *resolutionSelector; @property (strong, nonatomic) IBOutlet UIView *resolutionDisplayView; +@property (strong, nonatomic) IBOutlet UILabel *touchModeLabel; @property (strong, nonatomic) IBOutlet UISegmentedControl *touchModeSelector; @property (strong, nonatomic) IBOutlet UILabel *onscreenControllerLabel; @property (strong, nonatomic) IBOutlet UISegmentedControl *onscreenControlSelector; diff --git a/Limelight/ViewControllers/SettingsViewController.m b/Limelight/ViewControllers/SettingsViewController.m index 0eb4dc55..5ed4e2e6 100644 --- a/Limelight/ViewControllers/SettingsViewController.m +++ b/Limelight/ViewControllers/SettingsViewController.m @@ -268,6 +268,8 @@ BOOL isCustomResolution(CGSize res) { // [self.touchModeSelector setSelectedSegmentIndex:currentSettings.absoluteTouchMode ? 1 : 0]; [self.touchModeSelector setSelectedSegmentIndex:currentSettings.touchMode.intValue]; //Load old touchMode setting [self.touchModeSelector addTarget:self action:@selector(touchModeChanged) forControlEvents:UIControlEventValueChanged]; + [self updateTouchModeLabel]; + [self.statsOverlaySelector setSelectedSegmentIndex:currentSettings.statsOverlay ? 1 : 0]; [self.btMouseSelector setSelectedSegmentIndex:currentSettings.btMouseSupport ? 1 : 0]; [self.optimizeSettingsSelector setSelectedSegmentIndex:currentSettings.optimizeGames ? 1 : 0]; @@ -358,6 +360,22 @@ BOOL isCustomResolution(CGSize res) { } +- (void)updateTouchModeLabel{ + NSString* labelText; + switch([self.touchModeSelector selectedSegmentIndex]){ + case RELATIVE_TOUCH: + labelText = [LocalizationHelper localizedStringForKey:@"Touch Mode - On Screen Game Controller Available"];break; + case REGULAR_NATIVE_TOUCH: + labelText = [LocalizationHelper localizedStringForKey:@"Touch Mode - With Mouse & Pencil Support"];break; + case PURE_NATIVE_TOUCH: + labelText = [LocalizationHelper localizedStringForKey:@"Touch Mode - No Mouse & Pencil Support"];break; + case ABSOLUTE_TOUCH: + labelText = [LocalizationHelper localizedStringForKey:@"Touch Mode - For MacOS Direct Touch"];break; + } + [self.touchModeLabel setText:labelText]; +} + + - (void)showCustomOSCTip { UIAlertController *alertController = [UIAlertController alertControllerWithTitle:[LocalizationHelper localizedStringForKey:@"Rebase in Stream View"] message:[LocalizationHelper localizedStringForKey:@"Tap 4 fingers to change on-screen controller layout in stream view"] @@ -466,6 +484,7 @@ BOOL isCustomResolution(CGSize res) { else{ [self.onscreenControllerLabel setText:[LocalizationHelper localizedStringForKey: @"On-Screen Controls"]]; } + [self updateTouchModeLabel]; } - (void) updateBitrate { diff --git a/Limelight/mul.lproj/iPad.xcstrings b/Limelight/mul.lproj/iPad.xcstrings index cf60166f..e01f2d82 100644 --- a/Limelight/mul.lproj/iPad.xcstrings +++ b/Limelight/mul.lproj/iPad.xcstrings @@ -637,20 +637,20 @@ }, "zh-Hans" : { "stringUnit" : { - "state" : "needs_review", - "value" : "原生多点触控" + "state" : "translated", + "value" : "多点触控" } }, "zh-Hant" : { "stringUnit" : { - "state" : "needs_review", - "value" : "原生多点触控" + "state" : "translated", + "value" : "多点触控" } }, "zh-HK" : { "stringUnit" : { - "state" : "needs_review", - "value" : "原生多点触控" + "state" : "translated", + "value" : "多点触控" } } } @@ -667,20 +667,20 @@ }, "zh-Hans" : { "stringUnit" : { - "state" : "needs_review", - "value" : "鼠标模式" + "state" : "translated", + "value" : "仅多点触控" } }, "zh-Hant" : { "stringUnit" : { - "state" : "needs_review", - "value" : "鼠标模式" + "state" : "translated", + "value" : "仅多点触控" } }, "zh-HK" : { "stringUnit" : { - "state" : "needs_review", - "value" : "鼠标模式" + "state" : "translated", + "value" : "仅多点触控" } } } @@ -694,6 +694,24 @@ "state" : "new", "value" : "Absolute Touch" } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "单点鼠标" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "单点鼠标" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "单点鼠标" + } } } },