faisalmemon / ios-crash-dump-analysis-book

iOS Crash Dump Analysis Book
Other
593 stars 90 forks source link

translate this book into Chinese #1

Closed LoneyIsError closed 3 years ago

LoneyIsError commented 4 years ago

If I can get your permission, I would like to translate this book into Chinese and share it with more junior and intermediate iOS developers in China for free。 Thank you

faisalmemon commented 4 years ago

Thanks for your enquiry. I'd like to ask some questions but please forgive any errors on my side as I am new to this topic.

  1. When you say Chinese, would that be Modern Standard Chinese? Is that language code zh? The reason for asking is that, for example, I wrote the book in US English (rather than British English) for the widest understanding without being regionally focussed.
  2. When you say distribute for free, do you mean incorporating the Chinese version into this code base, since GitHub is freely available in China, or another distribution platform or mechanism?
  3. Are you a native Chinese speaker with a technical background, for example Computer Science?

I am happy to collaborate with you in reaching the Chinese community with this book. I am also happy for the Chinese audience to receive the content free of charge.

Unfortunately due to some contractual limitations, I am restricted from collaboration in the short term, but here is my timeline:

  1. I can publicly contribute code and work on things from 26th September 2020 on GitHub.
  2. When Apple release their first Apple Silicon based computer, I can start publishing material relating to Apple Silicon.

Since Apple Silicon is a significant advancement, my intention in the future is to write a second edition that is an update that incorporates a discussion of Apple Silicon related crashes. There are other updates in the most recent iOS/macOS that the book needs to be modernised for.

What this means in practice is that there will be a mega-update (git push) to the book timed most likely after Apple release their first Apple Silicon computer. That's not how I would generally like to work (I've previously made small frequent edits). However, I need to tell you about this because I don't want you to get an unpleasant surprise, and disrupt your work.

LoneyIsError commented 4 years ago

First, sorry for the late reply.

What I said to translate into Chinese is to translate this book from English to Chinese.

I am a native Chinese speaker with a technical background and I am an iOS developer. I read the book last year, this book is very useful for me.

Some iOS programmers I know don’t know this book yet. I think this good book should be known to more people.

If you have plans to publish later, I do not want to infringe your copyright and the hard work of writing this book.

I am not a well-known iOS developer in China, but I am willing to work hard for this book.

For me, this is an opportunity to learn both English and iOS crash.

So if you allow, I will translate this book and incorporating the Chinese version into this code base. I am not a very capable iOS programmer, my translation may not be so accurate, I hope to translate this book as an opportunity for improvement.

faisalmemon commented 4 years ago

OK, let's collaborate on a Chinese translation. I welcome your expertise and contribution. And thank you for reading the book; I am glad it was helpful to you.

My suggestion is that you create a directory markdown/zh, and in that place copy all the markdown/ files, and translate those. Keep the file names the same. You can translate those in your own time. Use GitHub pull requests to have them incorporated. On 26th September 2020, I will begin processing pull requests. That should be 90% of the work. The remaining work are the front/back pages; those are docx files in the top level directory. They could be named _zh.docx files. I will then write the automation scripts so that the system builds the US-English version and the Chinese version, and publishes them in html format for GitHub pages.

We can customise the Chinese version to give you credit for your work, and a short personal message, such as in the Preface.

The remaining 10% of the effort, in practice, are all the strange glitches, tooling issues and minor revisions that need to be worked on.

Is that ok for you?

The reason why I ask for this way of working is that when I am able to contribute Apple Silicon related material, I will know where the changes are that need updating. I think it would be around 10% of the translated content.

LoneyIsError commented 4 years ago

I will try my best. Thank you

LoneyIsError commented 4 years ago

Now I have basically completed the translation work, hut i don't have permission to create a new branch in the project. Can you help me create a new branch,translate-zh. Thank you!

faisalmemon commented 4 years ago

Great progress. I've added you as a collaborator now. Can you create a branch now?

LoneyIsError commented 4 years ago

Not yet。

faisalmemon commented 4 years ago

I've noticed that the status of your user account is "pending invitation" which means you need to "accept" my invitation for you to join the project as a "collaborator". This will unlock your privileges.

An alternative way to do it is to fork my repository and then raise a Pull Request. See https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/creating-an-issue-or-pull-request

faisalmemon commented 4 years ago

I've merged your pull request. There is only one problem. When I generate the pdf version of the document in Chinese, the document processing system, latex, has a problem with the character 。which is unicode character (U+3002). This stops it creating a pdf file.

I did an experiment by replacing it with the period character . but it just reveals other problem characters such as 留 (U+7559) so I think the problem is that the typesetting system does not understand Chinese ideographs correctly.

Do you know anything about this topic? If not, we'll need to settle for the Chinese language version to just be a HTML version of the document.

The final Chinese Language edition, in html format, is

LoneyIsError commented 4 years ago

I don't have any ideas about this problem. I'm so sorry about that. How About unicode character “。” (U+FF61) instead. Thank you for writing this book,I can't wait to see its new version.

faisalmemon commented 4 years ago

Unfortunately, U+FF61 also causes the same problem.

I used commands such as the following from the markdow/zh directory: sed -i -e 's/ 。/。/g' *.md to modify and experiment with the translated text, and from the top level directory, used the ./buildBook.sh -l zh command to build the book in Chinese, and observe the errors.

I think the most effective way forward is to leave this bug, progress with the second edition version of the book, and then re-visit it later. Maybe different latex tools need to be used, or maybe the inputenc module within it can be patched.

