Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Japanese documentation #2636

Merged
merged 19 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
86dbe41
Initial file setup for Japanese translation.
jamie-lemon Aug 16, 2023
bb24dba
Adds installation.rst translation and flags some inline todos.
jamie-lemon Aug 16, 2023
eb844b3
Japanese for About & Vars.rsts
jamie-lemon Aug 18, 2023
9600921
Fixes translation todos for the-basics.po and installation.po
jamie-lemon Aug 18, 2023
ebba5ce
Updates README for Japanese docs building.
jamie-lemon Aug 23, 2023
9fbc76d
More docs translation into Japanese.
jamie-lemon Aug 25, 2023
90f8178
Translates tutorial & znames.
jamie-lemon Aug 31, 2023
c14f894
Removes a duplicate row from about-feature-matrix.rst
jamie-lemon Aug 31, 2023
989b4cf
Adds recipes-text translation.
jamie-lemon Sep 1, 2023
83bd5e7
More Japanese translation for Recipes.
jamie-lemon Sep 4, 2023
55a132b
More Japanese translation for Recipes #2.
jamie-lemon Sep 4, 2023
ff7c785
Completes translations for Recipes section.
jamie-lemon Sep 7, 2023
92e9d79
Initial Japanese translations for Algebra, Glossary & Module files.
jamie-lemon Sep 7, 2023
cdb25c2
Adds translation for app4.po & coop_low.po
jamie-lemon Sep 8, 2023
bb569da
Adds translation for annot.po
jamie-lemon Sep 22, 2023
7cf1a3d
Adds Archive, ColorSpace, DisplayList and some tweaks.
jamie-lemon Sep 22, 2023
e626e48
Some generic header, footer & side menu translations.
jamie-lemon Sep 25, 2023
cc69fc7
More tweaks to correct Japanese, adds Document Writer translation.
jamie-lemon Sep 26, 2023
9b85ce8
Corrects outstanding flags in glossary.po.
jamie-lemon Sep 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ This then creates the HTML documentation within `build/html`.

> Use: `sphinx-build -a -b html . build/html` to build all, including the assets in `_static` (important if you have updated CSS).

### Building the Japanese documentation

- From the "docs" location run:

`sphinx-build -a -b html -D language=ja . _build/html/ja`



## Building PDF documentation

Expand Down
218 changes: 174 additions & 44 deletions docs/about-feature-matrix.rst

Large diffs are not rendered by default.

92 changes: 77 additions & 15 deletions docs/about-performance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@

<br/>
<dl class="simple">
<dt><strong>Copying</strong></dt><dd><p>This refers to opening a document and then saving it to a new file. This test measures the speed of reading a <cite>PDF</cite> and re-writing as a new <cite>PDF</cite>. This process is also at the core of functions like merging / joining multiple documents. The numbers below therefore apply to <cite>PDF</cite> joining and merging.</p>
<dt><strong id="transP1">Copying</strong></dt><dd><p id="transP2">This refers to opening a document and then saving it to a new file. This test measures the speed of reading a <cite>PDF</cite> and re-writing as a new <cite>PDF</cite>. This process is also at the core of functions like merging / joining multiple documents. The numbers below therefore apply to <cite>PDF</cite> joining and merging.</p>

<p>The results for all 7,031 pages are:</p>
<p id="transP3">The results for all 7,031 pages are:</p>
</dd>
</dl>

Expand All @@ -183,7 +183,7 @@
<div class="segment">400</div>
<div class="segment">300</div>
<div class="segment">200</div>
<div class="segment">100<p>&#9201;</p><div style="font-size:10px;margin-top:-20px;">seconds</div></div>
<div class="segment">100<p>&#9201;</p><div style="font-size:10px;margin-top:-20px;" id="transP4">seconds</div></div>
</div>

<div class="about-graph-y-axis">
Expand All @@ -210,19 +210,19 @@
</div>

<div class="about-graph-x-axis speed">
<div class="segment"><i>fastest</i></div>
<div class="segment"><i id="transP5">fastest</i></div>
<div class="segment">&#8592;</div>
<div class="segment">&#8592;</div>
<div class="segment"><i>slowest</i></div>
<div class="segment"><i id="transP6">slowest</i></div>
</div>

</div>

<br/>
<dl class="simple">
<dt><strong>Text Extraction</strong></dt><dd><p>This refers to extracting simple, plain text from every page of the document and storing it in a text file.</p>
<dt><strong id="transP7">Text Extraction</strong></dt><dd><p id="transP8">This refers to extracting simple, plain text from every page of the document and storing it in a text file.</p>

