itstool
1.1、itstool简介
是什么 ?:a tool that allows you to translate your XML documents with PO files, using rules from the W3C Internationalization Tag Set (ITS) to determine what to translate and how to separate it into PO file messages.
开发语言:Python
官方主页:http://itstool.org
源码仓库:https://github.com/itstool/itstool
1.2、通过包管理器安装itstool
操作系统包管理器安装命令
Allpippip install itstool
macOSHomeBrewbrew install itstool
GNU/LinuxHomeBrewbrew install itstool
aptsudo apt-get install -y itstoolc
CentOSyumsudo yum install -y itstool
dnfsudo dnf install -y itstool
openSUSEzyppersudo zypper install -y itstool
Alpine Linuxapksudo apk add itstool

Arch Linux

ArcoLinux

Manjaro Linux

pacmansudo pacman -Syyu --noconfirm
sudo pacman -S    --noconfirm itstool
Gentoo LinuxPortagesudo emerge itstool
1.3、通过编译源码安装itstool 

step1、安装依赖

所有时Terminal + Shell + GNU CoreUtils
下载时cURL
解压时tar + bzip2
编译时CPythonlibxml2)、gmake
运行时CPythonlibxml2

step2、使用curl命令下载源码包 (

curl -LO http://files.itstool.org/itstool/itstool-2.0.6.tar.bz2

step3、使用tar解压itstool源码包

tar vxf itstool-2.0.6.tar.bz2

step4、进入itstool-2.0.6目录

cd itstool-2.0.6

step5、查看itstool-2.0.6目录的内容

step6、创建构建目录,并进入该目录

mkdir build && cd build

step7、使用../configure配置编译参数

../configure是一个可执行的POSIX sh脚本,用它 配置后会产生gmake的配置文件Makefile

../configure的使用格式如下:

../configure [option]... [VAR=VALUE]...
option说明
--help    | -h查看../configure的使用帮助
--version | -V查看../configure是哪个版本的autoconf生成的
--quiet   | -q | --silent不输出checking...这些信息
--prefix=DIR指定安装目录。默认是/usr/local/
--enable-FEATURE[=yes|no]
yes:开启FEATURE
no: 关闭FEATURE
--enable-option-checking[=yes|no]是否检查有无不认识的--enable-FEATURE--with-PACKAGE参数
--enable-silent-rules[=yes|no]
yes:相当于make V=0
no: 相当于make V=1

enable-FEATURE对应的选项,还有disable-FEATUREdisable-FEATURE相当于enable-FEATURE=no

VARVALUE示例说明
PYTHONpython3 | /usr/bin/python3Python解释器命令或者命令完整路径

示例:

../configure --prefix=/usr PYTHON=/usr/local/bin/python3

step8、使用make命令进行编译、安装

make && sudo make install
1.4、itstool命令