fix.sh 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. #!/bin/sh
  2. # fix English text in xreflabels which can not be handled by po4a
  3. # This should be handled by po4a, but if some pages are not done yet
  4. # we will need to do it manually.
  5. sed -e '/encoding=/s|ISO-8859-1|UTF-8|' -i $(find -name \*.xml)
  6. sed -e '/xreflabel/s|Chapter.nbsp.1 - Mailing Lists|第 1 章 - 邮件列表|' \
  7. -e '/xreflabel/s|Chapter.nbsp.1 - Mirror sites|第 1 章 - 镜像站|' \
  8. -i chapter01/resources.xml
  9. sed -e '/xreflabel/s|Chapter.nbsp.\([0-9]\+\)|第 \1 章|' \
  10. -i chapter*/chapter*.xml
  11. sed -e '/xreflabel/s|Host System Requirements|宿主系统需求|' \
  12. -i chapter02/hostreqs.xml
  13. sed -e '/xreflabel/s|General Compilation Instructions|通用编译说明|' \
  14. -i part3intro/generalinstructions.xml
  15. sed -e '/xreflabel/s|Toolchain Technical Notes|工具链技术说明|' \
  16. -i part3intro/toolchaintechnotes.xml
  17. sed -e '/xreflabel/s|Appendix|附录|' -i \
  18. appendices/acknowledgments.xml \
  19. appendices/acronymlist.xml \
  20. appendices/dependencies.xml \
  21. appendices/license.xml \
  22. appendices/scripts.xml \
  23. appendices/udev-rules.xml