<p>The results for all 7,031 pages are:</p>
<p id="transP9">The results for all 7,031 pages are:</p>
</dd>
</dl>

Expand All @@ -235,7 +235,7 @@
<div class="segment">400</div>
<div class="segment">300</div>
<div class="segment">200</div>
<div class="segment">100<p>&#9201;</p><div style="font-size:10px;margin-top:-20px;">seconds</div></div>
<div class="segment">100<p>&#9201;</p><div style="font-size:10px;margin-top:-20px;" id="transP10">seconds</div></div>
</div>

<div class="about-graph-y-axis">
Expand All @@ -261,10 +261,10 @@
</div>

<div class="about-graph-x-axis speed">
<div class="segment"><i>fastest</i></div>
<div class="segment"><i id="transP11">fastest</i></div>
<div class="segment">&#8592;</div>
<div class="segment">&#8592;</div>
<div class="segment"><i>slowest</i></div>
<div class="segment"><i id="transP12">slowest</i></div>
</div>

</div>
Expand All @@ -273,9 +273,9 @@
<br/>

<dl class="simple">
<dt><strong>Rendering</strong></dt><dd><p>This refers to making an image (like PNG) from every page of a document at a given DPI resolution. This feature is the basis for displaying a document in a GUI window.</p>
<dt><strong id="transP13">Rendering</strong></dt><dd><p id="transP14">This refers to making an image (like PNG) from every page of a document at a given DPI resolution. This feature is the basis for displaying a document in a GUI window.</p>

<p>The results for all 7,031 pages are:</p>
<p id="transP15">The results for all 7,031 pages are:</p>

</dd>
</dl>
Expand All @@ -290,7 +290,7 @@
<div class="segment">800</div>
<div class="segment">600</div>
<div class="segment">400</div>
<div class="segment">200<p>&#9201;</p><div style="font-size:10px;margin-top:-20px;">seconds</div></div>
<div class="segment">200<p>&#9201;</p><div style="font-size:10px;margin-top:-20px;" id="transP16">seconds</div></div>
</div>

<div class="about-graph-y-axis">
Expand All @@ -314,15 +314,77 @@
</div>

<div class="about-graph-x-axis speed">
<div class="segment"><i>fastest</i></div>
<div class="segment"><i id="transP17">fastest</i></div>
<div class="segment">&#8592;</div>
<div class="segment"><i>slowest</i></div>
<div class="segment"><i id="transP18"slowest</i></div>
</div>

</div>


<br/>

<script>

let langB = document.getElementsByTagName('html')[0].getAttribute('lang');

function getTranslationB(str) {
if (langB == "ja") {
if (str=="Copying") {
return "コピー";
} else if (str == "This refers to opening a document and then saving it to a new file. This test measures the speed of reading a <cite>PDF</cite> and re-writing as a new <cite>PDF</cite>. This process is also at the core of functions like merging / joining multiple documents. The numbers below therefore apply to <cite>PDF</cite> joining and merging.") {
return "以下は、ドキュメントを開いてから新しいファイルとして保存することを指します。このテストは、PDFを読み込み、新しいPDFとして再書き込む速度を測定します。このプロセスは、複数のドキュメントを結合するなどの機能の中核でもあります。したがって、以下の数字はPDFの結合と結合にも適用されます。";
} else if (str == "The results for all 7,031 pages are:") {
return "全7,031ページの結果は次のとおりです:";
} else if (str == "seconds") {
return "秒";
} else if (str == "fastest") {
return "最速";
} else if (str == "slowest") {
return "最遅";
} else if (str == "Text Extraction") {
return "テキスト抽出";
} else if (str == "This refers to extracting simple, plain text from every page of the document and storing it in a text file.") {
return "以下は、ドキュメントの各ページから簡単なプレーンテキストを抽出し、テキストファイルに保存することを指します。";
} else if (str == "Rendering") {
return "レンダリング";
} else if (str == "This refers to making an image (like PNG) from every page of a document at a given DPI resolution. This feature is the basis for displaying a document in a GUI window.") {
return "この場合、\"レンダリング\" は、指定されたDPI解像度でドキュメントの各ページから画像(PNGなど)を作成することを指します。この機能は、GUIウィンドウでドキュメントを表示するための基本となります。";
}



}

return str;

}

document.getElementById("transP1").innerHTML = getTranslationB("Copying");
document.getElementById("transP2").innerHTML = getTranslationB("This refers to opening a document and then saving it to a new file. This test measures the speed of reading a <cite>PDF</cite> and re-writing as a new <cite>PDF</cite>. This process is also at the core of functions like merging / joining multiple documents. The numbers below therefore apply to <cite>PDF</cite> joining and merging.");

document.getElementById("transP3").innerHTML = getTranslationB("The results for all 7,031 pages are:");
document.getElementById("transP4").innerHTML = getTranslationB("seconds");
document.getElementById("transP5").innerHTML = getTranslationB("fastest");
document.getElementById("transP6").innerHTML = getTranslationB("slowest");
document.getElementById("transP7").innerHTML = getTranslationB("Text Extraction");
document.getElementById("transP8").innerHTML = getTranslationB("This refers to extracting simple, plain text from every page of the document and storing it in a text file.");
document.getElementById("transP9").innerHTML = getTranslationB("The results for all 7,031 pages are:");
document.getElementById("transP10").innerHTML = getTranslationB("seconds");
document.getElementById("transP11").innerHTML = getTranslationB("fastest");
document.getElementById("transP12").innerHTML = getTranslationB("slowest");
document.getElementById("transP13").innerHTML = getTranslationB("Rendering");
document.getElementById("transP14").innerHTML = getTranslationB("This refers to making an image (like PNG) from every page of a document at a given DPI resolution. This feature is the basis for displaying a document in a GUI window.");
document.getElementById("transP15").innerHTML = getTranslationB("The results for all 7,031 pages are:");
document.getElementById("transP16").innerHTML = getTranslationB("seconds");
document.getElementById("transP17").innerHTML = getTranslationB("fastest");
document.getElementById("transP18").innerHTML = getTranslationB("slowest");



</script>





13 changes: 12 additions & 1 deletion docs/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,20 @@ License and Copyright

.. raw:: html

<button class="cta orange" onclick="window.location='https://artifex.com/licensing?utm_source=rtd-pymupdf&utm_medium=rtd&utm_content=cta-button'">Find out more about Licensing</button>
<button id="licenseButton" class="cta orange" onclick="window.location='https://artifex.com/licensing?utm_source=rtd-pymupdf&utm_medium=rtd&utm_content=cta-button'">Find out more about Licensing</button>
<p></p>

<script>
let langC = document.getElementsByTagName('html')[0].getAttribute('lang');

if (langC=="ja") {
document.getElementById("licenseButton").innerHTML = "さらに詳しく";
}

</script>



:title:`Artifex` is the exclusive commercial licensing agent for :title:`MuPDF`.

:title:`Artifex`, the :title:`Artifex` logo, :title:`MuPDF`, and the :title:`MuPDF` logo are registered trademarks of :title:`Artifex Software Inc.`
Expand Down
9 changes: 9 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@
# If true, keep warnings as "system message" paragraphs in the built documents.
keep_warnings = False

# Localization vars

gettext_uuid = True

gettext_compact = False

locale_dirs = ["locales"]



# -- Options for HTML output ----------------------------------------------

Expand Down
33 changes: 32 additions & 1 deletion docs/footer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,38 @@
});
</script>

<p style="color:#999">This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of that license. Refer to licensing information at <a href="https://www.artifex.com?utm_source=rtd-pymupdf&utm_medium=rtd&utm_content=footer-link">artifex.com</a> or contact Artifex Software Inc., 39 Mesa Street, Suite 108A, San Francisco CA 94129, United States for further information.</p>
<p style="color:#999" id="footerDisclaimer">This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of that license. Refer to licensing information at <a href="https://www.artifex.com?utm_source=rtd-pymupdf&utm_medium=rtd&utm_content=footer-link">artifex.com</a> or contact Artifex Software Inc., 39 Mesa Street, Suite 108A, San Francisco CA 94129, United States for further information.</p>



<script>

let docLanguage = document.getElementsByTagName('html')[0].getAttribute('lang');

