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

Draft: More Japanese Documentation #2716

Closed
wants to merge 46 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c793a62
Meta data fix in header.
jamie-lemon Sep 27, 2023
67c4bce
Removes the PDF build option as this causes a latex build error.
jamie-lemon Sep 27, 2023
054335b
Fixes the initial intro description translation.
jamie-lemon Sep 27, 2023
45be49e
Updates The Basics with Table Extraction translation.
jamie-lemon Sep 27, 2023
d67c23e
Updates after a sync with the main branch.
jamie-lemon Sep 27, 2023
5d7e540
Updates footer, tweak in About for "methodology" term.
jamie-lemon Sep 27, 2023
29795f1
Updates header with a handy language toggle.
jamie-lemon Sep 27, 2023
e4e25bf
Adds Font class translation.
jamie-lemon Sep 27, 2023
d720b88
Attempting to get the project to build a PDF document.
jamie-lemon Sep 28, 2023
b4588e8
Attempting a dedicated .readthedocs.yaml for the Japanese docs build.
jamie-lemon Sep 28, 2023
2474c60
Corrects paths in localized readthedocs.yaml
jamie-lemon Sep 28, 2023
efa5de8
Another attempt at fixing the path in the new .yaml
jamie-lemon Sep 28, 2023
22803cd
Tweaks and comments.
jamie-lemon Sep 28, 2023
79c261f
Updates metadata in header for each translated .po file.
jamie-lemon Sep 28, 2023
7b92659
Amends some translations on the about feature matrix page.
jamie-lemon Oct 2, 2023
216c974
Adds initial translation for Document class.
jamie-lemon Oct 2, 2023
8e726d2
1st translation of: Identity, iRect, Link, linkDest, Matrix, Outline,…
jamie-lemon Oct 3, 2023
918a41a
1st translation of: Point, Quad & Rect.
jamie-lemon Oct 3, 2023
84cecd7
Adds translations for Shape, Story, TextPage & TextWriter classes.
jamie-lemon Oct 3, 2023
368c912
Corrects some of the previously flagged Japanese documentation.
jamie-lemon Oct 4, 2023
60bb587
Adds translations for Tools, Widget & XML classes.
jamie-lemon Oct 4, 2023
9fae997
Adds translation for functions.po file.
jamie-lemon Oct 4, 2023
03a1382
Meta data fix in header.
jamie-lemon Sep 27, 2023
3726f3e
Removes the PDF build option as this causes a latex build error.
jamie-lemon Sep 27, 2023
b7649bc
Fixes the initial intro description translation.
jamie-lemon Sep 27, 2023
4310631
Updates The Basics with Table Extraction translation.
jamie-lemon Sep 27, 2023
5f99952
Updates after a sync with the main branch.
jamie-lemon Sep 27, 2023
e6f3d75
Updates footer, tweak in About for "methodology" term.
jamie-lemon Sep 27, 2023
c2f4dea
Adds Font class translation.
jamie-lemon Sep 27, 2023
4ed96a7
Attempting to get the project to build a PDF document.
jamie-lemon Sep 28, 2023
1f4beed
Attempting a dedicated .readthedocs.yaml for the Japanese docs build.
jamie-lemon Sep 28, 2023
b358a2a
Corrects paths in localized readthedocs.yaml
jamie-lemon Sep 28, 2023
8c7fbb6
Another attempt at fixing the path in the new .yaml
jamie-lemon Sep 28, 2023
faa355e
Tweaks and comments.
jamie-lemon Sep 28, 2023
3b6d577
Updates metadata in header for each translated .po file.
jamie-lemon Sep 28, 2023
c6b8276
Amends some translations on the about feature matrix page.
jamie-lemon Oct 2, 2023
9c667d6
Adds initial translation for Document class.
jamie-lemon Oct 2, 2023
91d4726
1st translation of: Identity, iRect, Link, linkDest, Matrix, Outline,…
jamie-lemon Oct 3, 2023
7470cda
1st translation of: Point, Quad & Rect.
jamie-lemon Oct 3, 2023
ffb46e0
Adds translations for Shape, Story, TextPage & TextWriter classes.
jamie-lemon Oct 3, 2023
15cb046
Corrects some of the previously flagged Japanese documentation.
jamie-lemon Oct 4, 2023
f3712cf
Adds translations for Tools, Widget & XML classes.
jamie-lemon Oct 4, 2023
238cd2c
Adds translation for functions.po file.
jamie-lemon Oct 4, 2023
4defcd5
Merge remote-tracking branch 'origin/docs-ja' into docs-ja
jamie-lemon Oct 4, 2023
a38046a
Adds Japanese translation for Page, Device and Lowlevel documentation…
jamie-lemon Oct 6, 2023
927fc99
Improves documentation language toggle in header.
jamie-lemon Oct 10, 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
1 change: 0 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ build:
sphinx:
configuration: docs/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
formats:
- pdf

