Skip to content

Commit

Permalink
Merge branch 'general_other_title' of https://github.com/phlpsong/Eas…
Browse files Browse the repository at this point in the history
…ydict into general_other_title
  • Loading branch information
phlpsong committed Jan 24, 2024
2 parents 8d0be5b + f17564c commit d7aac4e
Show file tree
Hide file tree
Showing 12 changed files with 123 additions and 30 deletions.
20 changes: 16 additions & 4 deletions .github/ISSUE_TEMPLATE/cn_bug_report_zh.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 反馈问题
description: 反馈问题
title: "🐞 反馈问题:"
title: "🐞 反馈问题:{{请填写标题,不要留空}}"
labels: ["bug"]

body:
Expand All @@ -22,18 +22,30 @@ body:
id: description
attributes:
label: 问题描述
description: 请详细描述你所遇到的问题,确保开发者能够理解、重现该问题。如果上下文信息不足,开发者无法定位,问题会被降低优先级或忽略。
description: 请详细描述你所遇到的问题,确保开发者能够理解、重现该问题。如果上下文信息不足,导致开发者无法定位,问题会被降低优先级或忽略。
placeholder: 问题描述
validations:
required: true

- type: dropdown
id: reproducible
attributes:
label: 该问题是否可以稳定重现?
multiple: false
options:
- 可重现
- 不可重现
validations:
required: true

- type: textarea
id: reproduce
attributes:
label: 重现步骤
description: |
请描述如何重现该问题。如果该问题是偶发性的,或者需要特定的操作步骤才能重现,请一定要详细提供重现步骤,否则开发者无法定位问题。
(如果遇到一些很奇怪的问题,可以先尝试重启 Easydict,重启电脑,或卸载重装应用,看能否解决问题 🤔)
如果该问题可重现,请一定要详细提供重现步骤,否则开发者无法定位问题。
如果该问题是偶发性的,可以先尝试重启 Easydict,重启电脑,或卸载重装应用,看能否解决问题 🤔
注意:鉴于开发者精力有限,目前只会处理可稳定重现的问题。对于不可重现的问题,当前只会简单记录下来,观察后续。
placeholder: 重现步骤
validations:
required: true
Expand Down
8 changes: 6 additions & 2 deletions .github/ISSUE_TEMPLATE/cn_feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 功能建议
description: 功能建议
title: "🚀 功能建议:"
title: "🚀 功能建议:{{请填写标题,不要留空}}"
labels: ["enhancement"]

