Skip to content

Commit

Permalink
Some generic header, footer & side menu translations.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamie-lemon committed Sep 26, 2023
1 parent e665af2 commit 266f758
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 9 deletions.
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 modified docs/locales/ja/LC_MESSAGES/index.mo
Binary file not shown.
14 changes: 7 additions & 7 deletions docs/locales/ja/LC_MESSAGES/index.po
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@ msgstr ""

#: ../../index.rst:30 b1c7f927e24d45609a41b0b24312981f
msgid "User Guide"
msgstr ""
msgstr "ユーザーガイド"

#: ../../index.rst:40 2887066519114f2f9d103b3f03de1be4
msgid "How to Guide"
msgstr ""
msgstr "使用方法ガイド"

#: ../../index.rst:47 a7668c448dba484dbe9013f76b7c0acf
msgid "API Reference"
msgstr ""
msgstr "APIリファレンス"

#: ../../index.rst:60 9509c4a35566480ea9a9fa0aa9f4ea3c
msgid "Other"
msgstr ""
msgstr "その他"

#: ../../index.rst:7 2fe7865cbe87410786d583a32023ac87
msgid "Welcome to :title:`PyMuPDF`"
msgstr ""
msgstr "PyMuPDFへようこそ"

#: ../../index.rst:15 9dfe217cbcdc47e8b6a493b02c2041fe
msgid ""
Expand All @@ -63,14 +63,14 @@ msgstr ":title:`PyMuPDF` は `GitHub <https://github.com/pymupdf/PyMuPDF>`_

#: ../../index.rst:74 3b1b0718e6e64d3eb02cae79ec00a83c
msgid "Find out about PyMuPDF Utilities"
msgstr ""
msgstr "PyMuPDF Utilitiesについて詳しく知る"

#: ../../index.rst:76 99f3b5bce5444e8da240499d724504cc
msgid ""
"The :title:`GitHub` repository `PyMuPDF-Utilities "
"<https://github.com/pymupdf/PyMuPDF-Utilities>`_ contains a full range of"
" examples, demonstrations and use cases."
msgstr ""
msgstr "GitHubリポジトリ `PyMuPDF-Utilities <https://github.com/pymupdf/PyMuPDF-Utilities>`_ には、さまざまな例、デモンストレーション、およびユースケースが含まれています。"

#: ../../footer.rst:-1 0ece491e3ee6409d817e918f5d680de2
msgid "Discord logo"
Expand Down

0 comments on commit 266f758

Please sign in to comment.