[swift-dev] Putting Swift Programming Language Book under Git version control
blanier at apple.com
Fri Jan 8 16:02:56 CST 2016
Thanks for the great feedback and comments.
We’d like to help with this, but we have to work out some internal tooling challenges first. For right now, you can use the ePub version on swift.org <http://swift.org/> to generate a diff between versions of the book: Unzip the ePub file and diff the directory of HTML files. As for the original source material, it currently depends on proprietary tools that don’t make sense to publish externally. It appears that you’ve already looked at the Chinese translation project on GitHub; we think this is nice model to follow for now.
> On Dec 17, 2015, at 4:54 AM, Tim Bodeit <swift-dev at timbodeit.de> wrote:
> I just saw Chris Lattners tweet about the translation section of the Swift Documentation page <https://swift.org/documentation/>.
> The idea to encourage community driven translations into other languages is great.
> But getting multiple people to collaborate on a single translation language requires some sort of collaboration platform.
> For the Chinese translation this is GitHub. It’s only natural to follow this example for other languages. We’re developers after all and GitHub is where the rest of the Swift project is hosted.
> I’d recommend pushing the English ebook to GitHub as well.
> Think about future releases of Swift. As the language evolves, so will the book.
> The only way the maintainer of a translation can accommodate these changes, is if he knows what they are.
> For a German translation, I’d include a file with the latest commit hash (or submodule reference) of the english book repo that my translation is based on.
> Then when the English version is updated, all I need to do is to diff its current master against the commit hash. This will allow me to see if any of the changes are relevant to my translation.
> When there is a git repo for the base language that can be forked as a starting point, this also encourages people to keep the original structure intact. Translations would also result in an epub file with the same style and format as the original. This would give them a more uniform look and allows for a central list that offers epub downloads for the various languages. People could also more easily jump between the english and their native language version of the book.
> A benefit on the side: Why not accept community contributions on the English version of the book as well?
> However, using git is not the only thing to take away from the Chinese translation project:
> They converted everything to Markdown. Having a format that is easy to edit directly, and more importantly very easy to diff, is key to making community-based translations a success.
> ePubs just being a zip file of html files are not a bad format, but something like Pandoc (http://pandoc.org/epub.html) would be better in my opinion.
> What tool did Apple use internally to make the book? Do you have any other source files that you could provide?
> Otherwise, just dumping the unzipped epub to GitHub would already help a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-dev