Expand Down
10 changes: 10 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ This then creates the HTML documentation within `build/html`.
`sphinx-build -a -b html -D language=ja . _build/html/ja`


- Updating, after changes on the `main` branch and a sync with the main `en` .rst files do:

`sphinx-build -b gettext . _build/gettext`

then:

`sphinx-intl update -p _build/gettext -l ja`

This will update the corresponding `po` files for further edits. Then check these files for "#, fuzzy" entries as the new stuff might exist there and requires editing.


## Building PDF documentation

Expand Down
4 changes: 2 additions & 2 deletions docs/about-feature-matrix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@
} else if (str=="Encrypted PDFs") {
return "暗号化されたPDFファイル";
} else if (str=="Limited") {
return "限られた";
return "一部対応";
} else if (str=="Linerarized PDFs") {
return "リニアライズされたPDFファイル";
} else if (str=="Incremental Updates") {
Expand Down Expand Up @@ -407,7 +407,7 @@
} else if (str=="Create, read, update") {
return "作成、読み取り、更新";
} else if (str=="Limited, no creation") {
return "限定、作成不可";
return "一部対応、作成不可";
} else if (str=="PDF Page Labels") {
return "PDFページラベル";
} else if (str=="Support Font Sub-Setting") {
Expand Down
13 changes: 12 additions & 1 deletion docs/footer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
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 "このソフトウェアは無保証で提供されており、明示または黙示を問わず、いかなる保証もありません。このソフトウェアはライセンスの下で配布され、ライセンスの条件に明示的に許可されている場合を除き、コピー、変更、または配布してはなりません。ライセンシング情報については、<a href='https://www.artifex.com?utm_source=rtd-pymupdf&utm_medium=rtd&utm_content=footer-link'>artifex.com</a>でライセンス情報を参照するか、アメリカ合衆国カリフォルニア州サンフランシスコのArtifex Software Inc. までお問い合わせください。"

}
}

Expand All @@ -53,6 +54,16 @@
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.");


// more tranlsation for admonition-title as the in-built translation isn't great, needs: 注釈 -> 注
if (docLanguage == "ja") {
const collection = document.getElementsByClassName("admonition-title");
for (var i=0;i<collection.length;i++) {
collection[i].innerHTML = "注";
}
}


</script>


Expand Down
63 changes: 57 additions & 6 deletions docs/header.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,64 @@
border: 0px !important;
}

#languageToggle {
width:25%;
margin:8px 10px 0;
}

#button-select-en {
padding: 5px 10px;
background-color: #fff;
border: 1px solid #000;
border-radius: 10px 0 0 10px;
font-size: 14px;
}

#button-select-ja {
padding: 5px 10px;
background-color: #fff;
border: 1px solid #000;
border-radius: 0px 10px 10px 0;
border-left: 0;
font-size: 14px;
}

#button-select-en , #button-select-ja, #button-select-en:hover , #button-select-ja:hover {
color: #fff;
text-decoration: none;
}

