changeset 19426:e43184680461

doc: make man and html from translated documents Before this patch, man and html are english only, and there sources are not translatable. This patch make translatable all documents.
author Takumi IINO <trot.thunder@gmail.com>
date Wed, 03 Jul 2013 21:49:43 +0900
parents 81fbd4e66ff5
children 80983af366b5
files .hgignore doc/Makefile doc/common.txt doc/hg.1.txt doc/hgignore.5.txt doc/hgrc.5.txt mercurial/help/common.txt mercurial/help/hg.1.txt mercurial/help/hgignore.5.txt mercurial/help/hgrc.5.txt
diffstat 10 files changed, 210 insertions(+), 215 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Wed Jul 03 21:49:41 2013 +0900
+++ b/.hgignore	Wed Jul 03 21:49:43 2013 +0900
@@ -25,7 +25,9 @@
 build
 contrib/hgsh/hgsh
 dist
+doc/common.txt
 doc/*.[0-9]
+doc/*.[0-9].txt
 doc/*.[0-9].gendoc.txt
 doc/*.[0-9].{x,ht}ml
 MANIFEST
--- a/doc/Makefile	Wed Jul 03 21:49:41 2013 +0900
+++ b/doc/Makefile	Wed Jul 03 21:49:43 2013 +0900
@@ -1,4 +1,4 @@
-SOURCES=$(wildcard *.[0-9].txt)
+SOURCES=$(notdir $(wildcard ../mercurial/help/*.[0-9].txt))
 MAN=$(SOURCES:%.txt=%)
 HTML=$(SOURCES:%.txt=%.html)
 GENDOC=gendoc.py ../mercurial/commands.py ../mercurial/help.py \
@@ -18,22 +18,15 @@
 
 html: $(HTML)
 
-hg.1.txt: hg.1.gendoc.txt
-	touch hg.1.txt
-
-hg.1.gendoc.txt: $(GENDOC)
-	${PYTHON} gendoc.py hg.1.gendoc > $@.tmp
+common.txt $(SOURCES) $(SOURCES:%.txt=%.gendoc.txt): $(GENDOC)
+	${PYTHON} gendoc.py $(basename $@) > $@.tmp
 	mv $@.tmp $@
 
-hgrc.5: ../mercurial/help/config.txt
-
-hgrc.5.html: ../mercurial/help/config.txt
-
-%: %.txt common.txt
+%: %.txt %.gendoc.txt common.txt
 	$(PYTHON) runrst hgmanpage $(RSTARGS) --halt warning \
 	  --strip-elements-with-class htmlonly $*.txt $*
 
-%.html: %.txt common.txt
+%.html: %.txt %.gendoc.txt common.txt
 	$(PYTHON) runrst html $(RSTARGS) --halt warning \
 	  --link-stylesheet --stylesheet-path style.css $*.txt $*.html
 
@@ -52,4 +45,4 @@
 	done
 
 clean:
-	$(RM) $(MAN) $(HTML) hg.1.gendoc.txt MANIFEST
+	$(RM) $(MAN) $(HTML) common.txt $(SOURCES) $(SOURCES:%.txt=%.gendoc.txt) MANIFEST
--- a/doc/common.txt	Wed Jul 03 21:49:41 2013 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-.. Common link and substitution definitions.
-
-.. |hg(1)| replace:: **hg**\ (1)
-.. _hg(1): hg.1.html
-.. |hgrc(5)| replace:: **hgrc**\ (5)
-.. _hgrc(5): hgrc.5.html
-.. |hgignore(5)| replace:: **hgignore**\ (5)
-.. _hgignore(5): hgignore.5.html
--- a/doc/hg.1.txt	Wed Jul 03 21:49:41 2013 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-====
- hg
-====
-
----------------------------------------
-Mercurial source code management system
----------------------------------------
-
-:Author:         Matt Mackall <mpm@selenic.com>
-:Organization:   Mercurial
-:Manual section: 1
-:Manual group:   Mercurial Manual
-
-.. contents::
-   :backlinks: top
-   :class: htmlonly
-   :depth: 1
-
-
-Synopsis
-""""""""
-**hg** *command* [*option*]... [*argument*]...
-
-Description
-"""""""""""
-The **hg** command provides a command line interface to the Mercurial
-system.
-
-Command Elements
-""""""""""""""""
-
-files...
-    indicates one or more filename or relative path filenames; see
-    `File Name Patterns`_ for information on pattern matching
-
-path
-    indicates a path on the local machine
-
-revision
-    indicates a changeset which can be specified as a changeset
-    revision number, a tag, or a unique substring of the changeset
-    hash value
-
-repository path
-    either the pathname of a local repository or the URI of a remote
-    repository.
-
-.. include:: hg.1.gendoc.txt
-
-Files
-"""""
-
-``/etc/mercurial/hgrc``, ``$HOME/.hgrc``, ``.hg/hgrc``
-    This file contains defaults and configuration. Values in
-    ``.hg/hgrc`` override those in ``$HOME/.hgrc``, and these override
-    settings made in the global ``/etc/mercurial/hgrc`` configuration.
-    See |hgrc(5)|_ for details of the contents and format of these
-    files.
-
-``.hgignore``
-    This file contains regular expressions (one per line) that
-    describe file names that should be ignored by **hg**. For details,
-    see |hgignore(5)|_.
-
-``.hgsub``
-    This file defines the locations of all subrepositories, and
-    tells where the subrepository checkouts came from. For details, see
-    :hg:`help subrepos`.
-
-``.hgsubstate``
-    This file is where Mercurial stores all nested repository states. *NB: This
-    file should not be edited manually.*
-
-``.hgtags``
-    This file contains changeset hash values and text tag names (one
-    of each separated by spaces) that correspond to tagged versions of
-    the repository contents. The file content is encoded using UTF-8.
-
-``.hg/last-message.txt``
-    This file is used by :hg:`commit` to store a backup of the commit message
-    in case the commit fails.
-
-``.hg/localtags``
-    This file can be used to define local tags which are not shared among
-    repositories. The file format is the same as for ``.hgtags``, but it is
-    encoded using the local system encoding.
-
-Some commands (e.g. revert) produce backup files ending in ``.orig``,
-if the ``.orig`` file already exists and is not tracked by Mercurial,
-it will be overwritten.
-
-Bugs
-""""
-Probably lots, please post them to the mailing list (see Resources_
-below) when you find them.
-
-See Also
-""""""""
-|hgignore(5)|_, |hgrc(5)|_
-
-Author
-""""""
-Written by Matt Mackall <mpm@selenic.com>
-
-Resources
-"""""""""
-Main Web Site: http://mercurial.selenic.com/
-
-Source code repository: http://selenic.com/hg
-
-Mailing list: http://selenic.com/mailman/listinfo/mercurial
-
-Copying
-"""""""
-Copyright (C) 2005-2012 Matt Mackall.
-Free use of this software is granted under the terms of the GNU General
-Public License version 2 or any later version.
-
-.. include:: common.txt
--- a/doc/hgignore.5.txt	Wed Jul 03 21:49:41 2013 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-==========
- hgignore
-==========
-
----------------------------------
-syntax for Mercurial ignore files
----------------------------------
-
-:Author:         Vadim Gelfer <vadim.gelfer@gmail.com>
-:Organization:   Mercurial
-:Manual section: 5
-:Manual group:   Mercurial Manual
-
-.. include:: ../mercurial/help/hgignore.txt
-
-Author
-======
-Vadim Gelfer <vadim.gelfer@gmail.com>
-
-Mercurial was written by Matt Mackall <mpm@selenic.com>.
-
-See Also
-========
-|hg(1)|_, |hgrc(5)|_
-
-Copying
-=======
-This manual page is copyright 2006 Vadim Gelfer.
-Mercurial is copyright 2005-2012 Matt Mackall.
-Free use of this software is granted under the terms of the GNU General
-Public License version 2 or any later version.
-
-.. include:: common.txt
-
--- a/doc/hgrc.5.txt	Wed Jul 03 21:49:41 2013 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-======
- hgrc
-======
-
----------------------------------
-configuration files for Mercurial
----------------------------------
-
-:Author:         Bryan O'Sullivan <bos@serpentine.com>
-:Organization:   Mercurial
-:Manual section: 5
-:Manual group:   Mercurial Manual
-
-.. contents::
-   :backlinks: top
-   :class: htmlonly
-
-
-Description
-===========
-
-.. include:: ../mercurial/help/config.txt
-
-Author
-======
-Bryan O'Sullivan <bos@serpentine.com>.
-
-Mercurial was written by Matt Mackall <mpm@selenic.com>.
-
-See Also
-========
-|hg(1)|_, |hgignore(5)|_
-
-Copying
-=======
-This manual page is copyright 2005 Bryan O'Sullivan.
-Mercurial is copyright 2005-2012 Matt Mackall.
-Free use of this software is granted under the terms of the GNU General
-Public License version 2 or any later version.
-
-.. include:: common.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/help/common.txt	Wed Jul 03 21:49:43 2013 +0900
@@ -0,0 +1,8 @@
+.. Common link and substitution definitions.
+
+.. |hg(1)| replace:: **hg**\ (1)
+.. _hg(1): hg.1.html
+.. |hgrc(5)| replace:: **hgrc**\ (5)
+.. _hgrc(5): hgrc.5.html
+.. |hgignore(5)| replace:: **hgignore**\ (5)
+.. _hgignore(5): hgignore.5.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/help/hg.1.txt	Wed Jul 03 21:49:43 2013 +0900
@@ -0,0 +1,119 @@
+====
+ hg
+====
+
+---------------------------------------
+Mercurial source code management system
+---------------------------------------
+
+:Author:         Matt Mackall <mpm@selenic.com>
+:Organization:   Mercurial
+:Manual section: 1
+:Manual group:   Mercurial Manual
+
+.. contents::
+   :backlinks: top
+   :class: htmlonly
+   :depth: 1
+
+
+Synopsis
+""""""""
+**hg** *command* [*option*]... [*argument*]...
+
+Description
+"""""""""""
+The **hg** command provides a command line interface to the Mercurial
+system.
+
+Command Elements
+""""""""""""""""
+
+files...
+    indicates one or more filename or relative path filenames; see
+    `File Name Patterns`_ for information on pattern matching
+
+path
+    indicates a path on the local machine
+
+revision
+    indicates a changeset which can be specified as a changeset
+    revision number, a tag, or a unique substring of the changeset
+    hash value
+
+repository path
+    either the pathname of a local repository or the URI of a remote
+    repository.
+
+.. include:: hg.1.gendoc.txt
+
+Files
+"""""
+
+``/etc/mercurial/hgrc``, ``$HOME/.hgrc``, ``.hg/hgrc``
+    This file contains defaults and configuration. Values in
+    ``.hg/hgrc`` override those in ``$HOME/.hgrc``, and these override
+    settings made in the global ``/etc/mercurial/hgrc`` configuration.
+    See |hgrc(5)|_ for details of the contents and format of these
+    files.
+
+``.hgignore``
+    This file contains regular expressions (one per line) that
+    describe file names that should be ignored by **hg**. For details,
+    see |hgignore(5)|_.
+
+``.hgsub``
+    This file defines the locations of all subrepositories, and
+    tells where the subrepository checkouts came from. For details, see
+    :hg:`help subrepos`.
+
+``.hgsubstate``
+    This file is where Mercurial stores all nested repository states. *NB: This
+    file should not be edited manually.*
+
+``.hgtags``
+    This file contains changeset hash values and text tag names (one
+    of each separated by spaces) that correspond to tagged versions of
+    the repository contents. The file content is encoded using UTF-8.
+
+``.hg/last-message.txt``
+    This file is used by :hg:`commit` to store a backup of the commit message
+    in case the commit fails.
+
+``.hg/localtags``
+    This file can be used to define local tags which are not shared among
+    repositories. The file format is the same as for ``.hgtags``, but it is
+    encoded using the local system encoding.
+
+Some commands (e.g. revert) produce backup files ending in ``.orig``,
+if the ``.orig`` file already exists and is not tracked by Mercurial,
+it will be overwritten.
+
+Bugs
+""""
+Probably lots, please post them to the mailing list (see Resources_
+below) when you find them.
+
+See Also
+""""""""
+|hgignore(5)|_, |hgrc(5)|_
+
+Author
+""""""
+Written by Matt Mackall <mpm@selenic.com>
+
+Resources
+"""""""""
+Main Web Site: http://mercurial.selenic.com/
+
+Source code repository: http://selenic.com/hg
+
+Mailing list: http://selenic.com/mailman/listinfo/mercurial
+
+Copying
+"""""""
+Copyright (C) 2005-2012 Matt Mackall.
+Free use of this software is granted under the terms of the GNU General
+Public License version 2 or any later version.
+
+.. include:: common.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/help/hgignore.5.txt	Wed Jul 03 21:49:43 2013 +0900
@@ -0,0 +1,34 @@
+==========
+ hgignore
+==========
+
+---------------------------------
+syntax for Mercurial ignore files
+---------------------------------
+
+:Author:         Vadim Gelfer <vadim.gelfer@gmail.com>
+:Organization:   Mercurial
+:Manual section: 5
+:Manual group:   Mercurial Manual
+
+.. include:: hgignore.5.gendoc.txt
+
+Author
+======
+Vadim Gelfer <vadim.gelfer@gmail.com>
+
+Mercurial was written by Matt Mackall <mpm@selenic.com>.
+
+See Also
+========
+|hg(1)|_, |hgrc(5)|_
+
+Copying
+=======
+This manual page is copyright 2006 Vadim Gelfer.
+Mercurial is copyright 2005-2012 Matt Mackall.
+Free use of this software is granted under the terms of the GNU General
+Public License version 2 or any later version.
+
+.. include:: common.txt
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/help/hgrc.5.txt	Wed Jul 03 21:49:43 2013 +0900
@@ -0,0 +1,41 @@
+======
+ hgrc
+======
+
+---------------------------------
+configuration files for Mercurial
+---------------------------------
+
+:Author:         Bryan O'Sullivan <bos@serpentine.com>
+:Organization:   Mercurial
+:Manual section: 5
+:Manual group:   Mercurial Manual
+
+.. contents::
+   :backlinks: top
+   :class: htmlonly
+
+
+Description
+===========
+
+.. include:: hgrc.5.gendoc.txt
+
+Author
+======
+Bryan O'Sullivan <bos@serpentine.com>.
+
+Mercurial was written by Matt Mackall <mpm@selenic.com>.
+
+See Also
+========
+|hg(1)|_, |hgignore(5)|_
+
+Copying
+=======
+This manual page is copyright 2005 Bryan O'Sullivan.
+Mercurial is copyright 2005-2012 Matt Mackall.
+Free use of this software is granted under the terms of the GNU General
+Public License version 2 or any later version.
+
+.. include:: common.txt