Pootle - 导出属性文件时出现问题
我正在使用 pootle 进行本地化。
我从 Java 属性文件导入了源翻译。
属性文件看起来像:
STR_TEXT1 = Hello
比我导入其他语言文件。我付钱给翻译人员翻译其他语言。 现在我需要将这些翻译从 pootle 导出回 JAVA 属性文件。问题是,它会随机将其导出为 UTF8,其他时间则为 \uXXXX 转义编码。无法设置导出文件的编码。第二个问题是,这些导出文件已损坏。它使它们像许多行一样没有问题,并且某些行被剪切,如下所示:
STR_TEXT1 = HELLSTR_TEXT2 = bye
比我不小心从 /po/my_project 目录中删除了属性文件。当我这样做时,导出停止工作。但所有翻译在 pootle 网上仍然可见。所以,我想这些翻译保存在其他一些文件中,也许是 mo 文件。有没有办法将这些翻译转换为 java 属性文件?如何强制 pootle 用 pootle 的新文本替换原始属性文件中的原始文本?
I am using pootle for localization.
I imported source translations from Java properties files.
the property file looks like:
STR_TEXT1 = Hello
Than I imported other language files. I paid translators to translate those other languages.
Now I need to export those translations from pootle back to JAVA property files. Problem is, that it randomly exports it to UTF8 other time to to \uXXXX escape Encoding. There is no way how to setup the encoding for export files. Second problem is, that those export files are corrupted. It renders them like many rows without problem and some rows are cut, like this:
STR_TEXT1 = HELLSTR_TEXT2 = bye
Than I accidently deleted property files from /po/my_project directory. When I did this, exports stoped to work. But all translations are still wisible on the pootle web. So, i suppose those translations are saved in some other files, maybe mo files. Is there a way how to get those translations to java property files? how to force pootle to replace those original texts from original property files by fresh texts from pootle?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Pootle 应该将文件导出为 Latin1 而不是 UTF-8,它将使用 \uXXXX 语法转义非拉丁字符。较新的 Pootle 允许您以 UTF-8 格式导出。
最好的方法是将您的源文件和翻译后的文件附加到 bugs.locamotion.org 上的错误,以便 Pootle开发人员可以查看您的源文件。
翻译保存在数据库中。 Pootle 使用模板文件(通常是 en.properties)来创建翻译版本。我还没有测试过如果删除这个模板文件会发生什么。
Pootle should export you files as Latin1 not UTF-8, it will escape non-Latin characters using \uXXXX syntax. Newer Pootle's allow you to export in UTF-8.
The best is to attach your source and translated files to a bug over at bugs.locamotion.org so that the Pootle developers can look at your source files.
The translations are kept in a database. Pootle makes use of you template file usually en.properties to create translated versions. I haven't tested what happens if you delete this template file.