diff --git a/.gitignore b/.gitignore index 23e954719..8ef3bc07d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ *.swp build/ demo/README.rst -docs/build \ No newline at end of file +docs/build +docs/_build diff --git a/docs/README.md b/docs/README.md index 438469d34..69794f948 100644 --- a/docs/README.md +++ b/docs/README.md @@ -48,13 +48,46 @@ A better way of building the documentation if you are actively working on update This will serve the docs on a localhost and auto-update the pages live as you make edits. -### Building the Japanese documentation + + +## Internationalization + +PyMuPDF docs can be delivered in multiple languages - English, Japanese & Korean. + +To add a new language, e.g. Korean, use: + +`sphinx-build -b gettext . _build/gettext` +`sphinx-intl update -p _build/gettext -l ko` + + +### Building the Localiized documentation - From the "docs" location run: +#### Japanese: `sphinx-build -a -b html -D language=ja . _build/html/ja` +Once built HTML docs HTML pages are in `_build/html/ja`. + +#### Korean: +`sphinx-build -a -b html -D language=ko . _build/html/ko` + + +Once built HTML docs HTML pages are in `_build/html/ko`. + +Note: subsequent runs can omit the `-a` parameter to speed up builds (it will just build what has changed). + + +Note: When build the corresponding `.mo` binary files will also be generated - these updated binaries should also be committed to Git. + +### Depoloying + +Docs will be automatically deployed to RTD once pushes are made to relevant branches. + + +### Updating + - Updating, after changes on the `main` branch and a sync with the main `en` .rst files, from the "docs" location, do: `sphinx-build -b gettext . _build/gettext` @@ -62,10 +95,16 @@ This will serve the docs on a localhost and auto-update the pages live as you ma then: `sphinx-intl update -p _build/gettext -l ja` +`sphinx-intl update -p _build/gettext -l ko` 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 - First ensure you have [rst2pdf](https://pypi.org/project/rst2pdf/) installed: diff --git a/docs/about-feature-matrix.rst b/docs/about-feature-matrix.rst index 793ea633f..6f94130d2 100644 --- a/docs/about-feature-matrix.rst +++ b/docs/about-feature-matrix.rst @@ -549,6 +549,80 @@ + } else if (lang == "ko") { + if (str=="Feature") { + return "기능"; + } else if (str=="Supports Multiple Document Formats") { + return "다중 문서 형식 지원"; + } else if (str=="Image") { + return "이미지"; + } else if (str=="Implementation") { + return "구현"; + } else if (str=="and") { + return "및"; + } else if (str=="Render Document Pages") { + return "문서 페이지 렌더링"; + } else if (str=="All document types") { + return "모든 문서 유형"; + } else if (str=="No rendering") { + return "렌더링 없음"; + } else if (str=="Extract Text") { + return "텍스트 추출"; + } else if (str=="Write Text to PDF Page") { + return "PDF 페이지에 텍스트 쓰기"; + } else if (str=="only") { + return "만"; + } else if (str=="Extract Vector Graphics") { + return "벡터 그래픽 추출"; + } else if (str=="Draw Vector Graphics (PDF)") { + return "벡터 그래픽 그리기 (PDF)"; + } else if (str=="Based on Existing, Mature Library") { + return "기존의 성숙한 라이브러리 기반"; + } else if (str=="Automatic Repair of Damaged PDFs") { + return "손상된 PDF 자동 복구"; + } else if (str=="Encrypted PDFs") { + return "암호화된 PDF"; + } else if (str=="Limited") { + return "제한적"; + } else if (str=="Linerarized PDFs") { + return "선형화된 PDF"; + } else if (str=="Incremental Updates") { + return "증분 업데이트"; + } else if (str=="Integrates with Jupyter and IPython Notebooks") { + return "Jupyter 및 IPython Notebooks 통합"; + } else if (str=="Joining / Merging PDF with other Document Types") { + return "다른 문서 유형과 PDF 결합 / 병합"; + } else if (str=="OCR API for Seamless Integration with Tesseract") { + return "Tesseract와의 원활한 통합을 위한 OCR API"; + } else if (str=="Integrated Checkpoint / Restart Feature (PDF)") { + return "통합 체크포인트 / 재시작 기능 (PDF)"; + } else if (str=="PDF Optional Content") { + return "PDF 선택적 콘텐츠"; + } else if (str=="PDF Embedded Files") { + return "PDF 임베디드 파일"; + } else if (str=="PDF Redactions") { + return "PDF 편집"; + } else if (str=="PDF Annotations") { + return "PDF 주석"; + } else if (str=="Full") { + return "전체"; + } else if (str=="PDF Form Fields") { + return "PDF 양식 필드"; + } else if (str=="Create, read, update") { + return "생성, 읽기, 업데이트"; + } else if (str=="Limited, no creation") { + return "제한적, 생성 불가"; + } else if (str=="PDF Page Labels") { + return "PDF 페이지 레이블"; + } else if (str=="Support Font Sub-Setting") { + return "폰트 서브셋 지원"; + } else if (str=="Extract Tables") { + return "테이블 추출"; + } else if (str=="Supports CJK characters") { + return "CJK 문자 지원"; + } else if (str == "Extract Text as Markdown (.md)") { + return "텍스트를 Markdown (.md) 으로 추출"; + } } return str; diff --git a/docs/about-performance.rst b/docs/about-performance.rst index d89ed1f1b..6a76ca26f 100644 --- a/docs/about-performance.rst +++ b/docs/about-performance.rst @@ -354,6 +354,28 @@ + } else if (langB == "ko") { + 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 PDF and re-writing as a new PDF. This process is also at the core of functions like merging / joining multiple documents. The numbers below therefore apply to PDF 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; diff --git a/docs/footer.rst b/docs/footer.rst index e734bf95a..ae9708622 100644 --- a/docs/footer.rst +++ b/docs/footer.rst @@ -22,6 +22,15 @@ return "このソフトウェアは無保証で提供されており、明示または黙示を問わず、いかなる保証もありません。このソフトウェアはライセンスの下で配布され、ライセンスの条件に明示的に許可されている場合を除き、コピー、変更、または配布してはなりません。ライセンシング情報については、artifex.comでライセンス情報を参照するか、アメリカ合衆国カリフォルニア州サンフランシスコのArtifex Software Inc. までお問い合わせください。" } + } else if (docLanguage == "ko") { + if (str == "Find #pymupdf on Discord") { + return "Discord 에서 #pymupdf 찾기"; + } else if (str == "Have a question? Need some answers? ") { + return " 질문이 있으신가요? 답변이 필요하신가요? "; + } + 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 artifex.com or contact Artifex Software Inc., 39 Mesa Street, Suite 108A, San Francisco CA 94129, United States for further information.") { + return "이 소프트웨어는 명시적이든 묵시적이든 어떠한 보증도 없이 있는 그대로 제공됩니다. 이 소프트웨어는 라이선스에 따라 배포되며, 해당 라이선스 조건에 명시적으로 승인된 경우를 제외하고는 복사, 수정 또는 배포할 수 없습니다. 라이선스 정보는 artifex.com 에서 참조하거나, 미국 캘리포니아주 샌프란시스코 Mesa Street 39, Suite 108A 소재 Artifex Software Inc. 에 문의하시기 바랍니다." + } } return str; diff --git a/docs/header.rst b/docs/header.rst index 18b5f2298..1ce68757f 100644 --- a/docs/header.rst +++ b/docs/header.rst @@ -68,11 +68,36 @@ -