1 sphinx-i18n T HE T RUE S TORY robertlehmann.de Development Processes in Open Source Projects.

Slides:



Advertisements
Similar presentations
3rd Annual Plex/2E Worldwide Users Conference 13A Batch Processing in 2E Jeffrey A. Welsh, STAR BASE Consulting, Inc. September 20, 2007.
Advertisements

Feichter_DPG-SYKL03_Bild-01. Feichter_DPG-SYKL03_Bild-02.
1 Roger L. Costello 16 June 2010 XQuery
1 Copyright © 2002 Pearson Education, Inc.. 2 Chapter 2 Getting Started.
Chapter 7 System Models.
Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Cheryl M. Hughes, Harvard University Extension School Cambridge, MA The Web Wizards Guide.
Copyright © 2003 Pearson Education, Inc. Slide 8-1 Created by Cheryl M. Hughes, Harvard University Extension School Cambridge, MA The Web Wizards Guide.
Chapter 7 Constructors and Other Tools. Copyright © 2006 Pearson Addison-Wesley. All rights reserved. 7-2 Learning Objectives Constructors Definitions.
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Chapter 1 The Study of Body Function Image PowerPoint
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 3 CPUs.
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
UNITED NATIONS Shipment Details Report – January 2006.
8 Copyright © 2005, Oracle. All rights reserved. Creating the Web Tier: JavaServer Pages.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Process a Customer Chapter 2. Process a Customer 2-2 Objectives Understand what defines a Customer Learn how to check for an existing Customer Learn how.
Chapter 6 File Systems 6.1 Files 6.2 Directories
Programming Language Concepts
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
Excel Functions. Part 1. Introduction 2 An Excel function is a formula or a procedure that is performed in the Visual Basic environment, outside the.
New Silent Knight Buyer SAP Based e-commerce. 2HONEYWELL - CONFIDENTIAL File Number 2HONEYWELL - CONFIDENTIAL File Number Agenda E-commerce training resources.
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
Intel VTune Yukai Hong Department of Mathematics National Taiwan University July 24, 2008.
Configuration management
13 Copyright © 2005, Oracle. All rights reserved. Monitoring and Improving Performance.
Chapter 24 Lists, Stacks, and Queues
Modern Programming Languages, 2nd ed.
Chapter 1 Object Oriented Programming 1. OOP revolves around the concept of an objects. Objects are created using the class definition. Programming techniques.
EU market situation for eggs and poultry Management Committee 20 October 2011.
EU Market Situation for Eggs and Poultry Management Committee 21 June 2012.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 12 – Security Panel Application Introducing.
2 |SharePoint Saturday New York City
1 What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language A scripting language is a lightweight.
Operating Systems Operating Systems - Winter 2011 Dr. Melanie Rieback Design and Implementation.
Operating Systems Operating Systems - Winter 2012 Dr. Melanie Rieback Design and Implementation.
VOORBLAD.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
1 Displaying Open Purchase Orders (F/Y 11). 2  At the end of this course, you should be able to: –Run a Location specific report of all Open Purchase.
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
© 2012 National Heart Foundation of Australia. Slide 2.
Services Course Windows Live SkyDrive Participant Guide.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
1 BRState Software Demonstration. 2 After you click on the LDEQ link to download the BRState Software you will get this message.
Model and Relationships 6 M 1 M M M M M M M M M M M M M M M M
Analyzing Genes and Genomes
Chapter 9 Interactive Multimedia Authoring with Flash Introduction to Programming 1.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Intracellular Compartments and Transport
PSSA Preparation.
Essential Cell Biology
Immunobiology: The Immune System in Health & Disease Sixth Edition
Energy Generation in Mitochondria and Chlorplasts
1 Atlas Copco Distribution Center DS Connect User’s Guide This document is uncontrolled if viewed or printed outside the IMS.
Steffen Staab 1WeST Web Science & Technologies University of Koblenz ▪ Landau, Germany Structured Data on the Web Introduction to.
User Defined Functions Lesson 1 CS1313 Fall User Defined Functions 1 Outline 1.User Defined Functions 1 Outline 2.Standard Library Not Enough #1.
User Friendly Item Relationship Maintenance A Family of Enhancements For iSeries 400 DMAS from  Copyright I/O International, 2006, 2007, 2008, 2010 Skip.
What’s new in WebSpace Changes and improvements with Xythos 7.2 Effective June 24,

