i18n 应用程序的测试工具
对于测试国际化/本地化应用程序的工具有什么建议吗? 该应用程序的用户界面是通过网络界面。 本地化字符串存储在 xml 文件中。
此致
Any suggestion for a tool to test internationalized/ localized application? The application's UI is through web interface. The localized strings are stored in xml files.
Best regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定您到底想测试什么,但对于桌面应用程序,我正在研究一些可在菜单中使用的可翻译字符串。 这些字符串可能包含键盘快捷键,例如:“Open\tCtrl-O”。 我们需要包含键盘快捷键,因为 Ctrl-O 可能需要翻译为另一种语言的其他键盘快捷键。 然而,一些翻译者会(当然不是故意的)引入错误。 例如,它们会在 \t 和 Ctrl-O 之间包含一个空格,或者它们会翻译“Ctrl”。 我们的解决方案是创建少量单元测试,并对每种语言的每个英语字符串翻译的字符串组合运行这些测试。 因此,这是很多测试(在我们的例子中超过 50000 个),但它们运行得非常快(10 秒左右),因为它主要只是字符串比较。
我们测试以下内容:
我希望这仍然有用,因为您正在谈论 Web 应用程序,而我的经验是桌面应用程序。
I'm not sure what exactly you want to test, but for a desktop application I'm working on some of the translatable strings are for use in menu's. These strings may contain keyboard shortcuts, e.g.: "Open\tCtrl-O". We need to include the keyboard shortcut since Ctrl-O might need to be translated to some other keyboard shortcut in another language. However, some translators would (not on purpose of course) introduce bugs. For example, they would include a space between \t and Ctrl-O or they would translate the "Ctrl". Our solution was to create a small number of unit tests and run these on every English string-translated string combination for every language. So that's a lot of tests (over 50000 in our case) but they run very fast (10 seconds or so) since it's mostly just string comparisons.
We test for things like:
I hope this is still useful as you are talking about a web application and my experience is with a desktop application.
“测试”i18n 应用程序的一种方法是确保您正在处理所有特定于语言环境的行为和翻译的资源。 这通常需要制定质量保证计划。
您必须执行的步骤之一是确保根据每个区域设置正确完成货币、数字、日期、时间或其他度量单位的格式设置。 据我所知,没有特定的工具可以检查这一点。
另一个方面是确保所有用户可见的字符串确实不在代码和资源包中,无论是哪种类型(从 .properties 到 .po 到 .xml ...选择范围很大)。 一些 QA 团队设置了“伪本地化”策略,这意味着创建的资源包中包含原始字符串,但带有前缀和后缀“特殊”字符,例如日语平假名。 然后使用伪语言环境调用应用程序会显示带有前缀和后缀的所有字符串,同时允许开发人员查看缺少的内容(没有平假名的字符串)以及布局管理的行为方式(裁剪不应裁剪的文本)。
有很多工具可以做到这一点,例如 Lingoport 的 Globalyzer,它通常处理 i18n,伪本地化是其中的一部分(在菜单中,它实际上称为“PseudoJudo”)。 它允许将文本增长给定的百分比,仅将前缀或仅后缀或两者都附加到原始字符串。
希望这至少部分地回答了您的问题。
One way to 'test' an i18n application is to make sure you are addressing all the locale specific behaviors and translated resources. This usually requires setting up a QA plan.
Among the steps you'll have to perform is making sure the formatting of currency, numbers, dates, times or other measurements are done properly, based on each locale. There is not specific tool that I know of to check for that.
Another aspect is to make sure all the user visible strings are indeed out of the code and in the resource bundles, whichever type that may be (from .properties to .po to .xml ... the choice is large). Some QA team set up a 'pseudo-localization' strategy, meaning a resource bundle is created with the original strings in it but with prefix and suffix 'special' characters, such as Japanese Hiragana's for instance. Then invoking the application with the pseudo locale shows all the strings with the prefix and suffix while allowing the developer to see what is missing (those strings without the hiragana's) and how the layout management is behaving (cropping text which it should not).
There are a number of tools to do that, like Globalyzer from Lingoport which deals with i18n in general and the pseudo localization is one part of it (in the menus, it's actually called "PseudoJudo"). It allows to grow the text by a given percentage, have only the prefix or only the suffix or both appended to the original string.
Hope that answers your question, at least partly.