解决 lupdate warning: no TS files specified.

简介: 解决 lupdate warning: no TS files specified.

环境:linux


情景:使用QT语言家的时候,在.pro文件中添加声明后,点击工具-外部-Qt Quick-更新后不生成.ts文件,编译提示如标题显示。


解决方法:命令行使用命令生成.ts文件,再用命令将.ts文件翻译为.qm文件


具体步骤:


1.项目中添加配置信息【很重要】


.pro文件中添加如下:(如果你的pro名字为hello.pro)


1)如果你只有一个翻译文件

TRANSLATIONS += zh_CN.ts  

2)如果你有两个以上翻译文件,用 \ 隔开

1. TRANSLATIONS += zh_CN.ts  \
2.         bo_CN.ts

2.生成.ts文件命令:

lupdate hello.pro

此时应该在项目中自动生成两个.ts文件

3.生成.qm文件命令:

1. lrelease zh_CN.ts -qm zh_CN.qm
2. lrelease bo_CN.ts -qm bo_CN.qm

此时项目中应该多生成两个.qm文件

相关文章
target\surefire-reports for the individual test results
target\surefire-reports for the individual test results
829 0
|
6月前
|
关系型数据库 MySQL Linux
FATAL ERROR: Could not find my_print_defaults
FATAL ERROR: Could not find my_print_defaults
187 0
error: Your local changes to the following files would be overwritten by merge
error: Your local changes to the following files would be overwritten by merge
|
Unix Linux 异构计算
成功解决 ERROR: An error occurred while performing the step: “Building kernel modules“. See /var/log/nv
成功解决 ERROR: An error occurred while performing the step: “Building kernel modules“. See /var/log/nv
成功解决 ERROR: An error occurred while performing the step: “Building kernel modules“. See  /var/log/nv
​Error -4075: File not found. An error occurred merging module <MODULENAME> for feature <FEATURENAME>.
​Error -4075: File not found. An error occurred merging module <MODULENAME> for feature <FEATURENAME>.
126 0
​Error -4075: File not found. An error occurred merging module <MODULENAME> for feature <FEATURENAME>.
|
物联网 测试技术 索引
[20180609]Wrong Results with IOT, Added Column and Secondary Index2.txt
[20180609]Wrong Results with IOT, Added Column and Secondary Index2.txt --//链接:http://db-oriented.
1148 0
|
物联网 测试技术 索引
[20180608]Wrong Results with IOT, Added Column and Secondary Index.txt
[20180608]Wrong Results with IOT, Added Column and Secondary Index.txt --//链接:http://db-oriented.
1091 0

热门文章

最新文章