Presentation transcript:

1 sphinx-i18n T HE T RUE S TORY robertlehmann.de Development Processes in Open Source Projects

\documentclass{manual}\usepackage[T1]{fontenc}\usepackage{textcomp}\ title{PythonTutorial}\input{boilerplate}\makeindex\begin{document}\make title\ifhtml\chapter*{FrontMatter\label{front}}\fi\input{copyright}\begin{a bstract}\noindent For a description of standard objects and modules, see the \citetitle[../lib/lib.html]{Python Library Reference} document. The \citetitle[../ref/ref.html]{Python Reference Manual} gives a more formal definition of the language. To write extensions in C or \Cpp, read \citetitle[../ext/ext.html]{Extending and Embedding the Python Interpreter} and \citetitle[../api/api.html]{Python/C API Reference}. There are also several books covering Python in depth. \end{abstract} \tableofcontents \chapter{Whetting Your Appetite \label{intro}} Python enables programs to be written compactly and readably. Programs written in Python are typically much shorter than equivalent C, \Cpp{}, or Java programs, for several reasons:\begin{itemize}\item the high-level data types allow you to express complex operations in a single statement;\item statement grouping is done by indentation;\item no variable or argument declarations are necessary.\end{itemize} On Windows machines, the Python installation is usually placed in \file{C:\e Python24}, though you can change this when you're running the installer: \begin{verbatim} set path=%path%; C:\python24\end{verbatim}\begin{seealso}\seetitle[../lib/typesseq.html]{S equence Types}%{Strings, and the Unicode strings described in the next section, are examples of \emph{sequence types}, and support the common operations supported by such types.}\end{seealso}\subsection{Unicode Strings \label{unicodeStrings}}\sectionauthor{Marc-Andre lemburg.com}\begin{methoddesc}[list]{pop}{\optional{i}}If no index is specified, \code{a.pop()} removes and returns the last item in the list. You will see this notation frequently in the \citetitle[../lib/lib.html]{Python Library Reference}.)\end{methoddesc} Everbody hates it with a passion. 2

TO THE RESCUE ! Sphinx Docutils gettext Issue #653 GSoC ReST 3

implemented June 2007 implemented June 2007 as py-rest-doc for Docutils as py-rest-doc for Docutils live August 2007 live August 2007 on docs.python.org on docs.python.org released March 2008 released March 2008 as Sphinx as Sphinx 1.0 in July in July in January in January 2011 latest stable release latest stable release 3290 commits [as of 2011/05/15] BSD license requires attribution 4

tutorial.rst "reST" is **ONE** word, *not two!* tutorial "reST" is ONE word, not two! 5 Check out for details!

math rendering tutorial.rst "reST" is **ONE** word, *not two!* tutorial.pdftutorial.htmltutorial.textutorial.1.gztutorial.epub... indices Hierarchical structure: easy definition of a document tree, with automatic links to siblings, parents and children syntax highlighting doctests markup domains search feedback i18n themes autodoc 6

Georgbirkenfeld Brandl 2004: Pocoo project the makers of Werkzeug, Pygments, Jinja, … 2008: PSF Community Award 2011: Frank Willison Award 205k churns [as of 2011/06/27] 2500 commits thats changed LOCs without bfb5b73af019, e88201ce226b, and 2d7e85e0c7b4, which imported the Python docs 7

…and about 70 others! 8

Whos using it All logos and trademarks are © Copyright their respective owners. 9

