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

Niutrans support #226

wants to merge 28 commits into from

Conversation

BigGuang97
Copy link
Contributor

@@ -167,6 +167,6 @@ SPEC CHECKSUMS:
Sparkle: 270cd27377bf04e9c128af06e3a22d0f572d6ee3
SSZipArchive: 62d4947b08730e4cda640473b0066d209ff033c9

PODFILE CHECKSUM: 851af542ac1369ffd80ab7b91dc95f158ee0d3d6
PODFILE CHECKSUM: 3e98cd87eb9495431dc2cd105c1571edc8f60360
Copy link
Owner

Choose a reason for hiding this comment

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

这里为什么会改动这个文件内容?

@@ -223,7 +223,7 @@ - (instancetype)init {
return nil;
}

self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", nil];
self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", @"text/javascript", @"text/html", nil];
Copy link
Owner

Choose a reason for hiding this comment

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

一般情况,不应该手动修改第三方 Pod 库的,请问你这里修改是为什么?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个想让AFNetworking 能够接收text/html格式返回数据。

Copy link
Owner

Choose a reason for hiding this comment

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

不不,不需要改源码,acceptableContentTypes 有对外的接口的,参考这里

responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/html", @"text/plain", nil];

Copy link
Owner

Choose a reason for hiding this comment

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

之前我看了这个接口请求,是 JOSN 格式,也没有用到 text/html

@@ -1969,7 +1981,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 配置文件不一般不要随便修改。

@@ -1,16 +1,9 @@
{
"sourceLanguage" : "en",
"sourceLanguage" : "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/App/mul.lproj/Main.xcstrings 这个文件也是,我记得添加一个新服务,好像是不需要修改这个文件的。

@@ -25,7 +25,7 @@
);
dependencies = (
20000DB20840BFBA5AE529DA48FF7827 /* PBXTargetDependency */,
0E9A554FD59787BBD43C562B29547AFF /* PBXTargetDependency */,
457A6020E71E493D7145A8EC8874C5BB /* PBXTargetDependency */,
Copy link
Owner

Choose a reason for hiding this comment

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

这个文件也不应该修改,你是执行了 pod update,或是接受了系统的建议更改提示?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

确实在过程中执行了pod update

Copy link
Owner

Choose a reason for hiding this comment

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

@BigGuang97 不需要执行 pod update,你这个 PR 改了太多无关的东西,你重新整理一下。

你这个分支,编译就报错,Niutrans 目录下的文件没有关联到 target

参考这里的编译步骤,你先本地跑起来,然后弄个新的分支,逐步将提交 pick 到新分支。注意不要乱改配置,也不要改无关的文件代码。

https://github.com/tisfeng/easydict#%E5%BC%80%E5%8F%91%E8%80%85%E6%9E%84%E5%BB%BA

image

Copy link
Owner

Choose a reason for hiding this comment

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

删除 Xcode 中空的 Niutrans,参照下面选项,将外部的 Niutrans 目录拖到 Xcode 的 Service 下面

image image

Copy link
Owner

Choose a reason for hiding this comment

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

我帮你加到 target 了,你整理一下代码吧。

@tisfeng
Copy link
Owner

tisfeng commented Nov 17, 2023

@Kyle-Ye 有空帮忙看一下这个 PR,他刚接触 objc,不知道怎么更改了一些配置文件。。

Copy link
Collaborator

@Kyle-Ye Kyle-Ye left a comment

Choose a reason for hiding this comment

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

最小改动原则,先回滚下相关的改动吧,只保留 Easydic.xcodeproj 和 Easydic 文件夹以及 README 的改动

@tisfeng 后续合入的时候记得squash merge下,或者 @BigGuang97 你先本地重新整理 commit 后把这个分支 push --force 下

@tisfeng
Copy link
Owner

tisfeng commented Nov 21, 2023

@BigGuang97 你好,请尽快解决前面提到的问题,如果需要帮助,我这边也可以提供。

@BigGuang97 BigGuang97 mentioned this pull request Nov 23, 2023
@tisfeng
Copy link
Owner

tisfeng commented Nov 23, 2023

已在 #239 合并。

@tisfeng tisfeng closed this Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants