Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Niutrans support #226

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ca180eb
NiuTrans Support
Nov 14, 2023
33b2dc6
NiuTrans Support
Nov 14, 2023
336fef8
perf: show error message when niutrans error
tisfeng Nov 15, 2023
1adb594
perf: remove unused code
tisfeng Nov 15, 2023
aa1e861
perf: remove extra line break at the end
tisfeng Nov 15, 2023
f76c784
perf: rename EZNiuTransAPIKey
tisfeng Nov 15, 2023
55b87e9
Update Localizable.xcstrings
BigGuang97 Nov 16, 2023
774debc
Delete Easydict/.DS_Store
BigGuang97 Nov 16, 2023
ec6f00c
Update EZConst.h
BigGuang97 Nov 16, 2023
a9eacd5
Update EZNiuTransTranslate.m
BigGuang97 Nov 16, 2023
4f7ef6e
Update EZNiuTransTranslate.m
BigGuang97 Nov 16, 2023
9be2d0d
Delete Easydict/Feature/Service/Niutrans/.DS_Store
BigGuang97 Nov 16, 2023
1379ab0
Delete Easydict/Feature/Service/DeepL/.DS_Store
BigGuang97 Nov 16, 2023
94daca0
Delete Easydict/Feature/.DS_Store
BigGuang97 Nov 16, 2023
676a549
Delete Easydict/Feature/Service/.DS_Store
BigGuang97 Nov 16, 2023
e8cc343
Delete Easydict/App/.DS_Store
BigGuang97 Nov 17, 2023
800975f
Delete Easydict/App/Assets.xcassets/.DS_Store
BigGuang97 Nov 17, 2023
58fdc7b
Delete Easydict/App/Assets.xcassets/menu-icon/.DS_Store
BigGuang97 Nov 17, 2023
ba99fe2
Delete Easydict/App/Assets.xcassets/service-icon/.DS_Store
BigGuang97 Nov 17, 2023
32aac28
Delete Easydict/App/Assets.xcassets/setting/.DS_Store
BigGuang97 Nov 17, 2023
de178e7
Delete Easydict/App/Icons/.DS_Store
BigGuang97 Nov 17, 2023
a4d8f96
Delete Easydict/Feature/Utility/.DS_Store
BigGuang97 Nov 17, 2023
a3e828f
Delete Pods/.DS_Store
BigGuang97 Nov 17, 2023
d292a0a
Delete Pods/AFNetworking/.DS_Store
BigGuang97 Nov 17, 2023
c3cb4da
Merge branch 'dev' into niutrans-support
BigGuang97 Nov 17, 2023
8234237
fix: add Niutrans to target
tisfeng Nov 20, 2023
f6963b9
fix(crash): user system preferred languages may only have one languag…
tisfeng Nov 17, 2023
f245a4b
perf: add default APIKey for Niutrans
tisfeng Nov 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
24 changes: 23 additions & 1 deletion Easydict.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
0310C8272A94F5DF00B1D81E /* apple-dictionary.html in Resources */ = {isa = PBXBuildFile; fileRef = 0310C8262A94EFA100B1D81E /* apple-dictionary.html */; };
0313F8702AD5577400A5CFB0 /* EasydictTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0313F86F2AD5577400A5CFB0 /* EasydictTests.m */; };
031DBD792AE01E130071CF85 /* easydict in Resources */ = {isa = PBXBuildFile; fileRef = 031DBD782AE01E130071CF85 /* easydict */; };
032035AC2B0B4C81007B7171 /* EZNiuTransTranslateResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 032035AA2B0B4C81007B7171 /* EZNiuTransTranslateResponse.m */; };
032035AD2B0B4C81007B7171 /* EZNiuTransTranslate.m in Sources */ = {isa = PBXBuildFile; fileRef = 032035AB2B0B4C81007B7171 /* EZNiuTransTranslate.m */; };
03247E362968158B00AFCD67 /* EZScriptExecutor.m in Sources */ = {isa = PBXBuildFile; fileRef = 03247E352968158B00AFCD67 /* EZScriptExecutor.m */; };
03247E3A296AE8EC00AFCD67 /* EZLoadingAnimationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 03247E39296AE8EC00AFCD67 /* EZLoadingAnimationView.m */; };
03262C1C29EEE91700EFECA0 /* EZEnumTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 03262C1B29EEE91700EFECA0 /* EZEnumTypes.m */; };
Expand Down Expand Up @@ -263,6 +265,10 @@
0313F86D2AD5577400A5CFB0 /* EasydictTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = EasydictTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
0313F86F2AD5577400A5CFB0 /* EasydictTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EasydictTests.m; sourceTree = "<group>"; };
031DBD782AE01E130071CF85 /* easydict */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = easydict; sourceTree = "<group>"; };
032035A82B0B4C81007B7171 /* EZNiuTransTranslateResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZNiuTransTranslateResponse.h; sourceTree = "<group>"; };
032035A92B0B4C81007B7171 /* EZNiuTransTranslate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZNiuTransTranslate.h; sourceTree = "<group>"; };
032035AA2B0B4C81007B7171 /* EZNiuTransTranslateResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZNiuTransTranslateResponse.m; sourceTree = "<group>"; };
032035AB2B0B4C81007B7171 /* EZNiuTransTranslate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZNiuTransTranslate.m; sourceTree = "<group>"; };
03247E342968158B00AFCD67 /* EZScriptExecutor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EZScriptExecutor.h; sourceTree = "<group>"; };
03247E352968158B00AFCD67 /* EZScriptExecutor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EZScriptExecutor.m; sourceTree = "<group>"; };
03247E38296AE8EC00AFCD67 /* EZLoadingAnimationView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EZLoadingAnimationView.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -747,6 +753,17 @@
path = EasydictTests;
sourceTree = "<group>";
};
032035A72B0B4C81007B7171 /* Niutrans */ = {
isa = PBXGroup;
children = (
032035A82B0B4C81007B7171 /* EZNiuTransTranslateResponse.h */,
032035A92B0B4C81007B7171 /* EZNiuTransTranslate.h */,
032035AA2B0B4C81007B7171 /* EZNiuTransTranslateResponse.m */,
032035AB2B0B4C81007B7171 /* EZNiuTransTranslate.m */,
);
path = Niutrans;
sourceTree = "<group>";
};
03247E37296AE8C800AFCD67 /* LoadingAnimationView */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1144,6 +1161,7 @@
03B0222B29231FA6001C7E63 /* Service */ = {
isa = PBXGroup;
children = (
032035A72B0B4C81007B7171 /* Niutrans */,
6220AD582A8280E800BBFB52 /* Bing */,
0399C6A929A8608000B4AFCC /* OpenAI */,
03F14A382956011400CB7379 /* Volcano */,
Expand Down Expand Up @@ -1969,7 +1987,7 @@
};
buildConfigurationList = C99EEB132385796700FEE666 /* Build configuration list for PBXProject "Easydict" */;
compatibilityVersion = "Xcode 13.0";
developmentRegion = en;
developmentRegion = "zh-Hans";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请问这个是在哪里修改的,为什么修改?

Easydict.xcodeproj/project.pbxproj 配置文件不一般不要随便修改。

hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -2209,6 +2227,7 @@
03BDA7BC2A26DA280079D04F /* XPMArgumentSignature.m in Sources */,
03B0230229231FA6001C7E63 /* EZWordResultView.m in Sources */,
0399C6A529A747E600B4AFCC /* EZDeepLTranslateResponse.m in Sources */,
032035AD2B0B4C81007B7171 /* EZNiuTransTranslate.m in Sources */,
039F5506294B6E29004AB940 /* EZSettingViewController.m in Sources */,
03BD281E29481C0400F5891A /* EZAudioPlayer.m in Sources */,
03E02A2629250D1D00A10260 /* EZEventMonitor.m in Sources */,
Expand Down Expand Up @@ -2291,6 +2310,7 @@
03542A4F2937B64B00C34C33 /* EZYoudaoOCRResponse.m in Sources */,
03B0233929231FA6001C7E63 /* MMTool.m in Sources */,
03542A552937B7DE00C34C33 /* EZTranslateError.m in Sources */,
032035AC2B0B4C81007B7171 /* EZNiuTransTranslateResponse.m in Sources */,
03BDA7B82A26DA280079D04F /* XPMValuedArgument.m in Sources */,
036196762A000F5900806370 /* NSData+Base64.m in Sources */,
03BDA7BA2A26DA280079D04F /* XPMMutableAttributedArray.m in Sources */,
Expand Down Expand Up @@ -2520,6 +2540,7 @@
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
SDKROOT = macosx;
};
name = Debug;
Expand Down Expand Up @@ -2578,6 +2599,7 @@
MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_LDFLAGS = "";
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "小牛翻译.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 18 additions & 2 deletions Easydict/App/Localizable.xcstrings
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sourceLanguage" : "en",
"sourceLanguage" : "zh-Hans",
"strings" : {
"about" : {
"comment" : "about",
Expand Down Expand Up @@ -1379,6 +1379,22 @@
}
}
},
"niuTrans_translate" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "NiuTrans"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "小牛翻译"
}
}
}
},
"no_results_found" : {
"localizations" : {
"en" : {
Expand Down Expand Up @@ -2222,4 +2238,4 @@
}
},
"version" : "1.0"
}
}
Loading