/* small screens */
@media all and (max-width : 768px) {
#languageToggle {
width:50%;
}
}

@media all and (max-width : 400px) {
#languageToggle {
width:70%;
}
}

@media all and (max-width : 375px) {
#button-select-en , #button-select-ja {
font-size: 11px;
}
}


</style>

<script type="text/javascript" src="_static/prism/prism.js"></script>

<div style="display:flex;justify-content:flex-start;align-items: flex-end;">
<div style="display:flex;justify-content:space-between;align-items: center;">
<form class="sidebar-search-container top" method="get" action="search.html" role="search" style="width:75%">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
<input type="hidden" name="check_keywords" value="yes">
<input type="hidden" name="area" value="default">
</form>
<div style="width:25%;margin:0px 10px;"><span style="font-size:11px;">Language: </span><span><a id="printableLang" href="javascript:changeLanguage()"></a></span></div>
<div id="languageToggle"><span><a id="button-select-en" href="javaScript:changeLanguage('en')">English</a></span><span><a id="button-select-ja" href="javaScript:changeLanguage('ja')">日本語</a></span></div>
</div>

<div style="display:flex;justify-content:space-between;align-items:center;margin-top:20px;">
Expand All @@ -51,21 +98,25 @@
</div>

<script>
// highlightSelectedLanguage

if (document.getElementsByTagName('html')[0].getAttribute('lang')=="ja") {
document.getElementById("printableLang").innerHTML = "日本語";
document.getElementById("button-select-ja").style.backgroundColor = "#ff6600";
document.getElementById("button-select-en").style.color = "#000";
} else {
document.getElementById("printableLang").innerHTML = "English";
document.getElementById("button-select-en").style.backgroundColor = "#ff6600";
document.getElementById("button-select-ja").style.color = "#000";
}


var url_string = window.location.href;
var a = document.getElementById('feedbackLinkTop');
a.setAttribute("href", "https://artifex.com/contributor/feedback.php?utm_source=rtd-pymupdf&utm_medium=rtd&utm_content=header-link&url="+url_string);

