com.puppycrawl.tools.checkstyle.checks

Class TranslationCheck

Implemented Interfaces:
Configurable, Contextualizable, FileSetCheck

public class TranslationCheck
extends AbstractFileSetCheck

The TranslationCheck class helps to ensure the correct translation of code by checking property files for consistency regarding their keys. Two property files describing one and the same context are consistent if they contain the same keys.

An example of how to configure the check is:

 <module name="Translation"/>
 
Authors:
Alexandra Bunge
lkuehne

Constructor Summary

TranslationCheck()
Creates a new TranslationCheck instance.

Method Summary

void
process(File[] aFiles)
This method searches for property files in the specified file array and checks whether the key usage is consistent.

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck

destroy, filter, fireErrors, getCharset, getMessageCollector, getMessageDispatcher, log, log, setCharset, setFileExtensions, setMessageDispatcher

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter

getId, getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, log, log, setId, setSeverity

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean

configure, contextualize, finishLocalSetup, getConfiguration, setupChild

Constructor Details

TranslationCheck

public TranslationCheck()
Creates a new TranslationCheck instance.

Method Details

process

public void process(File[] aFiles)
This method searches for property files in the specified file array and checks whether the key usage is consistent. Two property files which have the same prefix should use the same keys. If this is not the case the missing keys are reported.
Specified by:
process in interface FileSetCheck
Parameters:
aFiles -
See Also:
FileSetCheck