Browse Source

use a better way to apply lfs-l10n.xml setting

Xℹ Ruoyao 4 years ago
parent
commit
5b1639d007
2 changed files with 2 additions and 10 deletions
  1. 2 0
      zh_CN/fix.sh
  2. 0 10
      zh_CN/patches/Makefile.patch

+ 2 - 0
zh_CN/fix.sh

@@ -12,6 +12,8 @@ sed -e '/output-encoding:/s|latin1|utf8|' -i tidy.conf
 # Remove two seds causing encoding error in UTF-8
 sed -e '/xa9/d' -i Makefile
 
+sed -e 's|<book>|<book lang="zh_cn">|' -i index.xml
+
 sed -e '/xreflabel/s|Chapter.nbsp.1 - Mailing Lists|第 1 章 - 邮件列表|' \
 	-e '/xreflabel/s|Chapter.nbsp.1 - Mirror sites|第 1 章 - 镜像站|'    \
 	-i chapter01/resources.xml

+ 0 - 10
zh_CN/patches/Makefile.patch

@@ -1,10 +0,0 @@
-diff -uNr book/Makefile book.new/Makefile
---- book/Makefile	2020-06-17 14:58:22.430567779 +0800
-+++ book.new/Makefile	2020-06-17 16:13:58.927092133 +0800
-@@ -40,6 +40,7 @@
-       --stringparam chunk.quietly $(CHUNK_QUIET) \
-       --stringparam rootid "$(ROOT_ID)"          \
-       --stringparam base.dir $(BASEDIR)/         \
-+      --stringparam l10n.gentext.default.language "zh_cn"         \
-       stylesheets/lfs-chunked.xsl                \
-       $(RENDERTMP)/lfs-html.xml