I don't know the Kindle book situation in China, but I think most readers will come to the Web page version which is working correctly.

My errors are such as

➜  ios-crash-dump-analysis-book git:(bug/period-character-1) ✗ ./buildBook.sh -l zh
Usages of you in the narrative
..........................................
Processing foo.zh.html
Processing boo.zh.latex
Indexing pass 0
Indexing pass 1
Indexing pass 2
Check for errors
boo.zh.pass.0.log:119:! Package inputenc Error: Unicode character 。 (U+FF61)
boo.zh.pass.0.log:134:!  ==> Fatal error occurred, no output PDF file produced!
boo.zh.pass.1.log:119:! Package inputenc Error: Unicode character 。 (U+FF61)
boo.zh.pass.1.log:134:!  ==> Fatal error occurred, no output PDF file produced!
boo.zh.pass.2.log:119:! Package inputenc Error: Unicode character 。 (U+FF61)
boo.zh.pass.2.log:134:!  ==> Fatal error occurred, no output PDF file produced!
faisalmemon commented 4 years ago

For the second edition, I wanted to acknowledge your contribution as translating the work (since technically the first edition should maintain the same text), in the section "Acknowledgements". Would you be happy in having an acknowledgement. If so, how would you like to be referred to? E.g. just as xia, or a latin characters based name, or a Chinese characters based name, etc. Of course, if you don't want to be acknowledged in that manner, I can leave that off. It is up to you, but I do recognise you have made a valuable contribution and wanted to say thank you.

LoneyIsError commented 4 years ago

For the second edition, I think I can continue to translate. Compared with your contribution, I don't spend much time. But if I could see the second edition of this book at the first time, it would be enough for me. Still have to express my gratitude. Thank you.If I have this honor, I hope my name is 夏文强

faisalmemon commented 4 years ago

Great - thanks! I've made progress on the second edition, I've done the new material, and I am now sweeping through the entire book to check for correctness/consistency. When the first Apple Silicon Mac is released, I will need to repeat this for the latest SDK and will move my work onto a public branch. I think about 20% of the book is newly revised. Then you can look to update the zh/ directory. I have some typesetting issues:

  1. Chinese characters break pdf generation, and
  2. latex text in my bibliography.

I'll include you as an acknowledgement in the second edition as soon as I fix the typesetting problem. When I introduce your name to the text, I get: boo.en.pass.0.log:119:! Package inputenc Error: Unicode character 夏 (U+590F) If I can't fix that, I'll place an acknowledgement on the back cover of the book instead.

I plan on using this week for updates to the book, and next week to fix typesetting problems and do cover art, metadata etc.

My plans are subject to Apple Special event information which arise this quarter as I need to track the state-of-the-art and adjust accordingly.

faisalmemon commented 4 years ago

There is an interesting research paper that might help with the problem: https://ctan.math.illinois.edu/macros/latex/contrib/newunicodechar/newunicodechar.pdf

because it provides a narrative about DeclareUnicodeCharacter

In my logs I have:

l.208 translator, 夏
                     文强, for providing the Chinese language version; a g...

?
! Emergency stop.
 ...

l.208 translator, 夏
                     文强, for providing the Chinese language version; a g...

You may provide a definition with
\DeclareUnicodeCharacter
LoneyIsError commented 4 years ago

Can also be called like XiaWenqiang. Now I am proofreading my previous translations for a more accurate and smooth expression. Then do some supplementary learning according to the book.I am looking forward to your work and I will pay my respect.

faisalmemon commented 4 years ago

The latest progress is that the book content is done. I need to work on the book artwork, front and back cover text, and the metadata. I checked my legal agreements, and it seems I need to wait for the Apple Silicon Macs to be released. Based on current rumours and the USA public holidays and other major events, I think mid-November 2020 is when I'll be able to pull in the second edition changes into this repository. It will be about 240 commits.

faisalmemon commented 3 years ago

I've done the book artwork, front and back cover and metadata. The upload candidate does not have any errors. I just need to await the first Apple Silicon product and keep up to date with the latest betas and golden master in case there are any significant changes in those builds, or new scenarios for crash dumps. E.g. seeing an iOS app crash on Apple Silicon would be interesting. So there is always the possibility of a further chapter.

LoneyIsError commented 3 years ago

I'm glad to know it's going so well. Analysis the first Apple Silicon product can make us more in-depth and more effective. Discuss about iOS crashes on the new system version is a talented idea. Thank you for your effort.

faisalmemon commented 3 years ago

I've now pushed onto this repository all my changes for the second edition. Some pages are modernised, slightly re-worded for clarity, and there are a few new chapters. It is best to use git and your preferred diff tool to find the changes I've made. For missing Chinese files, it places the English file instead into the book. So for new content, it is easy to spot. For modified content, a look at the revision history is needed.

I have uploaded the content into Amazon Direct Publishing for a second edition print and e-book. That is currently "in review" and I hope not to have to make any textual changes before publication.

I hope that's all good for you. As your personal time permits, please can you now work on the translation and raise any pull requests as a consequence. Many thanks!

LoneyIsError commented 3 years ago

I will finish the translation as soon as possible.

faisalmemon commented 3 years ago

I've merged in the pull request for translating the second edition. It is now live! Further updates can come in as you may desire if you want to enhance the wording of the translation, but for now I think we're done. Great job!

I sent out a tweet for those the are following the progress: https://twitter.com/faisalmemon/status/1335529172127637504?s=20