Keeping i18n resources synced

时光毁灭记忆、已成空白 提交于 2019-12-18 04:55:14

问题


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.

a property would look something like

component.titlepage.title = hello world

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

Our current infrastructure:

  • Java application
  • Built using maven2
  • Different i18n property files for different components of the system. (1 property file per language per component)

回答1:


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.




回答2:


If you are using Eclipse, I find the ResourceBundle Editor plugin very handy. You can edit several properties files at the same time and you have warnings when a key is missing in one of the files.




回答3:


There are also a number of web applications that allow you to do that (along with many other activities). To name a few:

  • Amanuens (disclaimer: my company builds this product)
  • Transifex
  • Get Localization


来源:https://stackoverflow.com/questions/907098/keeping-i18n-resources-synced

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!