Skip to content

Commit

Permalink
Merge branch 'master' into loongarch
Browse files Browse the repository at this point in the history
  • Loading branch information
xry111 committed Jan 2, 2024
2 parents a6f0dcf + 2a6b762 commit 278a919
Show file tree
Hide file tree
Showing 133 changed files with 14,115 additions and 14,269 deletions.
194 changes: 82 additions & 112 deletions .github/workflows/book.yml

Large diffs are not rendered by default.

19 changes: 5 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,29 +72,20 @@ pdf: booksrc

booksrc: $(MBOOK_FILES) $(ORIG_FILES) $(MLANG)/book/version.ent

$(MLANG)/book/tidy.conf: $(LFS_EN)/tidy.conf $(MLANG)/lang.mk
mkdir -pv $(@D)
sed -e '/output-encoding:/s|latin1|$(M_ENCODING_ALT)|' $< > $@

# $(MLANG)/book is not a git repo, so we need to generate the version info
# now and silence git-version.sh. lang.mk SHALL contain the recipe for
# git-version-l10n.sh.
# now and silence git-version.sh. lang.mk SHALL contain the recipe to
# localize git-version.sh.
#
# The content of version.ent does not depend on REV, so just say "sysv"
# here.
.PHONY: version
version: $(MLANG)/book/git-version-l10n.sh
cd $(<D); \
GIT_DIR=$(PWD)/$(LFS_EN)/.git ./git-version-l10n.sh sysv
version: $(MLANG)/book/git-version.sh
cd $(<D); rm LFS-RELEASE; \
DIST=./LFS-RELEASE GIT_DIR=$(PWD)/$(LFS_EN)/.git ./$(<F) sysv
rm -fv $(MLANG)/book/conditional.ent

$(MLANG)/book/version.ent: version; true

$(MLANG)/book/git-version.sh: $(LFS_EN)/git-version.sh
mkdir -pv "$(@D)"
sed '/git.status/,$$ d' $< > $@
chmod -v 755 $@

$(MXML_FILES) &: $(XML_FILES) $(PO_FILES) mkpo4acfg.py po4a_issue295.sh
mkdir -pv $(POT_DIRS)
$(MKPO4ACFG) $(XML_FILES) > po4a.cfg
Expand Down
File renamed without changes.
File renamed without changes.
20 changes: 10 additions & 10 deletions changelogtranslator.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,33 @@

tt = TemplateTranslator(files)

