【新手求救】如何将汉化语言包,添加进程序
Tofloor
poster avatar
naix
deepin
2019-04-26 06:25
Author
需要汉化easystroke鼠标手势
有两个汉化文件

easystroke-zh_CN.po
zh_CN_LC_MESSAGES_easystroke.mo
如何添加进程序

Reply Favorite View the author
All Replies
avatar
WENWEN
deepin
2019-04-26 16:26
#1
估计需要重新编译吧   @zuzi 大佬
Reply View the author
avatar
Guumi
deepin
2019-04-26 17:01
#2
一般是查看软件语言包的位置,再根据命名规则重新命名,如果不行就替换已有的可用的文件名。如果没有语言包文件夹的话,就需要二次编译了。。。
Reply View the author
avatar
snyh1010
deepin
2019-04-26 17:04
#3
是这个软件吗?  它本身已经有中文的po文件了。

如果不是的话,一般都是把翻译文件提交给上游,由上游合并发布。

如果都不行的话,可以手动编译po到mo,然后放到对应的目录下。
一般都是放在这个目录下
  1. find /usr/share/locale | grep easystroke
Copy the Code


当然有些叛逆的软件也会选择其他路径,可以通过
  1. strace -f -e open easystroke
Copy the Code
去查看实际加载的mo文件路径。


po->mo的转换可以通过  
  1. msgfmt messages.po -o messages.mo
Copy the Code

或者直接在线转换 https://po2mo.net/
Reply View the author
avatar
naix
deepin
2019-04-26 17:46
#4
本帖最后由 naix 于 2019-4-26 10:07 编辑
https://bbs.deepin.org/post/177157
是这个软件吗?  它本身已经有中文的po文件了。

如果不是的话,一般都是把翻译文件提交给上游,由上游合并 ...



$ find /usr/share/locale | grep easystroke
/usr/share/locale/zh_CN/LC_MESSAGES/easystroke.mo

从终端中看,早有编译好的MO文件。
但界面无法加载中文

是否原因是,我的 /etc/locale.conf 文件没设定好?
我的locale.conf 只配置一行,easystroke没识别出
-----------------------------
  LANG=en_US.UTF-8
-----------------------------


还是其他问题导致无法加载

Reply View the author
avatar
naix
deepin
2019-04-26 18:35
#5
在线等
Reply View the author
avatar
WangZhongyun
deepin
2019-04-26 18:43
#6
有些要到软件设置里选择
Reply View the author
avatar
qq420100523
deepin
2019-04-26 18:53
#7
easystroke可以在deepin中使用?我之前安装过,用不了
Reply View the author
avatar
naix
deepin
2019-04-26 19:08
#8
https://bbs.deepin.org/post/177157
easystroke可以在deepin中使用?我之前安装过,用不了

我在ARCH+DEEPIN DE下可以使用,就是界面无法中文
Reply View the author
avatar
snyh1010
deepin
2019-04-26 20:14
#9
加上
  1. LC_MESSAGE=zh_CN.UTF-8 LANGUAGE=zh_CN
Copy the Code

到easystroke或者~/.bashrc中
Reply View the author
avatar
naix
deepin
2019-04-26 20:39
#10
https://bbs.deepin.org/post/177157
加上

到easystroke或者~/.bashrc中

到easystroke或者~/.bashrc中

不知道怎样去做,新手,请多指教
Reply View the author
avatar
naix
deepin
2019-04-27 00:41
#11
https://bbs.deepin.org/post/177157
加上

到easystroke或者~/.bashrc中

是不是要给程序权限

如何给程序权限
Reply View the author
avatar
snyh1010
deepin
2019-04-28 16:55
#12
https://bbs.deepin.org/post/177157
是不是要给程序权限

如何给程序权限

这两个是环境变量,设置环境变量就好了。

你用archlinux的话,这些基础是必备的。 更细节的东西只能靠你自己去了解

https://wiki.archlinux.org/index.php/Environment_variables_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)
Reply View the author
avatar
snyh1010
deepin
2019-04-28 16:58
#13
https://bbs.deepin.org/post/177157
是不是要给程序权限

如何给程序权限

这两个是环境变量,设置环境变量就好了。

你用archlinux的话,这些基础是必备的。 更细节的东西只能靠你自己去了解

https://wiki.archlinux.org/index.php/Environment_variables_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)
Reply View the author