-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Simplified Chinese Support (#772)
* Add Simplified Chinese Support * Add zh_cn CliRunner tests * fix chinese help * align clitest names * Fix minor flaws * Modify Chinese internal name * Fix Pipeline tab not raffected by localization * refine zh_cn text * Make tile MenuItem localizable * add spaces between char * fix: en docs typo * add zh_cn docs * feat: add zhcn docs build script * fix: malformed table * action: add zhcn docs pdf upload * neutralize: codacy warnings * fix PDF build by specifying a supported language see https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language 'zh' is not the correct language code for Simplified Chinese, 'zh_CN' is. * wip: try to fix rst2pdf for zh_CN output (not working) * wip: move font in the conf dir (still not working) * fix: still trying to fix blocky docs issue * wip: recover stylesheet * Remove zh docs pdf upload action * fix: correct workflow get version * fix: ci cannot find right jar * wip: try to fix deploy-web * wip: try to allow rst2pdf to find correct styles * wip: force utf-8 everywhere * Revert "wip: try to allow rst2pdf to find correct styles" This reverts commit 09d19af, due to docs being accidentally broken * add: garbled text warning * fix: tiny errors * fix: correct error --------- Co-authored-by: Andrea Spadaccini <andrea.spadaccini@gmail.com>
- Loading branch information
Showing
40 changed files
with
2,085 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE helpset | ||
PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" | ||
"http://java.sun.com/products/javahelp/helpset_2_0.dtd"> | ||
|
||
|
||
<!--This Helpset was first generated by JHelpDev 0.63 (jhelpdev.sourceforge.net), | ||
and then modified by Andrea Spadaccini using as a guideline the JavaHelp | ||
System User's Guide.--> | ||
|
||
<helpset version="2.0"> | ||
<title>EduMIPS64 帮助</title> | ||
|
||
<maps> | ||
<homeID>top</homeID> | ||
<mapref location="Map.jhm"/> | ||
</maps> | ||
|
||
<view> | ||
<name>TOC</name> | ||
<label>目录</label> | ||
<type>javax.help.TOCView</type> | ||
<data>EduMIPS64TOC.xml</data> | ||
</view> | ||
|
||
<presentation default="true" displayviewimages="false"> | ||
<name>main window</name> | ||
<size width="400" height="400" /> | ||
<location x="200" y="200" /> | ||
<title>EduMIPS64 帮助</title> | ||
<toolbar> | ||
<helpaction image = "img_back">javax.help.BackAction</helpaction> | ||
<helpaction image = "img_fwd">javax.help.ForwardAction</helpaction> | ||
<helpaction image = "img_home">javax.help.HomeAction</helpaction> | ||
<helpaction image = "img_print">javax.help.PrintAction</helpaction> | ||
</toolbar> | ||
</presentation> | ||
</helpset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE index PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Index Version 1.0//EN" "http://java.sun.com/products/javahelp/index_2_0.dtd"><!--generated by JHelpDev Version: 0.63, 14 May 2008, see jhelpdev.sourceforge.net--> | ||
|
||
<index version="1.0"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE toc PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp TOC Version 1.0//EN" "http://java.sun.com/products/javahelp/toc_2_0.dtd"><!--generated by JHelpDev Version: 0.63, 14 May 2008, see jhelpdev.sourceforge.net--> | ||
|
||
<toc version="1.0"> | ||
<tocitem text="欢迎访问 EduMIPS64 文档! " target="index"/> | ||
|
||
<tocitem text="源文件格式" target="source-files-format"/> | ||
|
||
<tocitem text="指令集" target="instructions"/> | ||
|
||
<tocitem text="浮点单元" target="fpu"/> | ||
|
||
<tocitem text="用户界面" target="user-interface"/> | ||
|
||
<tocitem text="代码示例" target="examples"/> | ||
|
||
</toc> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ť翿オ촧䀁㈬쨫뺾﮾ꮪꮯﺿ뿻ꫫꪪ讪껫ꮾ못껺ꪺ뺪ꮪꪪ뺪꿻몪ꪫ뮫뻪뺪뫺몪ꪪ뻪뺪ꫫ絛뮾ꪪꮫꪪꪪꪪꪺꮺ着ꪾ몪ꪪ꺻몪ꮺꪪ着몺ꪾ꪿ꪺꪮꮮ꾺ꪮ꺪뿫뫫ꪻ뺪몾ꮿꫪ꺺ꪪ못ꪪꮺ꺪꺪꺪ꪪꪪꪪꪮꪺꪻ뮮ꪪꪪꪪꪪꪪꪪꪪꪪꪪꪪꪪꪪꪪ� |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
��Zl�m�H� >�G��j�H @ �|f������D |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
JavaSearch 1.0 | ||
TMAP bs=2048 rt=1 fl=-1 id1=1045 id2=1 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE map PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Map Version 1.0//EN" "http://java.sun.com/products/javahelp/map_2_0.dtd"> | ||
|
||
<map version="1.0" xml:lang="zh"> | ||
<mapID target="top" url="html/index.html "/> | ||
<mapID target="index" url="html/index.html"/> | ||
<mapID target="user-interface" url="html/user-interface.html"/> | ||
<mapID target="instructions" url="html/instructions.html"/> | ||
<mapID target="fpu" url="html/fpu.html"/> | ||
<mapID target="search" url="html/search.html"/> | ||
<mapID target="source-files-format" url="html/source-files-format.html"/> | ||
<mapID target="genindex" url="html/genindex.html"/> | ||
<mapID target="examples" url="html/examples.html"/> | ||
<mapID target="_static.file" url="html/_static/file.png"/> | ||
<mapID target="_static.minus" url="html/_static/minus.png"/> | ||
<mapID target="_static.plus" url="html/_static/plus.png"/> | ||
<mapID target="img_back" url="img/Back.png"/> | ||
<mapID target="img_fwd" url="img/Forward.png"/> | ||
<mapID target="img_home" url="img/Home.png"/> | ||
<mapID target="img_print" url="img/Print.png"/> | ||
</map> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
# Makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS = | ||
SPHINXBUILD = python3 -msphinx | ||
PAPER = | ||
BUILDDIR = ../output | ||
|
||
# Internal variables. | ||
PAPEROPT_a4 = -D latex_paper_size=a4 | ||
PAPEROPT_letter = -D latex_paper_size=letter | ||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . | ||
|
||
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest | ||
|
||
help: | ||
@echo "Please use \`make <target>' where <target> is one of" | ||
@echo " html to make standalone HTML files" | ||
@echo " dirhtml to make HTML files named index.html in directories" | ||
@echo " singlehtml to make a single large HTML file" | ||
@echo " pickle to make pickle files" | ||
@echo " json to make JSON files" | ||
@echo " htmlhelp to make HTML files and a HTML help project" | ||
@echo " qthelp to make HTML files and a qthelp project" | ||
@echo " devhelp to make HTML files and a Devhelp project" | ||
@echo " epub to make an epub" | ||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" | ||
@echo " latexpdf to make LaTeX files and run them through pdflatex" | ||
@echo " pdf to make PDF files using rst2pdf" | ||
@echo " text to make text files" | ||
@echo " man to make manual pages" | ||
@echo " changes to make an overview of all changed/added/deprecated items" | ||
@echo " linkcheck to check all external links for integrity" | ||
@echo " doctest to run all doctests embedded in the documentation (if enabled)" | ||
|
||
clean: | ||
-rm -rf $(BUILDDIR)/* | ||
|
||
html: | ||
$(SPHINXBUILD) --version | ||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html | ||
@echo | ||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html." | ||
|
||
dirhtml: | ||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml | ||
@echo | ||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." | ||
|
||
singlehtml: | ||
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml | ||
@echo | ||
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." | ||
|
||
pickle: | ||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle | ||
@echo | ||
@echo "Build finished; now you can process the pickle files." | ||
|
||
json: | ||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json | ||
@echo | ||
@echo "Build finished; now you can process the JSON files." | ||
|
||
htmlhelp: | ||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp | ||
@echo | ||
@echo "Build finished; now you can run HTML Help Workshop with the" \ | ||
".hhp project file in $(BUILDDIR)/htmlhelp." | ||
|
||
qthelp: | ||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp | ||
@echo | ||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \ | ||
".qhcp project file in $(BUILDDIR)/qthelp, like this:" | ||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/EduMIPS64.qhcp" | ||
@echo "To view the help file:" | ||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/EduMIPS64.qhc" | ||
|
||
devhelp: | ||
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp | ||
@echo | ||
@echo "Build finished." | ||
@echo "To view the help file:" | ||
@echo "# mkdir -p $$HOME/.local/share/devhelp/EduMIPS64" | ||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/EduMIPS64" | ||
@echo "# devhelp" | ||
|
||
epub: | ||
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub | ||
@echo | ||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub." | ||
|
||
latex: | ||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex | ||
@echo | ||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." | ||
@echo "Run \`make' in that directory to run these through (pdf)latex" \ | ||
"(use \`make latexpdf' here to do that automatically)." | ||
|
||
latexpdf: | ||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex | ||
@echo "Running LaTeX files through pdflatex..." | ||
make -C $(BUILDDIR)/latex all-pdf | ||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." | ||
|
||
pdf: | ||
$(SPHINXBUILD) -b pdf $(ALLSPHINXOPTS) $(BUILDDIR)/latex | ||
@echo | ||
@echo "Build finished. The PDF files are in $(BUILDDIR)/latex." | ||
|
||
text: | ||
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text | ||
@echo | ||
@echo "Build finished. The text files are in $(BUILDDIR)/text." | ||
|
||
man: | ||
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man | ||
@echo | ||
@echo "Build finished. The manual pages are in $(BUILDDIR)/man." | ||
|
||
changes: | ||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes | ||
@echo | ||
@echo "The overview file is in $(BUILDDIR)/changes." | ||
|
||
linkcheck: | ||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck | ||
@echo | ||
@echo "Link check complete; look for any errors in the above output " \ | ||
"or in $(BUILDDIR)/linkcheck/output.txt." | ||
|
||
doctest: | ||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest | ||
@echo "Testing of doctests in the sources finished, look at the " \ | ||
"results in $(BUILDDIR)/doctest/output.txt." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# EduMIPS64 documentation build configuration file, created by | ||
# sphinx-quickstart on Tue Apr 26 23:10:10 2011. | ||
# | ||
# This file is execfile()d with the current directory set to its containing dir. | ||
# | ||
# Note that not all possible configuration values are present in this | ||
# autogenerated file. | ||
# | ||
# All configuration values have a default; values that are commented out | ||
# serve to show the default. | ||
# | ||
# Note: all the common configuration of the EduMIPS64 documentation is stored | ||
# in docs/common_conf.py. This file just imports all the identifiers from that | ||
# module and adds language-specific configuration items. | ||
|
||
import sys, os | ||
sys.path.append(os.path.abspath("../..")) | ||
from common_conf import * | ||
|
||
pdf_stylesheets = ['sphinx', 'kerning', 'a4', 'zh_CN.json', 'chinese'] | ||
pdf_font_path = [os.path.abspath(".\\docs\\zh\\src"),'C:\\Windows\\Fonts'] | ||
pdf_language = "zh_CN" | ||
source_encoding = "utf-8" | ||
language = "zh_CN" | ||
copyright = u'2011, Andrea Spadaccini (and the EduMIPS64 development team)' | ||
man_pages = [ | ||
('index', 'edumips64', u'EduMIPS64 Documentation', | ||
[u'Andrea Spadaccini (and the EduMIPS64 development team)'], 1) | ||
] | ||
latex_documents = [ | ||
('index', 'EduMIPS64.tex', u'EduMIPS64 Documentation', | ||
u'Andrea Spadaccini (and the EduMIPS64 development team)', 'manual'), | ||
] |
Oops, something went wrong.