While open source communities attract diverse contributors across the globe, only a few open source software repositories provide essential documentation, such as ReadMe or CONTRIBUTING files, in languages other than English. Recently, large language models (LLMs) have demonstrated remarkable capabilities in a variety of software engineering tasks. We have also seen advances in the use of LLMs for translations in other domains and contexts. Despite this progress, little is known regarding the capabilities of LLMs in translating open-source technical documentation, which is often a mixture of natural language, code, URLs, and markdown formatting. To better understand the need and potential for LLMs to support translation of technical documentation in open source, we conducted an empirical evaluation of translation activity and translation capabilities of two powerful large language models (OpenAI ChatGPT 4 and Anthropic Claude). We found that translation activity is often community-driven and most frequent in larger repositories. A comparison of LLM performance as translators and evaluators of technical documentation suggests LLMs can provide accurate semantic translations but may struggle preserving structure and technical content. These findings highlight both the promise and the challenges of LLM-assisted documentation internationalization and provide a foundation towards automated LLM-driven support for creating and maintaining open source documentation.
翻译:尽管开源社区吸引了全球多元化的贡献者,但仅有少数开源软件仓库提供英语之外的其他语言版本的必要文档,例如ReadMe或CONTRIBUTING文件。近年来,大型语言模型(LLMs)已在各类软件工程任务中展现出卓越能力。我们也观察到LLMs在其他领域和场景中翻译应用方面的进展。尽管取得这些进步,但关于LLMs在翻译开源技术文档方面的能力仍知之甚少,此类文档通常是自然语言、代码、URL和Markdown格式的混合体。为深入理解LLMs支持开源技术文档翻译的需求与潜力,我们对翻译活动及两种强大大型语言模型(OpenAI ChatGPT 4与Anthropic Claude)的翻译能力进行了实证评估。研究发现,翻译活动通常由社区驱动,且在大型仓库中最为频繁。通过比较LLMs作为技术文档翻译器与评估器的表现,表明LLMs能够提供准确的语义翻译,但在保持文档结构与技术内容方面可能存在困难。这些发现既揭示了LLM辅助文档国际化的前景,也指出了其面临的挑战,为构建自动化LLM驱动的开源文档创建与维护支持体系奠定了基础。