tt.append(re.compile('\[([^\]]+)\] - Updated? to ([^ ]+)\. +Fixes (<ulink [^>]+> *#[0-9]+ *</ulink>).?$', re.MULTILINE|re.DOTALL),
tt.append(re.compile(r'\[([^\]]+)\] - Updated? to ([^ ]+)\. +Fixes (<ulink [^>]+> *#[0-9]+ *</ulink>).?$', re.MULTILINE|re.DOTALL),
{'fr': '[#1] — Mise à jour vers #2. Corrige #3',
'zh_CN': '[#1] — 更新到 #2。修复 #3。'})
tt.append(re.compile('\[([^\]]+)\] - Updated? to ([^ ]+)\. +Partially fixes (<ulink [^>]+> *#[0-9]+ *</ulink>).?$', re.MULTILINE|re.DOTALL),
tt.append(re.compile(r'\[([^\]]+)\] - Updated? to ([^ ]+)\. +Partially fixes (<ulink [^>]+> *#[0-9]+ *</ulink>).?$', re.MULTILINE|re.DOTALL),
{'fr': '[#1] — Mise à jour vers #2. Corrige partiellement #3',
'zh_CN': '[#1] — 更新到 #2。部分修复 #3。'})
tt.append(re.compile('\[([^\]]+)\] - Updated? to ([^ ]+) (\([^ ]+\))\. +Fixes (<ulink [^>]+> *#[0-9]+ *</ulink>).?$', re.MULTILINE|re.DOTALL),
tt.append(re.compile(r'\[([^\]]+)\] - Updated? to ([^ ]+) (\([^ ]+\))\. +Fixes (<ulink [^>]+> *#[0-9]+ *</ulink>).?$', re.MULTILINE|re.DOTALL),
{'fr': '[#1] — Mise à jour vers #2 #3. Corrige #4',
'zh_CN': '[#1] — 更新到 #2 #3。修复#4。'})
tt.append(re.compile('\[([^\]]+)\] - Updated? to ([^ ]+) \(([^ ]+) module\)\. +Fixes (<ulink [^>]+> *#[0-9]+ *</ulink>).?$', re.MULTILINE|re.DOTALL),
tt.append(re.compile(r'\[([^\]]+)\] - Updated? to ([^ ]+) \(([^ ]+) module\)\. +Fixes (<ulink [^>]+> *#[0-9]+ *</ulink>).?$', re.MULTILINE|re.DOTALL),
{'fr': '[#1] — Mise à jour vers #2 (module #3). Corrige #4',
'zh_CN': '[#1] — 更新到 #2 (模块 #3)。修复 #4。'})
tt.append(re.compile('\[([^\]]+)\] - Updated? to ([^ ]+) \([sS]ecurity [fF]ix(es)?\)\. +Fixes (<ulink [^>]+> *#[0-9]+ *</ulink>).?$', re.MULTILINE|re.DOTALL),
tt.append(re.compile(r'\[([^\]]+)\] - Updated? to ([^ ]+) \([sS]ecurity [fF]ix(es)?\)\. +Fixes (<ulink [^>]+> *#[0-9]+ *</ulink>).?$', re.MULTILINE|re.DOTALL),
{'fr': '[#1] — Mise à jour vers #2 (mise à jour de sécurité). Corrige #4',
'zh_CN': '[#1] — 更新到 #2 (修复安全问题)。修复 #4。'})
tt.append(re.compile('\[([^\]]+)\] - Updated? to ([^ ]+) \([sS]ecurity [fF]ix(es)?\)\. +Addresses (<ulink [^>]+> *#[0-9]+ *</ulink>).?$', re.MULTILINE|re.DOTALL),
tt.append(re.compile(r'\[([^\]]+)\] - Updated? to ([^ ]+) \([sS]ecurity [fF]ix(es)?\)\. +Addresses (<ulink [^>]+> *#[0-9]+ *</ulink>).?$', re.MULTILINE|re.DOTALL),
{'fr': '[#1] — Mise à jour vers #2 (mise à jour de sécurité). Corrige #4',
'zh_CN': '[#1] — 更新到 #2 (修复安全问题)。处理 #4。'})
tt.append(re.compile('\[([^\]]+)\] - Updated? to ([^ ]+) \([sS]ecurity [uU]pdate(s)?\)\. +Fixes (<ulink [^>]+> *#[0-9]+ *</ulink>).?$', re.MULTILINE|re.DOTALL),
tt.append(re.compile(r'\[([^\]]+)\] - Updated? to ([^ ]+) \([sS]ecurity [uU]pdate(s)?\)\. +Fixes (<ulink [^>]+> *#[0-9]+ *</ulink>).?$', re.MULTILINE|re.DOTALL),
{'fr': '[#1] — Mise à jour vers #2 (mise à jour de sécurité). Corrige #4',
'zh_CN': '[#1] — 更新到 #2 (安全更新)。修复 #4。'})
tt.append(re.compile('\[([^\]]+)\] - Updated? to ([^ ]+)\. +Addresses (<ulink [^>]+> *#[0-9]+ *</ulink>).?$', re.MULTILINE|re.DOTALL),
tt.append(re.compile(r'\[([^\]]+)\] - Updated? to ([^ ]+)\. +Addresses (<ulink [^>]+> *#[0-9]+ *</ulink>).?$', re.MULTILINE|re.DOTALL),
{'fr': '[#1] — Mise à jour vers #2. Traiter #3',
'zh_CN': '[#1] — 更新到 #2。处理 #3。'})
tt.append(re.compile('\[([^\]]+)\] - Updated? to ([^ ]+) \(Python [mM]odule\)\. +Fixes (<ulink [^>]+> *#[0-9]+ *</ulink>).?$', re.MULTILINE|re.DOTALL),
tt.append(re.compile(r'\[([^\]]+)\] - Updated? to ([^ ]+) \(Python [mM]odule\)\. +Fixes (<ulink [^>]+> *#[0-9]+ *</ulink>).?$', re.MULTILINE|re.DOTALL),
{'zh_CN': '[#1] — 更新到 #2 (Python 模块)。修复 #3。'})
tt.append(re.compile('(20[0-9]{2})-(0?)([0-9]+)-(0?)([0-9]+)'),
tt.append(re.compile(r'(20[0-9]{2})-(0?)([0-9]+)-(0?)([0-9]+)'),
{'fr': '#4#5-#2#3-#1',
'zh_CN': '#1 年 #3 月 #5 日'})

Expand Down
3 changes: 3 additions & 0 deletions check-translations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ for i in $(find -name \*.po); do
if msgfmt -v $i -o /dev/null 2>&1 | tee msg | grep -E -v '^[0-9]+ translated message(s?).$' > /dev/null; then
echo -n "$i: "
cat msg
if [ "$GITHUB_ACTIONS" = "true" ]; then
cat $i
fi
exitcode=1
fi
done
Expand Down
5 changes: 4 additions & 1 deletion mkpo4acfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@

pfx = 'lfs-en/'

for xml_en in sys.argv[2:]:
files = sys.argv[2:]
files.sort()

for xml_en in files:
if xml_en[:len(pfx)] != pfx or xml_en[-4:] != '.xml':
raise Exception("unexpected path " + xml_en)
out = "$lang:$lang/book/" + xml_en[len(pfx):]
Expand Down
101 changes: 51 additions & 50 deletions zh_CN/appendices/acronymlist.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Linux From Scratch 11.4\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2022-09-17 20:27+0800\n"
"POT-Creation-Date: 2023-09-18 16:58+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Xi Ruoyao <[email protected]>\n"
"Language-Team: none\n"
Expand All @@ -14,55 +14,6 @@ msgstr ""
"X-Pootle-Path: /zh_CN/lfs/appendices/acronymlist.po\n"
"X-Generator: Translate Toolkit 2.2.5\n"

# #-#-#-#-# perl.po (Linux From Scratch 11.4) #-#-#-#-#
#
#
#
#. type: Content of: <sect1><sect2><variablelist>
#: lfs-en/chapter05/linux-headers.xml lfs-en/chapter08/pkgconfig.xml
#: lfs-en/chapter08/findutils.xml lfs-en/chapter08/file.xml
#: lfs-en/chapter08/intltool.xml lfs-en/chapter08/grep.xml
#: lfs-en/chapter08/libtool.xml lfs-en/chapter08/wheel.xml
#: lfs-en/chapter08/sed.xml lfs-en/chapter08/expect.xml lfs-en/chapter08/bc.xml
#: lfs-en/chapter08/xml-parser.xml lfs-en/chapter08/sysklogd.xml
#: lfs-en/chapter08/attr.xml lfs-en/chapter08/psmisc.xml
#: lfs-en/chapter08/gcc.xml lfs-en/chapter08/m4.xml lfs-en/chapter08/bash.xml
#: lfs-en/chapter08/gmp.xml lfs-en/chapter08/systemd.xml
#: lfs-en/chapter08/mpc.xml lfs-en/chapter08/coreutils.xml
#: lfs-en/chapter08/tar.xml lfs-en/chapter08/kbd.xml lfs-en/chapter08/kmod.xml
#: lfs-en/chapter08/iproute2.xml lfs-en/chapter08/bison.xml
#: lfs-en/chapter08/expat.xml lfs-en/chapter08/readline.xml
#: lfs-en/chapter08/acl.xml lfs-en/chapter08/diffutils.xml
#: lfs-en/chapter08/sysvinit.xml lfs-en/chapter08/ninja.xml
#: lfs-en/chapter08/eudev.xml lfs-en/chapter08/autoconf.xml
#: lfs-en/chapter08/texinfo.xml lfs-en/chapter08/zlib.xml
#: lfs-en/chapter08/libpipeline.xml lfs-en/chapter08/openssl.xml
#: lfs-en/chapter08/mpfr.xml lfs-en/chapter08/libelf.xml
#: lfs-en/chapter08/automake.xml lfs-en/chapter08/inetutils.xml
#: lfs-en/chapter08/python.xml lfs-en/chapter08/tcl.xml
#: lfs-en/chapter08/perl.xml lfs-en/chapter08/gzip.xml
#: lfs-en/chapter08/less.xml lfs-en/chapter08/man-pages.xml
#: lfs-en/chapter08/iana-etc.xml lfs-en/chapter08/ncurses.xml
#: lfs-en/chapter08/make.xml lfs-en/chapter08/flex.xml lfs-en/chapter08/xz.xml
#: lfs-en/chapter08/grub.xml lfs-en/chapter08/check.xml
#: lfs-en/chapter08/e2fsprogs.xml lfs-en/chapter08/libffi.xml
#: lfs-en/chapter08/binutils.xml lfs-en/chapter08/gdbm.xml
#: lfs-en/chapter08/bzip2.xml lfs-en/chapter08/zstd.xml
#: lfs-en/chapter08/gettext.xml lfs-en/chapter08/procps.xml
#: lfs-en/chapter08/vim.xml lfs-en/chapter08/meson.xml
#: lfs-en/chapter08/glibc.xml lfs-en/chapter08/dbus.xml
#: lfs-en/chapter08/dejagnu.xml lfs-en/chapter08/patch.xml
#: lfs-en/chapter08/shadow.xml lfs-en/chapter08/util-linux.xml
#: lfs-en/chapter08/libcap.xml lfs-en/chapter08/gawk.xml
#: lfs-en/chapter08/gperf.xml lfs-en/chapter08/man-db.xml
#: lfs-en/chapter08/groff.xml lfs-en/appendices/acronymlist.xml
#: lfs-en/chapter10/kernel.xml lfs-en/prologue/standards.xml
#: lfs-en/chapter09/bootscripts.xml
msgid ""
"<?dbfo list-presentation=\"list\"?> <?dbhtml list-presentation=\"table\"?>"
msgstr ""
"<?dbfo list-presentation=\"list\"?> <?dbhtml list-presentation=\"table\"?>"

#. type: Attribute 'xreflabel' of: <appendix>
#: lfs-en/appendices/acronymlist.xml
msgid "Appendix A"
Expand All @@ -73,6 +24,56 @@ msgstr "附录 A"
msgid "Acronyms and Terms"
msgstr "缩写和术语"

# #-#-#-#-# perl.po (Linux From Scratch 11.4) #-#-#-#-#
#
#
#
#. type: Content of: <sect1><variablelist>
#: lfs-en/appendices/acronymlist.xml lfs-en/chapter05/linux-headers.xml
#: lfs-en/chapter08/acl.xml lfs-en/chapter08/attr.xml
#: lfs-en/chapter08/autoconf.xml lfs-en/chapter08/automake.xml
#: lfs-en/chapter08/bash.xml lfs-en/chapter08/bc.xml
#: lfs-en/chapter08/binutils.xml lfs-en/chapter08/bison.xml
#: lfs-en/chapter08/bzip2.xml lfs-en/chapter08/check.xml
#: lfs-en/chapter08/coreutils.xml lfs-en/chapter08/dbus.xml
#: lfs-en/chapter08/dejagnu.xml lfs-en/chapter08/diffutils.xml
#: lfs-en/chapter08/e2fsprogs.xml lfs-en/chapter08/expat.xml
#: lfs-en/chapter08/expect.xml lfs-en/chapter08/file.xml
#: lfs-en/chapter08/findutils.xml lfs-en/chapter08/flex.xml
#: lfs-en/chapter08/gawk.xml lfs-en/chapter08/gcc.xml lfs-en/chapter08/gdbm.xml
#: lfs-en/chapter08/gettext.xml lfs-en/chapter08/glibc.xml
#: lfs-en/chapter08/gmp.xml lfs-en/chapter08/gperf.xml
#: lfs-en/chapter08/grep.xml lfs-en/chapter08/groff.xml
#: lfs-en/chapter08/grub.xml lfs-en/chapter08/gzip.xml
#: lfs-en/chapter08/iana-etc.xml lfs-en/chapter08/inetutils.xml
#: lfs-en/chapter08/intltool.xml lfs-en/chapter08/iproute2.xml
#: lfs-en/chapter08/kbd.xml lfs-en/chapter08/kmod.xml lfs-en/chapter08/less.xml
#: lfs-en/chapter08/libcap.xml lfs-en/chapter08/libelf.xml
#: lfs-en/chapter08/libffi.xml lfs-en/chapter08/libpipeline.xml
#: lfs-en/chapter08/libtool.xml lfs-en/chapter08/libxcrypt.xml
#: lfs-en/chapter08/m4.xml lfs-en/chapter08/make.xml
#: lfs-en/chapter08/man-db.xml lfs-en/chapter08/man-pages.xml
#: lfs-en/chapter08/meson.xml lfs-en/chapter08/mpc.xml
#: lfs-en/chapter08/mpfr.xml lfs-en/chapter08/ncurses.xml
#: lfs-en/chapter08/ninja.xml lfs-en/chapter08/openssl.xml
#: lfs-en/chapter08/patch.xml lfs-en/chapter08/perl.xml
#: lfs-en/chapter08/pkgconf.xml lfs-en/chapter08/procps.xml
#: lfs-en/chapter08/psmisc.xml lfs-en/chapter08/python.xml
#: lfs-en/chapter08/readline.xml lfs-en/chapter08/sed.xml
#: lfs-en/chapter08/shadow.xml lfs-en/chapter08/sysklogd.xml
#: lfs-en/chapter08/systemd.xml lfs-en/chapter08/sysvinit.xml
#: lfs-en/chapter08/tar.xml lfs-en/chapter08/tcl.xml
#: lfs-en/chapter08/texinfo.xml lfs-en/chapter08/udev.xml
#: lfs-en/chapter08/util-linux.xml lfs-en/chapter08/vim.xml
#: lfs-en/chapter08/wheel.xml lfs-en/chapter08/xml-parser.xml
#: lfs-en/chapter08/xz.xml lfs-en/chapter08/zlib.xml lfs-en/chapter08/zstd.xml
#: lfs-en/chapter09/bootscripts.xml lfs-en/chapter10/kernel.xml
#: lfs-en/prologue/standards.xml
msgid ""
"<?dbfo list-presentation=\"list\"?> <?dbhtml list-presentation=\"table\"?>"
msgstr ""
"<?dbfo list-presentation=\"list\"?> <?dbhtml list-presentation=\"table\"?>"

#. type: Content of: <appendix><variablelist><varlistentry><term>
#: lfs-en/appendices/acronymlist.xml
msgid "<emphasis role=\"bold\">ABI</emphasis>"
Expand Down
Loading

0 comments on commit 278a919

Please sign in to comment.