【发布时间】:2015-07-03 10:45:32
【问题描述】:
这是我的 QML 代码:
Text {
id: helloText
//: Hello World text
//% "Hello World"
//~ Context No specific context
text: qsTrId("hello-world-id");
anchors.top: parent.top
}
摘自 Qt 文档here:
您在开发版本的用户界面中看到的“工程英语”文本用 //% 注释表示。如果不包含此内容,则文本 ID 将显示在用户界面中。
当我运行应用程序时,我看到的是hello-world-id 而不是Hello World,如文档中所述。我在这里遗漏了什么吗?
提前致谢。
【问题讨论】:
-
你加载生成的翻译文件了吗?
-
@peppe 我认为我们不会为开发构建提供翻译文件。我错了吗?
-
我也偶然发现了这一点。我也有同样的期待。从文档来看,它应该是这样工作的。
标签: qt internationalization qml qtquick2 qt-linguist