1. Yuya Nishihara
  2. thg-qt-mq

Commits

Yuya Nishihara  committed 56fb901

gettext-based translation of doc

  • Participants
  • Parent commits 68c4ff7
  • Branches default

Comments (0)

Files changed (11)

File docbuildtrans.diff

View file
+# HG changeset patch
+# Parent f4f06dc24291830b114d80823340d5174c1f6dfb
+doc: add settings and rule to build translated documents
+
+diff --git a/doc/Makefile b/doc/Makefile
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -21,6 +21,17 @@ ALLSPHINXOPTS   = -d $(BUILDDIR)/doctree
+ # the i18n builder cannot share the environment and doctrees with the others
+ I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+ 
++ifeq ($(LANGUAGE),en)
++override LANGUAGE =
++endif
++
++ifneq ($(LANGUAGE),)
++BUILDDIR      = build-$(LANGUAGE)
++SPHINXOPTS   += -D language=$(LANGUAGE) -D needs_sphinx=1.1
++# force rebuild because Sphinx 1.1.x cannot detect translation changes
++SPHINXOPTS   += -a
++endif
++
+ .PHONY: help clean html pickle htmlhelp qthelp qhc latex changes linkcheck \
+ 	gettext update-po build-mo
+ 
+@@ -38,6 +49,8 @@ help:
+ 	@echo "  build-mo  to compile message catalogs"
+ 	@echo "  changes   to make an overview of all changed/added/deprecated items"
+ 	@echo "  linkcheck to check all external links for integrity"
++	@echo
++	@echo "To build translation, specify \`make <target> LANGUAGE=<language>'"
+ 
+ clean:
+ 	-rm -rf $(BUILDDIR)/*
+@@ -121,6 +134,10 @@ build-mo:
+ 		| sed 's|^\./\([^.]*\)\.po$$|locale/$(LANGUAGE)/LC_MESSAGES/\1.mo|' \
+ 		| xargs $(MAKE) --no-print-directory
+ 
++ifneq ($(LANGUAGE),)
++html pickle json htmlhelp qthelp latex: build-mo
++endif
++
+ changes:
+ 	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ 	@echo
+diff --git a/doc/source/conf.py b/doc/source/conf.py
+--- a/doc/source/conf.py
++++ b/doc/source/conf.py
+@@ -86,6 +86,9 @@ pygments_style = 'sphinx'
+ # A list of ignored prefixes for module index sorting.
+ #modindex_common_prefix = []
+ 
++# A list of directories containing compiled message catalogs.
++locale_dirs = ['../locale']
++
+ 
+ # -- Options for HTML output ---------------------------------------------------
+ 

File docconf-sync.diff

View file
+# HG changeset patch
+# Parent 47c4fb0964a38599e5db62935afe2e595e3202aa
+doc: merge up-to-date conf.py generated by sphinx-quickstart
+
+diff --git a/doc/source/conf.py b/doc/source/conf.py
+--- a/doc/source/conf.py
++++ b/doc/source/conf.py
+@@ -5,9 +5,6 @@
+ #
+ # This file is execfile()d with the current directory set to its containing dir.
+ #
+-# The contents of this file are pickled, so don't put values in the namespace
+-# that aren't pickleable (module imports are okay, they're removed automatically).
+-#
+ # Note that not all possible configuration values are present in this
+ # autogenerated file.
+ #
+@@ -16,26 +13,28 @@
+ 
+ import sys, os
+ 
+-# If your extensions (or modules documented by autodoc) are in another directory,
++# If extensions (or modules to document with autodoc) are in another directory,
+ # add these directories to sys.path here. If the directory is relative to the
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
+-#sys.path.append(os.path.abspath('.'))
++#sys.path.insert(0, os.path.abspath('.'))
+ 
+-# General configuration
+-# ---------------------
++# -- General configuration -----------------------------------------------------
++
++# If your documentation needs a minimal Sphinx version, state it here.
++#needs_sphinx = '1.0'
+ 
+ # Add any Sphinx extension module names here, as strings. They can be extensions
+ # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+ extensions = ['sphinx.ext.autodoc']
+ 
+ # Add any paths that contain templates here, relative to this directory.
+-templates_path = ['.templates']
++templates_path = ['_templates']
+ 
+ # The suffix of source filenames.
+ source_suffix = '.txt'
+ 
+ # The encoding of source files.
+-#source_encoding = 'utf-8'
++#source_encoding = 'utf-8-sig'
+ 
+ # The master toctree document.
+ master_doc = 'index'
+@@ -63,12 +62,9 @@ release = '2.5.0'
+ # Else, today_fmt is used as the format for a strftime call.
+ #today_fmt = '%B %d, %Y'
+ 
+-# List of documents that shouldn't be included in the build.
+-#unused_docs = []
+-
+-# List of directories, relative to source directory, that shouldn't be searched
+-# for source files.
+-exclude_trees = []
++# List of patterns, relative to source directory, that match files and
++# directories to ignore when looking for source files.
++exclude_patterns = []
+ 
+ # The reST default role (used for this markup: `text`) to use for all documents.
+ #default_role = None
+@@ -87,14 +83,23 @@ exclude_trees = []
+ # The name of the Pygments (syntax highlighting) style to use.
+ pygments_style = 'sphinx'
+ 
++# A list of ignored prefixes for module index sorting.
++#modindex_common_prefix = []
+ 
+-# Options for HTML output
+-# -----------------------
+ 
+-# The style sheet to use for HTML and HTML Help pages. A file of that name
+-# must exist either in Sphinx' static/ path, or in one of the custom paths
+-# given in html_static_path.
+-html_style = 'default.css'
++# -- Options for HTML output ---------------------------------------------------
++
++# The theme to use for HTML and HTML Help pages.  See the documentation for
++# a list of builtin themes.
++html_theme = 'default'
++
++# Theme options are theme-specific and customize the look and feel of a theme
++# further.  For a list of options available for each theme, see the
++# documentation.
++#html_theme_options = {}
++
++# Add any paths that contain custom themes here, relative to this directory.
++#html_theme_path = []
+ 
+ # The name for this set of Sphinx documents.  If None, it defaults to
+ # "<project> v<release> documentation".
+@@ -115,7 +120,7 @@ html_logo = 'figures/thg_logo_92x50.png'
+ # Add any paths that contain custom static files (such as style sheets) here,
+ # relative to this directory. They are copied after the builtin static files,
+ # so a file named "default.css" will overwrite the builtin "default.css".
+-html_static_path = ['.static']
++html_static_path = ['_static']
+ 
+ # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+ # using the given strftime format.
+@@ -133,7 +138,7 @@ html_static_path = ['.static']
+ #html_additional_pages = {}
+ 
+ # If false, no module index is generated.
+-#html_use_modindex = True
++#html_domain_indices = True
+ 
+ # If false, no index is generated.
+ #html_use_index = True
+@@ -141,35 +146,45 @@ html_static_path = ['.static']
+ # If true, the index is split into individual pages for each letter.
+ #html_split_index = False
+ 
+-# If true, the reST sources are included in the HTML build as _sources/<name>.
+-#html_copy_source = True
++# If true, links to the reST sources are added to the pages.
++#html_show_sourcelink = True
++
++# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
++#html_show_sphinx = True
++
++# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
++#html_show_copyright = True
+ 
+ # If true, an OpenSearch description file will be output, and all pages will
+ # contain a <link> tag referring to it.  The value of this option must be the
+ # base URL from which the finished HTML is served.
+ #html_use_opensearch = ''
+ 
+-# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
+-#html_file_suffix = ''
++# This is the file name suffix for HTML files (e.g. ".xhtml").
++#html_file_suffix = None
+ 
+ # Output file base name for HTML help builder.
+ htmlhelp_basename = 'TortoiseHg'
+ 
+ 
+-# Options for LaTeX output
+-# ------------------------
++# -- Options for LaTeX output --------------------------------------------------
+ 
+-# The paper size ('letter' or 'a4').
+-#latex_paper_size = 'letter'
++latex_elements = {
++# The paper size ('letterpaper' or 'a4paper').
++#'papersize': 'letterpaper',
+ 
+ # The font size ('10pt', '11pt' or '12pt').
+-#latex_font_size = '10pt'
++#'pointsize': '10pt',
++
++# Additional stuff for the LaTeX preamble.
++#'preamble': '',
++}
+ 
+ # Grouping the document tree into LaTeX files. List of tuples
+ # (source start file, target name, title, author, document class [howto/manual]).
+ latex_documents = [
+   ('index', 'TortoiseHg.tex', ur'TortoiseHg Documentation',
+-   ur'Steve Borho and others', 'manual'),
++   u'Steve Borho and others', 'manual'),
+ ]
+ 
+ # The name of an image file (relative to this directory) to place at the top of
+@@ -180,11 +195,48 @@ latex_logo = 'figures/thg_logo_pdf.png'
+ # not chapters.
+ #latex_use_parts = False
+ 
+-# Additional stuff for the LaTeX preamble.
+-#latex_preamble = ''
++# If true, show page references after internal links.
++#latex_show_pagerefs = False
++
++# If true, show URL addresses after external links.
++#latex_show_urls = False
+ 
+ # Documents to append as an appendix to all manuals.
+-#latex_appendices = ['faq']
++#latex_appendices = []
+ 
+ # If false, no module index is generated.
+-#latex_use_modindex = True
++#latex_domain_indices = True
++
++
++# -- Options for manual page output --------------------------------------------
++
++# One entry per manual page. List of tuples
++# (source start file, name, description, authors, manual section).
++man_pages = [
++    ('index', 'tortoisehg', u'TortoiseHg Documentation',
++     [u'Steve Borho and others'], 1)
++]
++
++# If true, show URL addresses after external links.
++#man_show_urls = False
++
++
++# -- Options for Texinfo output ------------------------------------------------
++
++# Grouping the document tree into Texinfo files. List of tuples
++# (source start file, target name, title, author,
++#  dir menu entry, description, category)
++texinfo_documents = [
++  ('index', 'TortoiseHg', u'TortoiseHg Documentation',
++   u'Steve Borho and others', 'TortoiseHg', 'One line description of project.',
++   'Miscellaneous'),
++]
++
++# Documents to append as an appendix to all manuals.
++#texinfo_appendices = []
++
++# If false, no module index is generated.
++#texinfo_domain_indices = True
++
++# How to display URL addresses: 'footnote', 'no', or 'inline'.
++#texinfo_show_urls = 'footnote'

File docdiff-base.diff

-# HG changeset patch
-# Date 1346680648 -32400
-# Parent f23bf9738240c16fd709e8167761fa1210f7c643
-docdiff: don't clobber 'base' argument (fixes #2076)
-
-f5ff1858e79e changed to overwrite 'base' by basename of 'output' argument,
-which is unwanted side effect, I guess.
-
-diff --git a/win32/docdiff.py b/win32/docdiff.py
---- a/win32/docdiff.py
-+++ b/win32/docdiff.py
-@@ -56,10 +56,10 @@ def main():
-         sys.exit(1)
-     elif len(args) == 2:
-         local, other = [os.path.abspath(f) for f in args]
--        base, ext = os.path.splitext(local)
-+        _base, ext = os.path.splitext(local)
-     else:
-         local, base, other, output = [os.path.abspath(f) for f in args]
--        base, ext = os.path.splitext(output)
-+        _base, ext = os.path.splitext(output)
- 
-     if not ext or ext.lower()[1:] not in scripts.keys():
-         print 'Unsupported file type', ext

File docmake-gettext.diff

View file
+# HG changeset patch
+# Parent ae02250f030268a0fa47dcaf027861f1e1b60ac1
+doc: add rule to build gettext .pot generated by sphinx-quickstart
+
+diff --git a/doc/Makefile b/doc/Makefile
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -13,8 +13,10 @@ QCOLLECTIONGENERATOR = qcollectiongenera
+ PAPEROPT_a4     = -D latex_paper_size=a4
+ PAPEROPT_letter = -D latex_paper_size=letter
+ ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
++# the i18n builder cannot share the environment and doctrees with the others
++I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+ 
+-.PHONY: help clean html pickle htmlhelp qthelp qhc latex changes linkcheck
++.PHONY: help clean html pickle htmlhelp qthelp qhc latex changes linkcheck gettext
+ 
+ help:
+ 	@echo "Please use \`make <target>' where <target> is one of"
+@@ -25,6 +27,7 @@ help:
+ 	@echo "  qthelp    to make HTML files and a qthelp project"
+ 	@echo "  qhc       to make QHC file"
+ 	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
++	@echo "  gettext   to make PO message catalogs"
+ 	@echo "  changes   to make an overview of all changed/added/deprecated items"
+ 	@echo "  linkcheck to check all external links for integrity"
+ 
+@@ -75,6 +78,11 @@ latex:
+ 	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ 	@echo "Run \`make' in that directory to run these through (pdf)latex"
+ 
++gettext:
++	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
++	@echo
++	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
++
+ changes:
+ 	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ 	@echo

File docmake-sync.diff

View file
+# HG changeset patch
+# Parent 7ea1ea5aa43f42c91e632cb18c619a0a49c06fd1
+doc: merge up-to-date Makefile generated by sphinx-quickstart
+
+- introduce BUILDDIR variable
+- remove redundant mkdir
+- remove alias 'web'
+
+diff --git a/doc/Makefile b/doc/Makefile
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -5,15 +5,16 @@
+ SPHINXOPTS    =
+ SPHINXBUILD   = sphinx-build
+ PAPER         =
++BUILDDIR      = build
+ 
+ QCOLLECTIONGENERATOR = qcollectiongenerator
+ 
+ # Internal variables.
+ PAPEROPT_a4     = -D latex_paper_size=a4
+ PAPEROPT_letter = -D latex_paper_size=letter
+-ALLSPHINXOPTS   = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
++ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+ 
+-.PHONY: help clean html web pickle htmlhelp qthelp qhc latex changes linkcheck
++.PHONY: help clean html pickle htmlhelp qthelp qhc latex changes linkcheck
+ 
+ help:
+ 	@echo "Please use \`make <target>' where <target> is one of"
+@@ -24,74 +25,63 @@ help:
+ 	@echo "  qthelp    to make HTML files and a qthelp project"
+ 	@echo "  qhc       to make QHC file"
+ 	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+-	@echo "  changes   to make an overview over all changed/added/deprecated items"
++	@echo "  changes   to make an overview of all changed/added/deprecated items"
+ 	@echo "  linkcheck to check all external links for integrity"
+ 
+ clean:
+-	-rm -rf build/*
++	-rm -rf $(BUILDDIR)/*
+ 
+ html:
+-	mkdir -p build/html build/doctrees
+-	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
++	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ 	@echo
+-	@echo "Build finished. The HTML pages are in build/html."
++	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+ 
+ zip: html
+-	(cd build ; zip TortoiseHg.html.zip -r html)
++	(cd $(BUILDDIR) ; zip TortoiseHg.html.zip -r html)
+ 
+ pickle:
+-	mkdir -p build/pickle build/doctrees
+-	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
++	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ 	@echo
+ 	@echo "Build finished; now you can process the pickle files."
+ 
+-web: pickle
+-
+ json:
+-	mkdir -p build/json build/doctrees
+-	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) build/json
++	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ 	@echo
+ 	@echo "Build finished; now you can process the JSON files."
+ 
+ htmlhelp:
+-	mkdir -p build/htmlhelp build/doctrees
+-	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
++	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ 	@echo
+ 	@echo "Build finished; now you can run HTML Help Workshop with the" \
+-	      ".hhp project file in build/htmlhelp."
++	      ".hhp project file in $(BUILDDIR)/htmlhelp."
+ 
+ qthelp:
+-	mkdir -p build/qthelp build/doctrees
+-	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) build/qthelp
++	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+ 	@echo
+ 	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+-	      ".qhcp project file in build/qthelp, like this:"
+-	@echo "# qcollectiongenerator build/qthelp/foo.qhcp"
++	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
++	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/TortoiseHg.qhcp"
+ 	@echo "To view the help file:"
+-	@echo "# assistant -collectionFile build/qthelp/foo.qhc"
++	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/TortoiseHg.qhc"
+ 
+ qhc: qthelp
+-	$(QCOLLECTIONGENERATOR) build/qthelp/TortoiseHg.qhcp
++	$(QCOLLECTIONGENERATOR) $(BUILDDIR)/qthelp/TortoiseHg.qhcp
+ 	@echo "Build finished. To view the help file:"
+-	@echo "# assistant -collectionFile build/qthelp/TortoiseHg.qhc"
++	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/TortoiseHg.qhc"
+ 
+ latex:
+-	mkdir -p build/latex build/doctrees
+-	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
++	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ 	@echo
+-	@echo "Build finished; the LaTeX files are in build/latex."
+-	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
+-	      "run these through (pdf)latex."
++	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
++	@echo "Run \`make' in that directory to run these through (pdf)latex"
+ 
+ changes:
+-	mkdir -p build/changes build/doctrees
+-	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
++	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ 	@echo
+-	@echo "The overview file is in build/changes."
++	@echo "The overview file is in $(BUILDDIR)/changes."
+ 
+ linkcheck:
+-	mkdir -p build/linkcheck build/doctrees
+-	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
++	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+ 	@echo
+ 	@echo "Link check complete; look for any errors in the above output " \
+-	      "or in build/linkcheck/output.txt."
++	      "or in $(BUILDDIR)/linkcheck/output.txt."

File docmogene.diff

View file
+# HG changeset patch
+# Parent 7aedcce142ac8ef891aebf8f15e7db9e37a65552
+doc: add make rule to compile translations to .mo files
+
+diff --git a/doc/Makefile b/doc/Makefile
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -8,6 +8,8 @@ LANGUAGE      =
+ PAPER         =
+ BUILDDIR      = build
+ 
++PYTHON        = python
++MSGFMT        = $(PYTHON) ../i18n/msgfmt.py
+ MSGINIT       = msginit
+ MSGMERGE      = msgmerge
+ QCOLLECTIONGENERATOR = qcollectiongenerator
+@@ -20,7 +22,7 @@ ALLSPHINXOPTS   = -d $(BUILDDIR)/doctree
+ I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+ 
+ .PHONY: help clean html pickle htmlhelp qthelp qhc latex changes linkcheck \
+-	gettext update-po
++	gettext update-po build-mo
+ 
+ help:
+ 	@echo "Please use \`make <target>' where <target> is one of"
+@@ -33,6 +35,7 @@ help:
+ 	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ 	@echo "  gettext   to make PO message catalogs"
+ 	@echo "  update-po to create/update PO message catalogs"
++	@echo "  build-mo  to compile message catalogs"
+ 	@echo "  changes   to make an overview of all changed/added/deprecated items"
+ 	@echo "  linkcheck to check all external links for integrity"
+ 
+@@ -106,6 +109,18 @@ update-po:
+ 	@echo
+ 	@echo "Updated; now you can translate i18n/$(LANGUAGE)/*.po."
+ 
++locale/$(LANGUAGE)/LC_MESSAGES/%.mo: i18n/$(LANGUAGE)/%.po
++	@[ -d $(dir $@) ] || mkdir -p $(dir $@)
++	$(MSGFMT) $< -o $@
++
++build-mo:
++	@[ -n '$(LANGUAGE)' ] || { echo 'Please specify LANGUAGE.'; exit 1; }
++	@[ -d i18n/$(LANGUAGE) ] \
++		|| { echo 'No $(LANGUAGE) translation available.'; exit 1; }
++	( cd i18n/$(LANGUAGE) && find . -name '*.po' ) \
++		| sed 's|^\./\([^.]*\)\.po$$|locale/$(LANGUAGE)/LC_MESSAGES/\1.mo|' \
++		| xargs $(MAKE) --no-print-directory
++
+ changes:
+ 	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ 	@echo

File docpogene.diff

View file
+# HG changeset patch
+# Parent 518fa1e3dc275471f571e853b7b9cb946035e7b6
+doc: add make rule to generate .po files for translation
+
+diff --git a/doc/Makefile b/doc/Makefile
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -4,9 +4,12 @@
+ # You can set these variables from the command line.
+ SPHINXOPTS    =
+ SPHINXBUILD   = sphinx-build
++LANGUAGE      =
+ PAPER         =
+ BUILDDIR      = build
+ 
++MSGINIT       = msginit
++MSGMERGE      = msgmerge
+ QCOLLECTIONGENERATOR = qcollectiongenerator
+ 
+ # Internal variables.
+@@ -16,7 +19,8 @@ ALLSPHINXOPTS   = -d $(BUILDDIR)/doctree
+ # the i18n builder cannot share the environment and doctrees with the others
+ I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+ 
+-.PHONY: help clean html pickle htmlhelp qthelp qhc latex changes linkcheck gettext
++.PHONY: help clean html pickle htmlhelp qthelp qhc latex changes linkcheck \
++	gettext update-po
+ 
+ help:
+ 	@echo "Please use \`make <target>' where <target> is one of"
+@@ -28,6 +32,7 @@ help:
+ 	@echo "  qhc       to make QHC file"
+ 	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ 	@echo "  gettext   to make PO message catalogs"
++	@echo "  update-po to create/update PO message catalogs"
+ 	@echo "  changes   to make an overview of all changed/added/deprecated items"
+ 	@echo "  linkcheck to check all external links for integrity"
+ 
+@@ -83,6 +88,24 @@ gettext:
+ 	@echo
+ 	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+ 
++i18n/$(LANGUAGE)/%.po: $(BUILDDIR)/locale/%.pot
++	@[ -d $(dir $@) ] || mkdir -p $(dir $@)
++	if [ -f $@ ]; then \
++		$(MSGMERGE) --update $@ $<; \
++		touch $@; \
++	else \
++		$(MSGINIT) -l $(LANGUAGE) --no-translator -i $< -o $@; \
++	fi
++
++update-po:
++	@[ -n '$(LANGUAGE)' ] || { echo 'Please specify LANGUAGE.'; exit 1; }
++	[ -d $(BUILDDIR)/locale ] || $(MAKE) gettext LANGUAGE=
++	( cd $(BUILDDIR)/locale && find . -name '*.pot' ) \
++		| sed 's|^\./\([^.]*\)\.pot$$|i18n/$(LANGUAGE)/\1.po|' \
++		| xargs $(MAKE) --no-print-directory
++	@echo
++	@echo "Updated; now you can translate i18n/$(LANGUAGE)/*.po."
++
+ changes:
+ 	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ 	@echo

File i18n-revset-tr.diff

View file
+# HG changeset patch
+# Parent 6b9c3a9ffe085a0ba829eeafaa2e71efdc11b6d4
+diff --git a/i18n/tortoisehg/ja.po b/i18n/tortoisehg/ja.po
+--- a/i18n/tortoisehg/ja.po
++++ b/i18n/tortoisehg/ja.po
+@@ -10,15 +10,15 @@ msgstr ""
+ "Project-Id-Version: tortoisehg\n"
+ "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+ "POT-Creation-Date: 2012-08-31 21:38-0300\n"
+-"PO-Revision-Date: 2012-09-06 22:50+0900\n"
++"PO-Revision-Date: 2012-09-07 14:32+0000\n"
+ "Last-Translator: Yuya Nishihara <Unknown>\n"
+ "Language-Team: LANGUAGE <LL@li.org>\n"
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=UTF-8\n"
+ "Content-Transfer-Encoding: 8bit\n"
+ "Plural-Forms: nplurals=1; plural=0;\n"
+-"X-Launchpad-Export-Date: 2012-09-06 13:24+0000\n"
+-"X-Generator: Launchpad (build 15909)\n"
++"X-Launchpad-Export-Date: 2012-09-07 14:38+0000\n"
++"X-Generator: Launchpad (build 15914)\n"
+ 
+ #: TortoiseHgOverlayServer.py:51
+ msgid "TortoiseHg Overlay Icon Server"
+@@ -5263,19 +5263,16 @@ msgstr "ヘッドが閉じています!"
+ 
+ #: tortoisehg/hgqt/revset.py:28
+ msgid "Changesets where username contains string."
+-msgstr "文字列をユーザー名に持つリビジョン群。 合致判定は文字大小を無視。"
++msgstr "ユーザー名に文字列を含むリビジョン群。"
+ 
+ #: tortoisehg/hgqt/revset.py:30
+ msgid ""
+ "Search commit message, user name, and names of changed files for string."
+-msgstr "文字列が、 コミットログ、 ユーザ名、 変更対象ファイル名の、いずれかに合致するリビジョン群。 合致判定は文字大小を無視。"
++msgstr "コミットログ、ユーザ名、修正ファイルの名前を文字列で検索。"
+ 
+ #: tortoisehg/hgqt/revset.py:33
+ msgid "Like \"keyword(string)\" but accepts a regex."
+-msgstr ""
+-"\"keyword(string)\" と同等ですが、正規表現を使用できます。\"grep(r'...')\"形式の場合、 "
+-"特殊文字もそのまま適用されます。 (※ 訳注: 接頭辞 'r'の使用は、バックスラッシュ等を含めて、文字列をそのまま使用する場合のPython "
+-"式の記法です) \"keyword(string)\"と異なり、文字大小は無視されません。"
++msgstr "\"keyword(string)\" と同じ内容を正規表現で検索。"
+ 
+ #: tortoisehg/hgqt/revset.py:35
+ msgid ""
+@@ -5312,8 +5309,8 @@ msgid ""
+ "Changesets within the interval, see <a "
+ "href=\"http://www.selenic.com/mercurial/hg.1.html#dates\">help dates</a>"
+ msgstr ""
+-"指定期間中のリビジョン群。期間指定の詳細は <a "
+-"href=\"http://www.selenic.com/mercurial/hg.1.html#dates\">こちら</a> を参照。"
++"指定期間中のリビジョン群。 <a "
++"href=\"http://www.selenic.com/mercurial/hg.1.html#dates\">期間指定の詳細</a>"
+ 
+ #: tortoisehg/hgqt/revset.py:53
+ msgid "Greatest common ancestor of the two changesets."
+@@ -5323,16 +5320,7 @@ msgstr "2つのリビジョンに共通�
+ msgid ""
+ "Find revisions that \"match\" one or more fields of the given set of "
+ "revisions."
+-msgstr ""
+-"指定リビジョン群 (revision) と、指定項目 (field) 値が同一な、リビジョンの抽出 (※ 訳注: \"and\" "
+-"結合等での抽出元指定が無い場合、全リビジョンが抽出元になります)。複数項目の合致判定は、対象項目を空白区切りで指定します (例: 'author "
+-"description')。リビジョンの一般的な項目以外に、特別な項目も指定できます。一般的な項目には、\"description\"、 "
+-"\"author\"、 \"branch\"、 \"date\"、 \"files\"、 \"phase\"、 \"parents\"、 "
+-"\"substate\" および \"user\" があります。\"author\" と \"user\" は同一項目です。特殊項目には "
+-"\"summary\" および \"metadata\" があります: \"summary\" は\"description\" の1行目に相当します。 "
+-"\"metadata\" は \"description user date\" との合致に相当します "
+-"(この名称は、「主なメタデータ項目との合致」判定に由来します)フィールド指定が無い場合、 \"metadata\" "
+-"フィールドが対象となります。同時に複数フィールドの合致判定が可能です。"
++msgstr "指定リビジョン群とフィールドの値が同じリビジョンの抽出。"
+ 
+ #: tortoisehg/hgqt/revset.py:61
+ msgid ""
+@@ -5340,8 +5328,8 @@ msgid ""
+ "href=\"http://www.selenic.com/mercurial/hg.1.html#patterns\">help "
+ "patterns</a>"
+ msgstr ""
+-"パターンに合致するファイルに改変を行ったリビジョン群。 (※ 訳注: \"filelog()\" に合致するリビジョンは \"file()\" "
+-"にも合致。 リビジョン側情報で判定するため \"filelog()\" と一致しない場合もある。)"
++"パターンに合致するファイルに改変を行ったリビジョン群。 <a "
++"href=\"http://www.selenic.com/mercurial/hg.1.html#patterns\">パターンの詳細</a>"
+ 
+ #: tortoisehg/hgqt/revset.py:65
+ msgid "Changesets which modify files matched by pattern."
+@@ -5399,9 +5387,7 @@ msgstr ""
+ msgid ""
+ "An empty set, if any revision in set isn't found; otherwise, all revisions "
+ "in set."
+-msgstr ""
+-"指定リビジョン群に存在しないものが含まれている場合は空集合、それ以外なら指定リビジョン群そのもの。 (※ 訳注: "
+-"通常であれば、存在しないリビジョンが含まれている場合、処理が中断されますが、present()を使用することで、処理を継続することができます)"
++msgstr "指定リビジョン群に存在しないものがあれば空、でなければ指定リビジョン群。"
+ 
+ #: tortoisehg/hgqt/revset.py:100
+ msgid "Changeset with lowest revision number in set."
+@@ -5419,16 +5405,11 @@ msgstr "指定リビジョン群の冒�
+ msgid ""
+ "Sort set by keys.  The default sort order is ascending, specify a key as \"-"
+ "key\" to sort in descending order."
+-msgstr ""
+-"key での指定方法で整列した集合。 基本の整列方式は昇順で、降順整列の場\n"
+-"合は \"-key\" 形式で記述します。指定可能な整列方式は: 1. リビジョン番号\n"
+-"順の \"rev\" 2. ブランチ名順の \"branch\" 3. コミットログ (description) 順\n"
+-"の \"desc\" 4. ユーザ名順の \"user\" (別名の \"author\" も使用可能) 5. コミット日時順の \"date\""
++msgstr "key でソート。デフォルトでは昇順、\"-key\" で降順。"
+ 
+ #: tortoisehg/hgqt/revset.py:109
+ msgid "An alias for \"::.\" (ancestors of the working copy's first parent)."
+-msgstr ""
+-"\"::.\" (作業領域の第1親の祖先リビジョン群) 記述の別名。ファイル名指定がある場合、当該ファイルの履歴 (複製含む) を辿ります。"
++msgstr "\"::.\" (作業領域の第1親の祖先リビジョン群) 記述の別名。"
+ 
+ #: tortoisehg/hgqt/revset.py:111
+ msgid "All changesets, the same as 0:tip."
+@@ -6351,8 +6332,8 @@ msgid ""
+ " You can select the \"current\" (i.e. the working directory parent), the "
+ "current \"tip\" or the working directory (\"workingdir\"). Default: current"
+ msgstr ""
+-"リポジトリを開いた時に選択されるリビジョンを指定します。選択肢は\"current\"(作業領域の親)、\"tip\"、\"workingdir"
+-"\"(作業領域)です。デフォルトは\"current\"です。"
++"リポジトリを開いた時に選択されるリビジョンを指定します。選択肢は\"current\"(作業領域の親)、\"tip\"、\"workingdir\"(作業"
++"領域)です。デフォルトは\"current\"です。"
+ 
+ #: tortoisehg/hgqt/settings.py:616
+ msgid ""

File i18n-wdir.diff

View file
+# HG changeset patch
+# Parent ff243ef77ad2444edcb280d6b554979454b2100b
+
+diff --git a/i18n/tortoisehg/ja.po b/i18n/tortoisehg/ja.po
+--- a/i18n/tortoisehg/ja.po
++++ b/i18n/tortoisehg/ja.po
+@@ -10,15 +10,15 @@ msgstr ""
+ "Project-Id-Version: tortoisehg\n"
+ "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+ "POT-Creation-Date: 2012-08-31 21:38-0300\n"
+-"PO-Revision-Date: 2012-08-13 06:06+0000\n"
++"PO-Revision-Date: 2012-09-06 22:50+0900\n"
+ "Last-Translator: Yuya Nishihara <Unknown>\n"
+ "Language-Team: LANGUAGE <LL@li.org>\n"
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=UTF-8\n"
+ "Content-Transfer-Encoding: 8bit\n"
+ "Plural-Forms: nplurals=1; plural=0;\n"
+-"X-Launchpad-Export-Date: 2012-09-01 04:59+0000\n"
+-"X-Generator: Launchpad (build 15890)\n"
++"X-Launchpad-Export-Date: 2012-09-06 13:24+0000\n"
++"X-Generator: Launchpad (build 15909)\n"
+ 
+ #: TortoiseHgOverlayServer.py:51
+ msgid "TortoiseHg Overlay Icon Server"
+@@ -71,7 +71,7 @@ msgstr "新しいバージョンがダ�
+ 
+ #: tortoisehg/hgqt/archive.py:20
+ msgid "= Working Directory Parent ="
+-msgstr "= 作業ディレクトリの親リビジョン ="
++msgstr "= 作業領域の親リビジョン ="
+ 
+ #: tortoisehg/hgqt/archive.py:40 tortoisehg/hgqt/backout.py:420
+ #: tortoisehg/hgqt/bookmark.py:50 tortoisehg/hgqt/csinfo.py:105
+@@ -243,7 +243,7 @@ msgstr "バックアウトの準備"
+ 
+ #: tortoisehg/hgqt/backout.py:100
+ msgid "Verify backout revision and ensure your working directory is clean."
+-msgstr "打ち消し対象のリビジョンと作業ディレクトリの状態を確認してください。"
++msgstr "打ち消し対象のリビジョンと作業領域の状態を確認してください。"
+ 
+ #: tortoisehg/hgqt/backout.py:111 tortoisehg/hgqt/backout.py:123
+ #: tortoisehg/hgqt/backout.py:130
+@@ -310,7 +310,7 @@ msgstr "マージリビジョンの二�
+ 
+ #: tortoisehg/hgqt/backout.py:203 tortoisehg/hgqt/merge.py:160
+ msgid "Working directory status"
+-msgstr "作業ディレクトリの状態"
++msgstr "作業領域の状態"
+ 
+ #: tortoisehg/hgqt/backout.py:209 tortoisehg/hgqt/compress.py:69
+ #: tortoisehg/hgqt/graft.py:122 tortoisehg/hgqt/merge.py:168
+@@ -359,7 +359,7 @@ msgstr "破棄の確認"
+ #: tortoisehg/hgqt/graft.py:277 tortoisehg/hgqt/merge.py:321
+ #: tortoisehg/hgqt/rebase.py:242
+ msgid "Discard outstanding changes to working directory?"
+-msgstr "作業ディレクトリのコミットしていない変更を破棄しますか?"
++msgstr "作業領域のコミットしていない変更を破棄しますか?"
+ 
+ #: tortoisehg/hgqt/backout.py:327
+ msgid "Backing out, then merging..."
+@@ -398,11 +398,11 @@ msgstr "親リビジョン"
+ #: tortoisehg/hgqt/repomodel.py:639 tortoisehg/hgqt/repomodel.py:641
+ #: tortoisehg/hgqt/shelve.py:24 tortoisehg/hgqt/thgimport.py:88
+ msgid "Working Directory"
+-msgstr "作業ディレクトリ"
++msgstr "作業領域"
+ 
+ #: tortoisehg/hgqt/backout.py:466 tortoisehg/hgqt/merge.py:497
+ msgid "Working Directory (merged)"
+-msgstr "作業ディレクトリ (マージ)"
++msgstr "作業領域 (マージ)"
+ 
+ #: tortoisehg/hgqt/backout.py:474 tortoisehg/hgqt/merge.py:505
+ msgid "Commit message"
+@@ -676,7 +676,7 @@ msgstr "ローカルファイルをエ�
+ #: tortoisehg/hgqt/chunks.py:92 tortoisehg/hgqt/filectxactions.py:73
+ #: tortoisehg/hgqt/filectxactions.py:75
+ msgid "Edit current file in working copy"
+-msgstr "作業コピーのファイルを編集"
++msgstr "作業領域のファイルを編集"
+ 
+ #: tortoisehg/hgqt/chunks.py:93 tortoisehg/hgqt/filectxactions.py:78
+ msgid "Revert to Revision"
+@@ -778,7 +778,7 @@ msgstr "このリビジョンまでク�
+ 
+ #: tortoisehg/hgqt/clone.py:130
+ msgid "Do not update the new working directory"
+-msgstr "作業ディレクトリを更新しない"
++msgstr "作業領域を更新しない"
+ 
+ #: tortoisehg/hgqt/clone.py:131
+ msgid "Use pull protocol to copy metadata"
+@@ -1710,7 +1710,7 @@ msgstr "From:"
+ 
+ #: tortoisehg/hgqt/filedata.py:216
+ msgid "Subrepository not found in the working directory."
+-msgstr "作業ディレクトリにサブリポジトリが見つかりません。"
++msgstr "作業領域にサブリポジトリが見つかりません。"
+ 
+ #: tortoisehg/hgqt/filedata.py:218 tortoisehg/hgqt/filedata.py:224
+ msgid "Further subrepository revision information cannot be retrieved."
+@@ -1922,7 +1922,7 @@ msgstr "由来リビジョンで検索"
+ 
+ #: tortoisehg/hgqt/fileview.py:662
+ msgid "Search in working revision"
+-msgstr "作業ディレクトリで検索"
++msgstr "作業領域を検索"
+ 
+ #: tortoisehg/hgqt/fileview.py:664
+ msgid "Search in current annotation"
+@@ -2082,7 +2082,7 @@ msgstr "検索"
+ 
+ #: tortoisehg/hgqt/grep.py:63
+ msgid "Working Copy"
+-msgstr "作業コピー"
++msgstr "作業領域"
+ 
+ #: tortoisehg/hgqt/grep.py:65
+ msgid "All History"
+@@ -2774,7 +2774,7 @@ msgstr "終了しますか?"
+ 
+ #: tortoisehg/hgqt/merge.py:102
+ msgid "To finish merging, you need to commit the working directory."
+-msgstr "マージを完了するには、作業ディレクトリの内容をコミットしてください。"
++msgstr "マージを完了するには、作業領域の内容をコミットしてください。"
+ 
+ #: tortoisehg/hgqt/merge.py:124
+ msgid "Prepare to merge"
+@@ -2803,7 +2803,7 @@ msgstr "マージリビジョンが指�
+ 
+ #: tortoisehg/hgqt/merge.py:153
+ msgid "Merge to (working directory)"
+-msgstr "マージ先 (作業ディレクトリ)"
++msgstr "マージ先 (作業領域)"
+ 
+ #: tortoisehg/hgqt/merge.py:176
+ msgid ""
+@@ -2811,7 +2811,7 @@ msgid ""
+ "href=\"skip\"><b>Continue</b></a> or <a href=\"discard\"><b>discard</b></a> "
+ "existing merge."
+ msgstr ""
+-"作業ディレクトリは既に<b>マージされています</b>。<a href=\"skip\"><b>続ける</b></a>かマージを<a "
++"作業領域は既に<b>マージされています</b>。<a href=\"skip\"><b>続ける</b></a>かマージを<a "
+ "href=\"discard\"><b>破棄</b></a>してください。"
+ 
+ #: tortoisehg/hgqt/merge.py:185
+@@ -5210,11 +5210,11 @@ msgstr ""
+ 
+ #: tortoisehg/hgqt/revert.py:22 tortoisehg/hgqt/revert.py:26
+ msgid "Cannot revert to working directory"
+-msgstr "作業ディレクトリに戻せません"
++msgstr "作業領域に戻せません"
+ 
+ #: tortoisehg/hgqt/revert.py:23
+ msgid "Reverting to the working directory revision does not make sense"
+-msgstr "作業ディレクトリのりビジョンへ戻す意味はありません"
++msgstr "作業領域のリビジョンへ戻す意味はありません"
+ 
+ #: tortoisehg/hgqt/revert.py:29
+ #, python-format
+@@ -6351,8 +6351,8 @@ msgid ""
+ " You can select the \"current\" (i.e. the working directory parent), the "
+ "current \"tip\" or the working directory (\"workingdir\"). Default: current"
+ msgstr ""
+-"リポジトリを開いた時に選択されるリビジョンを指定します。選択肢は\"current\"(作業ディレクトリの親)、\"tip\"、\"workingdir"
+-"\"(作業ディレクトリ)です。デフォルトは\"current\"です。"
++"リポジトリを開いた時に選択されるリビジョンを指定します。選択肢は\"current\"(作業領域の親)、\"tip\"、\"workingdir"
++"\"(作業領域)です。デフォルトは\"current\"です。"
+ 
+ #: tortoisehg/hgqt/settings.py:616
+ msgid ""
+@@ -6600,7 +6600,7 @@ msgstr "MQパッチを(draftの代わり
+ 
+ #: tortoisehg/hgqt/settings.py:724
+ msgid "Monitor working<br>directory changes"
+-msgstr "作業ディレクトリ内の変更を監視"
++msgstr "作業領域の変更を監視"
+ 
+ #: tortoisehg/hgqt/settings.py:728
+ msgid ""
+@@ -8437,7 +8437,7 @@ msgstr "シェルフ"
+ 
+ #: tortoisehg/hgqt/thgimport.py:104
+ msgid "Checking working directory status..."
+-msgstr "作業ディレクトリの状態を調べています..."
++msgstr "作業領域の状態を調べています..."
+ 
+ #: tortoisehg/hgqt/thgimport.py:116
+ msgid "&Import"
+@@ -8450,7 +8450,7 @@ msgstr "インポート - %s"
+ 
+ #: tortoisehg/hgqt/thgimport.py:159
+ msgid "Working directory is not clean!  <a href=\"view\">View changes...</a>"
+-msgstr "作業ディレクトリがクリーンでありません! <a href=\"view\">変更を見る...</a>"
++msgstr "作業領域がクリーンでありません! <a href=\"view\">変更を見る...</a>"
+ 
+ #: tortoisehg/hgqt/thgimport.py:177
+ msgid "Select patches"
+@@ -8778,7 +8778,7 @@ msgstr "GUI 差分ツールが見つか�
+ 
+ #: tortoisehg/hgqt/visdiff.py:160
+ msgid "[working copy]"
+-msgstr "[作業コピー]"
++msgstr "[作業領域]"
+ 
+ #: tortoisehg/hgqt/visdiff.py:162
+ msgid "[original]"
+@@ -8802,7 +8802,7 @@ msgstr "ローカルとの間に変更�
+ 
+ #: tortoisehg/hgqt/visdiff.py:377
+ msgid "working changes"
+-msgstr "作業ディレクトリの変更"
++msgstr "作業領域の変更"
+ 
+ #: tortoisehg/hgqt/visdiff.py:379
+ #, python-format

File msgfmtexec.diff

View file
+# HG changeset patch
+# Parent 700071699316cd7e3cd2256586639b29297a8f3f
+i18n: add minimal command-line entry point to msgfmt.py
+
+diff --git a/i18n/msgfmt.py b/i18n/msgfmt.py
+old mode 100644
+new mode 100755
+--- a/i18n/msgfmt.py
++++ b/i18n/msgfmt.py
+@@ -33,6 +33,8 @@ Exceptions:
+ """
+ import struct
+ import array
++import optparse
++import sys
+ from cStringIO import StringIO
+ 
+ __version__ = "1.1-pythongettext"
+@@ -224,3 +226,30 @@ class Msgfmt:
+ 
+     def getAsFile(self):
+         return StringIO(self.get())
++
++def main():
++    op = optparse.OptionParser()
++    op.usage = '%prog [options] filename.po'
++    op.add_option('-o', '--output-file', default='messages.mo',
++                  metavar='FILE', help='write output to specified file')
++    opts, args = op.parse_args()
++    if not args:
++        op.error('no input file specified')
++    if len(args) > 1:
++        # GNU msgfmt can accept multiple input files, but we don't
++        op.error('too many input file specified')
++
++    try:
++        modata = Msgfmt(args[0]).get()
++    except (IOError, PoSyntaxError), err:
++        print >>sys.stderr, err
++        sys.exit(1)
++
++    dest = open(opts.output_file, 'wb')
++    try:
++        dest.write(modata)
++    finally:
++        dest.close()
++
++if __name__ == '__main__':
++    main()

File series

View file
-docdiff-base.diff
+docmake-sync.diff
+docmake-gettext.diff
+docconf-sync.diff
+docpogene.diff
+msgfmtexec.diff
+docmogene.diff
+docbuildtrans.diff
+i18n-wdir.diff
+i18n-revset-tr.diff
 fileview-time.diff
 reporeg-moveactions.diff
 reporeg-saverestore.diff