Keeping i18n resources synced(保持 i18n 资源同步)
问题描述
我正在寻找 i18n 属性文件的编辑器/比较器,它可以帮助我保持不同语言文件的同步.
I am looking for an editor/comparator for i18n property files that would help me keep different language files in sync.
基本上,它会比较一堆属性文件并显示特定语言中不存在哪些键.
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 资源同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:保持 i18n 资源同步


基础教程推荐
- 在 Java 中创建日期的正确方法是什么? 2022-01-01
- Java 实例变量在两个语句中声明和初始化 2022-01-01
- 大摇大摆的枚举 2022-01-01
- 从 python 访问 JVM 2022-01-01
- 多个组件的复杂布局 2022-01-01
- 如何在 JFrame 中覆盖 windowsClosing 事件 2022-01-01
- 验证是否调用了所有 getter 方法 2022-01-01
- 如何在 Spring @Value 注解中正确指定默认值? 2022-01-01
- Java Swing计时器未清除 2022-01-01
- 不推荐使用 Api 注释的描述 2022-01-01