Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
246 views
in Technique[技术] by (71.8m points)

java - Keeping i18n resources synced

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)
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...