Github for Mercurial bitbucket.org/birkenfeld/sphinx 10

sphinx-dev mailing list groups.google.com/groups/sphinx-dev 11

© 2010 Google Open Source Programs Office gsoc.robertlehmann.de 12

© 2010 Google Open Source Programs Office gsoc.robertlehmann.de 13 umbrella organisation

14 © 2010 Google Open Source Programs Office,

pootle.python.org 15 Sphinx Native Language Support: Toolchain for Creating, Tracking and Viewing Internationalized Versions of Sphinx Documents

? but what is this internationalization you are talking about cool story, bro. enter gettext! 16

0106 #include gettext dfa.c - deterministic extended regexp routines for GNU 2954 char *lcopy = malloc(len); 2955 if (!lcopy) 2956 dfaerror("out of memory"); 2954 char *lcopy = malloc(len); 2955 if (!lcopy) 2956 dfaerror(_("out of memory")); ftp://mirrors.kernel.org/gnu/grep/grep tar.bz2 gettext (3) usually aliased as _ 17

#: src/dfa.c:2956 msgid "out of memory" msgstr "" 2954 char *lcopy = malloc(len); 2955 if (!lcopy) 2956 dfaerror(_("out of memory")); gettext grep.pot dfa.c 18

gettext #: src/dfa.c:2956 msgid "out of memory" msgstr "" "Speicher ist alle." msginit grep.po 19

grep.mo gettext #: src/dfa.c:2956 msgid "out of memory" msgstr "Speicher ist alle." 20 grep.po

1346 #if defined(ENABLE_NLS) 1347 bindtextdomain("grep", "/usr/share/locale") 1348 textdomain("grep"); 1349 #endif grep.mo gettext grep.c /usr/share/locale/de/LC_MESSAGES/grep.mo LANG=de bindtextdomain(3) – set directory containing message catalogs textdomain(3) – set domain for gettext() calls 21

Cool. What else? *gasp* internationalization is hard, lets go shopping 22

gettext #: src/grep.c:874 #, c-format msgid "Binary file: %s matches\n" msgstr "" "Übereinstimmungen in Binärdatei %s\n" if (not_text) 874 printf (_("Binary file %s matches\n"), 875 filename); grep.c – main driver file for grep interpolation 23

gettext Plural-Forms: nplurals=2; plural=n!=1 msgid "There is %s file" msgid_plural "There are %s files" msgstr[0] "Hay %s fichero" msgstr[1] "Hay %s ficheros" 219 x = ngettext("There is %s file", 220 "There are %s files", n) test_gettext.py, CPython plural forms 24

gettext #. --option #: lib/getopt.c:752 msgid "unrecognized option\n" msgstr "" 751 /* --option */ 752 printf(_("unrecognized option\n")); lib/getopt.c comments 25

how does it work in Sphinx? awesome! but… enter sphinx-i18n 26

replaces libintl.h replaces xgettext 27

Shirou Wakayama actually tried to i18n the Sphinx d.hatena.ne.jp/rudi/ /

29 messages are scrambled (sorry, my Japanese is horrible)

Ian PyConMini.JP slideshare.net/Ianmlewis/Sphinx-11-I18N 30

you are doing it wrong ? 31

32

Pull Weve just fixed a problem in the gettext builder. Pull I'd like to create patch for Internationalization feature for 1.1. Pull Hello, I write the gettext builder patch. Please check and merge if fair enough. Pull I hereby encourage you to pull some changes in my fork of sphinx. You can find my changes on the i18n- generate-valid-pot branch. messages snipped 33

all work has already been done! lets call it a day not quite: the dreaded merge 34

35 release the kraken octomerge of sorts literally 8 different sources!

36 merged by Georg

Georg Brandl 37 cower, mere mortals here comes the merge resolver

Im that stargaming guy. thanks. questions? #pocoo on Freenode sphinx.pocoo.org 38