function getHeaderAndFooterTranslation(str) {
if (docLanguage == "ja") {
if (str == "Do you have any feedback on this page?") {
return "このページに関するご意見はありますか?";
} else if (str == "Find <b>#pymupdf</b> on <b>Discord</b>") {
return "<b>Discord</b>の <b>#pymupdf</b> を見つける";
} else if (str == "This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of that license. Refer to licensing information at <a href='https://www.artifex.com?utm_source=rtd-pymupdf&utm_medium=rtd&utm_content=footer-link'>artifex.com</a> or contact Artifex Software Inc., 39 Mesa Street, Suite 108A, San Francisco CA 94129, United States for further information.") {

return "このソフトウェアは無保証で提供されており、明示または黙示を問わず、いかなる保証もありません。このソフトウェアはライセンスの下で配布され、ライセンスの条件に明示的に許可されている場合を除き、コピー、変更、または配布してはなりません。ライセンシング情報については、<a href='https://www.artifex.com?utm_source=rtd-pymupdf&utm_medium=rtd&utm_content=footer-link'>artifex.com</a>でライセンス情報を参照するか、アメリカ合衆国カリフォルニア州サンフランシスコのアーティファクス・ソフトウェア株式会社(Artifex Software Inc.)までお問い合わせください。"
}
}

return str;
}

document.getElementById("findOnDiscord").innerHTML = getHeaderAndFooterTranslation("Find <b>#pymupdf</b> on <b>Discord</b>");
document.getElementById("feedbackLinkTop").innerHTML = getHeaderAndFooterTranslation("Do you have any feedback on this page?");
document.getElementById("feedbackLinkBottom").innerHTML = getHeaderAndFooterTranslation("Do you have any feedback on this page?");
document.getElementById("footerDisclaimer").innerHTML = getHeaderAndFooterTranslation("This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of that license. Refer to licensing information at <a href='https://www.artifex.com?utm_source=rtd-pymupdf&utm_medium=rtd&utm_content=footer-link'>artifex.com</a> or contact Artifex Software Inc., 39 Mesa Street, Suite 108A, San Francisco CA 94129, United States for further information.");

</script>




.. note - this ensures that the Sphinx build system will pull in the image (as it is referenced in an RST file) to _images,
we don't want to display it via rst markup due to limitations (hence width:0), however we do want it available for our raw HTML
Expand Down
10 changes: 9 additions & 1 deletion docs/header.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
.. meta::
:author: Artifex
:description lang=en: PyMuPDF is a high-performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.
:description lang=ja: PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。
:keywords lang=en: PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, PDF Splitting, PDF Creation, Pyodide, PyScript
:keywords lang=ja: PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript


.. raw:: html

<link rel="stylesheet" type="text/css" href="_static/prism/prism.css">
Expand Down Expand Up @@ -35,7 +43,7 @@

<div style="display:flex;justify-content:space-between;align-items:center;margin-top:20px;">
<div class="discordLink" style="display:flex;align-items:center;margin-top: -5px;">
<a href="https://discord.gg/TSpYGBW4eq" target=_blank>Find <b>#pymupdf</b> on <b>Discord</b></a>
<a href="https://discord.gg/TSpYGBW4eq" id="findOnDiscord" target=_blank>Find <b>#pymupdf</b> on <b>Discord</b></a>
<a href="https://discord.gg/TSpYGBW4eq" target=_blank><img src="_images/discord-mark-blue.svg" alt="Discord logo" /></a>
</div>

Expand Down
Binary file added docs/locales/ja/LC_MESSAGES/about-feature-matrix.mo
Binary file not shown.
21 changes: 21 additions & 0 deletions docs/locales/ja/LC_MESSAGES/about-feature-matrix.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# PyMuPDF Japanese documentation
# Copyright (C) 2015-2023, Artifex
# This file is distributed under the same license as the PyMuPDF package.
# Jamie Lemon <[email protected]>, 2023.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PyMuPDF 1.23.0rc1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-08-16 14:20+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Suzan Sanver <[email protected]>\n"
"Language: ja\n"
"Language-Team: ja <[email protected]>\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.10.3\n"

Binary file added docs/locales/ja/LC_MESSAGES/about-performance.mo
Binary file not shown.
21 changes: 21 additions & 0 deletions docs/locales/ja/LC_MESSAGES/about-performance.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# PyMuPDF Japanese documentation
# Copyright (C) 2015-2023, Artifex
# This file is distributed under the same license as the PyMuPDF package.
# Jamie Lemon <[email protected]>, 2023.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PyMuPDF 1.23.0rc1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-08-16 14:20+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Suzan Sanver <[email protected]>\n"
"Language: ja\n"
"Language-Team: ja <[email protected]>\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.10.3\n"

Binary file added docs/locales/ja/LC_MESSAGES/about.mo
Binary file not shown.
Loading
Loading