body:
Expand All @@ -15,6 +15,8 @@ body:
required: true
- label: Easydict 已升级到 [最新版本](https://github.com/tisfeng/Easydict/releases)
required: true
- label: 我理解并认可上述内容,并理解项目维护者精力有限,**不遵循规则的 issue 可能会被无视或直接关闭**
required: true

- type: textarea
id: feature_description
Expand All @@ -29,7 +31,9 @@ body:
id: feature_usecase
attributes:
label: 使用场景
description: 请描述你希望功能的使用场景,有无其他类似可供参考的 App 功能等。
description: |
请描述你希望功能的使用场景,有无其他类似可供参考的 App 功能等。
如果该功能没有明确的使用场景,或是无法被开发者理解,可能会被降低优先级或忽略,因此请务必清晰描述。
placeholder: 使用场景
validations:
required: true
Expand Down
22 changes: 17 additions & 5 deletions .github/ISSUE_TEMPLATE/en_bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Bug report
description: Report an issue
title: "🐞 Bug Report: "
title: "🐞 Bug Report: {{Please fill in the title, don't leave it blank}} "
labels: ["bug"]

body:
Expand All @@ -27,14 +27,26 @@ body:
validations:
required: true

- type: dropdown
id: reproducible
attributes:
label: Is the issue consistently reproducible?
multiple: false
options:
- Reproducible
- Non-reproducible
validations:
required: true

- type: textarea
id: reproduce
attributes:
label: Reproduction steps
label: Steps to Reproduce
description: |
Please describe how to reproduce the problem. If the problem is episodic or requires specific action steps to reproduce, please describe it in as much detail as possible, otherwise the developer will not be able to locate the problem.
(If the problem is episodic, try restarting Easydict, restarting the device, or uninstalling and reinstalling the app to see if that solves the problem 🤔)
placeholder: Reproduction steps
If the issue is reproducible, please provide detailed steps to reproduce it. Otherwise, the developer may not be able to locate the issue.
If the issue is intermittent, you can try restarting Easydict, restarting your computer, or uninstalling and reinstalling the application to see if the problem can be resolved 🤔
Note: Given the limited resources of the developer, only issues that can be reliably reproduced will be addressed at this time. For non-reproducible issues, they will be simply recorded for future observation.
placeholder: Steps to Reproduce
validations:
required: true

Expand Down
8 changes: 6 additions & 2 deletions .github/ISSUE_TEMPLATE/en_feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Feature request
description: Request a new feature
title: "🚀 Feature Request: "
title: "🚀 Feature Request: {{Please fill in the title, don't leave it blank}}"
labels: ["enhancement"]

body:
Expand All @@ -15,6 +15,8 @@ body:
required: true
- label: Easydict has been upgraded to the [latest version](https://github.com/tisfeng/Easydict/releases)
required: true
- label: I understand and agree to the above, and understand that the project maintainer has limited energy, **issues that do not follow the rules may be ignored or closed directly**
required: true

- type: textarea
id: feature_description
Expand All @@ -29,7 +31,9 @@ body:
id: feature_usecase
attributes:
label: Use case
description: Please describe the use case of the feature you're requesting, and whether there are any similar app features for reference.
description: |
Please describe the use case of the feature you're requesting, and whether there are any similar app features for reference.
If the feature has no actual usage scenarios or is not well understood by the developers it might get deprioritized or even ignored, so be sure to describe it clearly.
placeholder: Use case
validations:
required: true
Expand Down
4 changes: 4 additions & 0 deletions Easydict.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
037E006D2B3DC098006491C6 /* EZOpenAIService+EZPromptMessages.m in Sources */ = {isa = PBXBuildFile; fileRef = 03CF27FA2B3A787900E19B57 /* EZOpenAIService+EZPromptMessages.m */; };
038030952B4106800009230C /* CocoaLumberjack in Frameworks */ = {isa = PBXBuildFile; productRef = 038030942B4106800009230C /* CocoaLumberjack */; };
038030972B4106800009230C /* CocoaLumberjackSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 038030962B4106800009230C /* CocoaLumberjackSwift */; };
03832F542B5F6BE200D0DC64 /* AdvancedTab.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03832F532B5F6BE200D0DC64 /* AdvancedTab.swift */; };
0383914C292FBE120009828C /* Main.strings in Resources */ = {isa = PBXBuildFile; fileRef = 03839140292FBE120009828C /* Main.strings */; };
0383914D292FBE120009828C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 03839143292FBE120009828C /* Assets.xcassets */; };
0383914E292FBE120009828C /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 03839144292FBE120009828C /* ViewController.m */; };
Expand Down Expand Up @@ -421,6 +422,7 @@
037852B529588EDE00D0E2CF /* EZCustomTableRowView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EZCustomTableRowView.m; sourceTree = "<group>"; };
037852B7295D49F900D0E2CF /* EZTableRowView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EZTableRowView.h; sourceTree = "<group>"; };
037852B8295D49F900D0E2CF /* EZTableRowView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EZTableRowView.m; sourceTree = "<group>"; };
03832F532B5F6BE200D0DC64 /* AdvancedTab.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdvancedTab.swift; sourceTree = "<group>"; };
03839141292FBE120009828C /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = "<group>"; };
03839142292FBE120009828C /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
03839143292FBE120009828C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2099,6 +2101,7 @@
0A8685C72B552A590022534F /* DisabledAppTab.swift */,
276742042B3DC230002A2C75 /* PrivacyTab.swift */,
276742052B3DC230002A2C75 /* AboutTab.swift */,
03832F532B5F6BE200D0DC64 /* AdvancedTab.swift */,
);
path = Tabs;
sourceTree = "<group>";
Expand Down Expand Up @@ -2831,6 +2834,7 @@
DC46DF802B4417B900DEAE3E /* Configuration.swift in Sources */,
036E7D7B293F4FC8002675DF /* EZOpenLinkButton.m in Sources */,
EAED41EC2B54AA920005FE0A /* ServiceConfigurationSection.swift in Sources */,
03832F542B5F6BE200D0DC64 /* AdvancedTab.swift in Sources */,
276742092B3DC230002A2C75 /* AboutTab.swift in Sources */,
03008B2E2941956D0062B821 /* EZURLSchemeHandler.m in Sources */,
DC6D9C872B352EBC0055EFFC /* FontSizeHintView.swift in Sources */,
Expand Down
19 changes: 18 additions & 1 deletion Easydict/App/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
"sourceLanguage" : "en",
"strings" : {
"" : {

"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : ""
}
}
}
},
"about" : {
"comment" : "about",
Expand Down Expand Up @@ -37,6 +44,16 @@
}
}
},
"advanced" : {
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "高级"
}
}
}
},
"ali_translate" : {
"extractionState" : "manual",
"localizations" : {
Expand Down
6 changes: 6 additions & 0 deletions Easydict/NewApp/View/SettingView/SettingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ enum SettingTab: Int {
case general
case service
case disabled
case advanced
case privacy
case about
}
Expand All @@ -34,6 +35,9 @@ struct SettingView: View {
DisabledAppTab()
.tabItem { Label("disabled_app_list", systemImage: "nosign") }
.tag(SettingTab.disabled)
AdvancedTab()
.tabItem { Label("advanced", systemImage: "wrench.and.screwdriver") }
.tag(SettingTab.advanced)

PrivacyTab()
.tabItem { Label("privacy", systemImage: "hand.raised.square") }
Expand Down Expand Up @@ -71,6 +75,8 @@ struct SettingView: View {
320
case .about:
450
default:
400
}

let newSize = CGSize(width: maxWidth, height: height)
Expand Down
42 changes: 42 additions & 0 deletions Easydict/NewApp/View/SettingView/Tabs/AdvancedTab.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
//
// AdvancedTab.swift
// Easydict
//
// Created by tisfeng on 2024/1/23.
// Copyright © 2024 izual. All rights reserved.
//

import Defaults
import SwiftUI

@available(macOS 13, *)
struct AdvancedTab: View {
var body: some View {
Form {
Section {
Picker("setting.general.advance.default_tts_service", selection: $defaultTTSServiceType) {
ForEach(TTSServiceType.allCases, id: \.rawValue) { option in
Text(option.localizedStringResource)
.tag(option)
}
}
Toggle("setting.general.advance.enable_beta_feature", isOn: $enableBetaFeature)
Toggle(isOn: $enableBetaNewApp) {
Text("enable_beta_new_app")
}
} header: {
Text("setting.general.advance.header")
}
}
.formStyle(.grouped)
}

@Default(.defaultTTSServiceType) private var defaultTTSServiceType
@Default(.enableBetaFeature) private var enableBetaFeature
@Default(.enableBetaNewApp) private var enableBetaNewApp
}

@available(macOS 13, *)
#Preview {
AdvancedTab()
}
7 changes: 6 additions & 1 deletion Easydict/NewApp/View/SettingView/Tabs/DisabledAppTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ import SwiftUI
private class DisabledAppViewModel: ObservableObject {
@Published var appModelList: [EZAppModel] = []
@Published var selectedAppModels: Set<EZAppModel> = []
@Published var isImporting = false
@Published var isShowImportErrorAlert = false
@Published var isImporting = false {
didSet {
// https://github.com/tisfeng/Easydict/issues/346
Configuration.shared.disabledAutoSelect = isImporting
}
}

init() {
fetchDisabledApps()
Expand Down
15 changes: 0 additions & 15 deletions Easydict/NewApp/View/SettingView/Tabs/GeneralTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,6 @@ struct GeneralTab: View {
} header: {
Text("setting.general.other.header")
}

Section {
Picker("setting.general.advance.default_tts_service", selection: $defaultTTSServiceType) {
ForEach(TTSServiceType.allCases, id: \.rawValue) { option in
Text(option.localizedStringResource)
.tag(option)
}
}
Toggle("setting.general.advance.enable_beta_feature", isOn: $enableBetaFeature)
Toggle(isOn: $enableBetaNewApp) {
Text("enable_beta_new_app")
}
} header: {
Text("setting.general.advance.header")
}
}
.formStyle(.grouped)
}
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,7 @@ Easydict 作为一个免费开源的非盈利项目,目前主要是作者个
| 2024-01-09 | ㅤ Jack | 20 | 目前用过最好用的字典软件,谢谢! |
| 2024-01-15 || 20 | 感谢开源,感谢有你:) |
| 2024-01-16 | ㅤ sd | 5 | 大佬牛逼🐂🍺 |
| 2024-01-23 || 5 | |

</p>

Expand Down
1 change: 1 addition & 0 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@ If you don't want your username to be displayed in the list, please choose anony
| 2024-01-09 | ㅤ Jack | 20 | 目前用过最好用的字典软件,谢谢! |
| 2024-01-15 || 20 | 感谢开源,感谢有你:) |
| 2024-01-16 | ㅤ sd | 5 | 大佬牛逼🐂🍺 |
| 2024-01-23 || 5 | |

</p>

Expand Down

0 comments on commit d7aac4e

Please sign in to comment.