保持i18n资源同步 [英] Keeping i18n resources synced

查看:119
本文介绍了保持i18n资源同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找i18n属性文件的编辑器/比较器,它可以帮助我保持不同的语言文件同步。

I am looking for an editor/comparator for i18n property files that would help me keep different language files in sync.

基本上,可以比较一堆a属性文件并显示特定语言中没有哪些键。

Basically, something that would compare a bunch a of property files and show which keys are not present in a particular language.

属性看起来像

component.titlepage.title = hello world

一个简单的差异是不可能的,因为右边的语言与另一种语言不同。

A simple diff is not possible since the right-hand-side will be different from a language to another.

我们目前的基础设施:


  • Java应用程序

  • 使用maven2构建

  • 系统不同组件的不同i18n属性文件。 (每个组件每种语言1个属性文件)

推荐答案

Checkstyle 工具,我通常作为每次持续集成构建的一部分运行,在每次签到主分支后完成,会告诉你如果任何给定的属性文件集具有不一致的属性集。当我第一次开始使用Checkstyle时,我确实发现我的一些属性文件缺少少量属性。

The Checkstyle tool, which I typically run as part of every continuous integration build which is done after every check-in to the main branch, will tell you if any given set of properties files has an inconsistent set of properties. When I first started using Checkstyle, I indeed found that a few of my properties files were missing a small number of properties.

这对编辑器端没有帮助,但它帮助您有效地识别任何差距。

This won't help on the editor end, but it will help you efficiently identify any gaps.

这篇关于保持i18n资源同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