Locating need-to-translate constant strings for software internationalization

Locating need-to-translate constant strings for software internationalization
复制标题

找到需要翻译软件国际化的常量字符串

DOI:
10.1109/icse.2009.5070535
复制
发表时间:
2009
期刊:
2009 IEEE 31st International Conference on Software Engineering
影响因子:
--
通讯作者:
Jiasu Sun
Jiasu Sun
中科院分区:
--
文献类型:
--
作者:
Xiaoyin Wang;Lu Zhang;Tao Xie;Hong Mei;Jiasu Sun

文献摘要

被引文献

相似文献

现代软件应用程序需要将国际化分发到世界不同地区。在各种情况下,许多软件应用程序在开发的早期阶段没有国际化。要国际化这样一个现有的应用程序,开发人员需要将一些硬编码的常量字符串外部化到资源文件中,以便翻译人员可以轻松地将应用程序翻译成本地语言,而无需修改其源代码。由于并非所有常量字符串都需要外部化,因此定位那些需要翻译的常量字符串是开发人员必须完成的国际化任务。在本文中,我们提出了一种方法来自动定位需要翻译的常量字符串。我们的方法首先收集与图形用户界面(GUI)相关的API方法列表,然后基于字符串污点分析从这些API方法的调用中搜索需要翻译的字符串。我们在四个真实的开源应用程序上评估了我们的方法:RText,Risk,ArtOfIllusion和Megamek。结果表明,我们的方法有效地定位大多数需要翻译的常量字符串在所有四个应用程序。
Modern software applications require internationalization to be distributed to different regions of the world. In various situations, many software applications are not internationalized at early stages of development. To internationalize such an existing application, developers need to externalize some hard-coded constant strings to resource files, so that translators can easily translate the application into a local language without modifying its source code. Since not all the constant strings require externalization, locating those need-to-translate constant strings is a necessary task that developers must complete for internationalization. In this paper, we present an approach to automatically locating need-to-translate constant strings. Our approach first collects a list of API methods related to the Graphical User Interface (GUI), and then searches for need-to-translate strings from the invocations of these API methods based on string-taint analysis. We evaluated our approach on four real-world open source applications: RText, Risk, ArtOfIllusion, and Megamek. The results show that our approach effectively locates most of the need-to-translate constant strings in all the four applications.