[Seek Help] 求助 到底是哪里错了 Resolved
Tofloor
poster avatar
177******69
deepin
2023-05-14 19:56
Author

我想要用intltool汉化一个软件

第一步 安装intltool

sudo apt-get intltool

第二步 检查是否安装成功

intltool-extract --help

截图_选择区域_20230514114204.png

我如果没有理解错 --type=翻译项目的类型 --local=将输出文件写入当前工作目录 --srcdir=翻译项目的根目录或路径

intltool-extract --type=gettext/glade --local --srcdir=./pychess/*.glade

截图_选择区域_20230514120155.png

截图_选择区域_20230514120701.png

我的电脑信息

截图_选择区域_20230514113007.png

Reply Favorite View the author
All Replies
deepinuser17
deepin
2023-05-14 21:50
#1

argv[0] 一般是执行程序,脚本本身。 argv[1]才是被读写的文件。

Reply View the author
177******69
deepin
2023-05-14 22:11
#2
deepinuser17

argv[0] 一般是执行程序,脚本本身。 argv[1]才是被读写的文件。

改了还是不行 可以帮忙看看吗

intltool-extract.zip

Reply View the author
W2J
deepin
2023-05-14 22:36
#3

明显命令格式没用对嘛。

usage:intltool-extract [option]... file

直接试试这个 intltool-extract ./pychess/*.glade

或者这个 inttool-extract --local --srcdir=./pychess *.glade

Reply View the author
W2J
deepin
2023-05-14 22:39
#4

W2J deepin

发表于 2023-05-14 14:36

地板

明显命令格式没用对嘛。

usage:intltool-extract [option]... file

直接试试这个 intltool-extract ./pychess/*.glade

或者这个 inttool-extract --local=./ --srcdir=./pychess/ *.glade

Reply View the author
177******69
deepin
2023-05-15 00:14
#5
W2J

W2J deepin

发表于 2023-05-14 14:36

地板

明显命令格式没用对嘛。

usage:intltool-extract [option]... file

直接试试这个 intltool-extract ./pychess/*.glade

或者这个 inttool-extract --local=./ --srcdir=./pychess/ *.glade

没用

Reply View the author
donaldsebleung
deepin
2023-05-15 01:33
#6

--srcdir 应该是根目录吧,试试从 ./pychess/*.glade 改为 ./pychess/

intltool-extract --type=gettext/glade --local --srcdir=./pychess/

(我没用过 intltool-extract ,所以也只是猜测而已)

Reply View the author
W2J
deepin
2023-05-15 02:14
#7
177******69

没用

2023-05-14-屏幕截图-intltool-extract.png

你到底有没有试过,还要我帮你试才行?

Reply View the author
177******69
deepin
2023-05-15 03:31
#8
It has been deleted!
177******69
deepin
2023-05-15 03:32
#9
W2J

2023-05-14-屏幕截图-intltool-extract.png

你到底有没有试过,还要我帮你试才行?

截图_deepin-terminal_20230514193050.png
怎么说

Reply View the author
绍贝格尔
deepin
2023-05-15 17:08
#10

路径绝对路径尼

Reply View the author
177******69
deepin
2023-05-15 20:06
#11

问题被意想不到的方式解决了 使用xgettext

Reply View the author