summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/README23
-rw-r--r--doc/source/index.rst32
2 files changed, 50 insertions, 5 deletions
diff --git a/doc/source/README b/doc/source/README
new file mode 100644
index 0000000..6fbab84
--- /dev/null
+++ b/doc/source/README
@@ -0,0 +1,23 @@
+Translation credits
+###################
+
+I keep a copy of all translations in this repository so that it's easy
+to host translations on the Beautiful Soup website. These are
+generally not the canonical versions of the translations, though.
+
+doc.html/index.jp.html is a copy of the 2013 Japanese translation hosted at
+http://kondou.com/BS4/. I don't know who to credit for the
+translation.
+
+doc.html/index.kr.html is a copy of the 2012 Korean translation formerly hosted
+at http://coreapython.hosting.paran.com/etc/beautifulsoup4.html. I
+retrieved this copy from the Wayback Machine. I'm not sure who wrote
+the translation but I believe the credit goes to "Johnsonj".
+
+doc.ptbr/source/index.rst is a 2019 Brazilian Portuguese translation by Cezar
+Peixeiro. The version in this repository has been modified from
+https://github.com/czrpxr/BeautifulSoup4-ptbr-translation.
+
+doc.zh/source/index.rst is a 2018 Chinese translation by Deron
+Wang. The version in this repository has been copied from
+https://github.com/DeronW/beautifulsoup.
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 00ee467..08063a5 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -29,10 +29,11 @@ Soup 3 and Beautiful Soup 4, see `Porting code to BS4`_.
This documentation has been translated into other languages by
Beautiful Soup users:
-* `这篇文档当然还有中文版. <http://www.crummy.com/software/BeautifulSoup/bs4/doc.zh/>`_
+* `这篇文档当然还有中文版. <https://www.crummy.com/software/BeautifulSoup/bs4/doc/index.zh.html>`_
* このページは日本語で利用できます(`外部リンク <http://kondou.com/BS4/>`_)
* 이 문서는 한국어 번역도 가능합니다. (`외부 링크 <https://web.archive.org/web/20150319200824/http://coreapython.hosting.paran.com/etc/beautifulsoup4.html>`_)
-
+* `Este documento também está disponível em Português do Brasil.` <https://www.crummy.com/software/BeautifulSoup/bs4/doc/index.ptbr.html>`
+
Getting help
------------
@@ -484,7 +485,7 @@ the tree`_ and `Searching the tree`_. You can convert a
# <type 'unicode'>
You can't edit a string in place, but you can replace one string with
-another, using :ref:`replace_with`::
+another, using :ref:`replace_with()`::
tag.string.replace_with("No longer bold")
tag
@@ -2070,7 +2071,7 @@ destroys it and its contents`::
# <a href="http://example.com/">I linked to</a>
-.. _replace_with:
+.. _replace_with():
``replace_with()``
------------------
@@ -2774,7 +2775,7 @@ information as ``Tag.sourceline`` (line number) and ``Tag.sourcepos``
Note that the two parsers mean slightly different things by
``sourceline`` and ``sourcepos``. For html.parser, these numbers
represent the position of the initial less-than sign. For html5lib,
-these numbers represent the position of the final greater-than sign.
+these numbers represent the position of the final greater-than sign::
soup = BeautifulSoup(markup, 'html5lib')
for tag in soup.find_all('p'):
@@ -3113,6 +3114,27 @@ You can speed up encoding detection significantly by installing the
the document, but it can save a lot of memory, and it'll make
`searching` the document much faster.
+Translating this documentation
+==============================
+
+New translations of the Beautiful Soup documentation are greatly
+appreciated. Translations should be licensed under the MIT license,
+just like Beautiful Soup and its English documentation are.
+
+There are two ways of getting your translation into the main code base
+and onto the Beautiful Soup website:
+
+1. Create a branch of the Beautiful Soup repository, add your
+ translation, and propose a merge with the main branch, the same
+ as you would do with a proposed change to the source code.
+2. Send a message to the Beautiful Soup discussion group with a link to
+ your translation, or attach your translation to the message.
+
+Use the Chinese or Brazilian Portuguese translations as your model. In
+particular, please translate ``doc/source/index.rst`` file, rather
+than the HTML version of the documentation. This makes it possible to
+publish the documentation in a variety of formats, not just HTML.
+
Beautiful Soup 3
================