function changeLanguage() {
function changeLanguage(lang) {
var new_url;

if (document.getElementsByTagName('html')[0].getAttribute('lang')=="ja") {
if (lang == "en") {
new_url = url_string.replace("/ja/", "/en/");
} else {
new_url = url_string.replace("/en/", "/ja/");
Expand Down
25 changes: 25 additions & 0 deletions docs/locales/ja/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# .readthedocs.yaml
# Note: We use this dedicated yaml inside the locales/ja folder as RTD was having problems building a PDF
# This yaml is the same as the main one - it just removes the PDF build option

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.9"
# You can also specify other tool versions:
# nodejs: "16"
# rust: "1.55"
# golang: "1.17"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
Binary file modified docs/locales/ja/LC_MESSAGES/about.mo
Binary file not shown.
76 changes: 55 additions & 21 deletions docs/locales/ja/LC_MESSAGES/about.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ 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"
"POT-Creation-Date: 2023-09-28 14:54+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Suzan Sanver <suzan.sanver@dijipiji.com>\n"
"Language: ja\n"
Expand All @@ -19,47 +19,62 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.10.3\n"

#: ../../about.rst:10 888b5bf60bc6435e90715e12dc2bdb28
#: ../../header.rst:-1
msgid "Artifex"
msgstr ""

#: ../../header.rst:-1
msgid "PyMuPDF is a high-performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents."
msgstr "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。"

#: ../../header.rst:-1
msgid "PDF Text Extraction, PDF Image Extraction, PDF Conversion, PDF Tables, PDF Splitting, PDF Creation, Pyodide, PyScript"
msgstr "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript"

#: ../../about.rst:10 d9cba2c3b34f420091784e17525f0305
msgid "Features Comparison"
msgstr "機能の比較"

#: ../../about.rst:16 f075f60743ac4eacb93bbfffad517ecc
#: ../../about.rst:16 1026d27f66b14392916dc30f3e466c33
msgid "Feature matrix"
msgstr "機能比較表"

#: ../../about.rst:18 ff238380567645238b1fbe2e64e623b0
#: ../../about.rst:18 c9de9577c08042d3a84c4efac38addc1
msgid ""
"The following table illustrates how :title:`PyMuPDF` compares with other "
"typical solutions."
msgstr "以下の表は、:title:`PyMuPDF` が他の典型的な解決策と比較した場合の違いを示しています。"

#: ../../about.rst:27 f2abbb9014ca4c8f82af6cd85a11704f
#: ../../about.rst:27 5375f5f789c24f928ad986e62e5755c3
msgid "Performance"
msgstr "パフォーマンス"

#: ../../about.rst:31 157fa531655e41478d9852f7c5e61f06
#: ../../about.rst:31 503aeaa3460643f68ebecc38681108af
msgid ""
"To benchmark :title:`PyMuPDF` performance against a range of tasks a test"
" suite with a fixed set of :ref:`8 PDFs with a total of 7,031 "
"pages<Appendix4_Files_Used>` containing text & images is used to obtain "
"performance timings."
msgstr ":ref:`8つのPDFファイル(合計7,031ページ)<Appendix4_Files_Used>` にテキストと画像が含まれている固定されたセットのテストスイートを使用して、:title:`PyMuPDF` のパフォーマンスをさまざまなタスクに対してベンチマークします。"
msgstr ""
":ref:`8つのPDFファイル(合計7,031ページ)<Appendix4_Files_Used>` "
"にテキストと画像が含まれている固定されたセットのテストスイートを使用して、:title:`PyMuPDF` "
"のパフォーマンスをさまざまなタスクに対してベンチマークします。"

#: ../../about.rst:34 6a96665d1db74c969980db1fd2ea12a4
#: ../../about.rst:34 691496bf65f24f88a30f1211c722eb86
msgid "Here are current results, grouped by task:"
msgstr "以下は、タスクごとにグループ化された現在の結果です:"

#: ../../about.rst:43 785c3e70fdca4aab9372cdd5273dc82e
#: ../../about.rst:43 b77f8d9faa0f46f790aa6ceb741d1d63
msgid ""
"For more detail regarding the methodology for these performance timings "
"see: :ref:`Performance Comparison Methodology<Appendix4>`."
msgstr "これらのパフォーマンスのタイミングに関する方法論の詳細については、:ref:`パフォーマンス比較方法論<Appendix4>` を参照してください。"
msgstr "これらのパフォーマンスのタイミングに関する方法の詳細については、:ref:`パフォーマンス比較方法<Appendix4>` を参照してください。"

#: ../../about.rst:48 986945aa34944c01bc1ea61c44f2fc6c
#: ../../about.rst:48 07b28365a77042328469bc244c3e7582
msgid "License and Copyright"
msgstr "ライセンスと著作権"

#: ../../about.rst:52 70fb5ce138354820aca1754304e0ce36
#: ../../about.rst:52 d434376eab884d839b4f216b68b36f17
msgid ""
":title:`PyMuPDF` and :title:`MuPDF` are now available under both, open-"
"source :title:`AGPL` and commercial license agreements. Please read the "
Expand All @@ -71,35 +86,54 @@ msgid ""
"`Artifex <https://artifex.com/contact/pymupdf-inquiry.php?utm_source=rtd-"
"pymupdf&utm_medium=rtd&utm_content=inline-link>`_ for more information "
"regarding a commercial license."
msgstr "PyMuPDFとMuPDFは現在、オープンソースのAGPLと商用ライセンス契約の両方で提供されています。ライセンスのガイドラインに従うことを確認するため、配布資料(COPYINGファイル)と `ここ <https://www.gnu.org/licenses/agpl-3.0.html>`_ にあるAGPLライセンス契約の全文をお読みください。AGPLの要件を満たせないと判断された場合は、商用ライセンスに関する詳細情報については、 `Artifex <https://artifex.com/contact/pymupdf-inquiry.php?utm_source=rtd-pymupdf-jp&utm_medium=rtd&utm_content=inline-link>`_ にお問い合わせください。"
msgstr ""
"PyMuPDFとMuPDFは現在、オープンソースのAGPLと商用ライセンス契約の両方で提供されています。ライセンスのガイドラインに従うことを確認するため、配布資料(COPYINGファイル)と"
" `ここ <https://www.gnu.org/licenses/agpl-3.0.html>`_ "
"にあるAGPLライセンス契約の全文をお読みください。AGPLの要件を満たせないと判断された場合は、商用ライセンスに関する詳細情報については、 "
"`Artifex <https://artifex.com/contact/pymupdf-inquiry.php?utm_source=rtd-"
"pymupdf-jp&utm_medium=rtd&utm_content=inline-link>`_ にお問い合わせください。"

#: ../../about.rst:59 f3b337656b7043aaaf9dca11699f7c2d
#: ../../about.rst:70 aede582da6bc49f6993cc04dd8b729de
msgid ""
":title:`Artifex` is the exclusive commercial licensing agent for "
":title:`MuPDF`."
msgstr ":title:`Artifex` Artifexは、:title:`MuPDF` の独占的な商業ライセンスエージェントです。"

#: ../../about.rst:61 1303d3e636b94a99b70c1087641984d5
#: ../../about.rst:72 7f9fcee6adac4038836f151e7fe0afb5
msgid ""
":title:`Artifex`, the :title:`Artifex` logo, :title:`MuPDF`, and the "
":title:`MuPDF` logo are registered trademarks of :title:`Artifex Software"
" Inc.`"
msgstr ":title:`Artifex` 、:title:`Artifex` のロゴ、:title:`MuPDF` 、およびMuPDFのロゴは、:title:`Artifex Software Inc.` の登録商標です。"
msgstr ""
":title:`Artifex` 、:title:`Artifex` のロゴ、:title:`MuPDF` "
"、およびMuPDFのロゴは、:title:`Artifex Software Inc.` の登録商標です。"

#: ../../version.rst:3 ff0d4a3e0de94752b26e51a8a37bf914
#: ../../version.rst:3 a81b1c7655b846c6ab8ba9fcc4f81520
msgid ""
"This documentation covers **PyMuPDF v1.23.0rc1** features as of "
"**2023-08-10 00:00:01**."
"This documentation covers **PyMuPDF v1.23.4** features as of **2023-09-26"
" 00:00:01**."
msgstr ""

#: ../../version.rst:5 7c2446c0ab554e95b8c263ac5713d6a5
#: ../../version.rst:5 d87212047f214cc9bf01365e4dd4546a
msgid ""
"The major and minor versions of **PyMuPDF** and **MuPDF** will always be "
"the same. Only the third qualifier (patch level) may deviate from that of"
" **MuPDF**."
msgstr ""

#: ../../footer.rst:-1 29505b8af3da40eda1190aeaab46fcba
#: ../../footer.rst:-1 d8f92aa5219c4abb9333cead017a5446
msgid "Discord logo"
msgstr ""

#~ msgid ""
#~ "This documentation covers **PyMuPDF "
#~ "v1.23.0rc1** features as of **2023-08-10 "
#~ "00:00:01**."
#~ msgstr ""

#~ msgid "PyMuPDF は、PDF (およびその他の)ドキュメントのデータ抽出、分析、変換、操作のための高性能な Python ライブラリです。"
#~ msgstr ""

#~ msgid "PDFテキスト抽出、PDFイメージ抽出、PDF変換、PDFテーブル、PDF分割、PDF作成, Pyodide, PyScript"
#~ msgstr ""

Binary file modified docs/locales/ja/LC_MESSAGES/algebra.mo
Binary file not shown.
Loading
Loading