Inspectopedia
 
2024.3

Inconsistent resource bundle

Error
New
Last modified: 03 December 2024

Reports problems in the properties files contained in the resource bundle.

  • Report missing translations

    Use this option to report properties contained in the parent properties file that are missing in inherited ones (unless it's a language dialect).

    Example:

    # messages.properties
    abc=xxx
    
    # messages_fr.properties
    # Empty file

    Property abc will be reported as untranslated.

  • Report inconsistent properties

    Use this option to report properties contained in inherited properties file that are missing in the parent one (or in siblings if there is no parent).

    Example:

    # messages.properties
    # Empty file
    
    # messages_fr.properties
    abc=xxx

    Property abc translation is not available here for any language except French, and, thus, will be reported as missing in the (default) properties file messages.properties.

  • Report properties overridden with the same value

    Use this option to report properties copy-pasted into several properties files verbatim.

    Example:

    # messages.properties
    abc=xxx
    
    # messages_fr.properties
    abc=xxx

    Property abc will be reported as unnecessarily inherited in the file messages_fr.properties.

  • Report properties overridden with different placeholders

    Use this option to check for placeholder consistency in overridden properties.

    Example:

    # messages.properties
    qwe={0}xxx{1}
    abc={0}yyy{1}
    
    # messages_fr.properties
    qwe={0}xxx{0}xxx{1}
    abc={0}yyy

    Property abc will be reported as a property containing message format placeholders not corresponding to messages.properties.

  • Report properties overridden with different values endings

    Use this option to check for ending consistency in overridden properties.

    Example:

    # messages.properties
    abc=xxxzzz
    
    # messages_fr.properties
    abc=xxx;

    Property abc will be reported as ending with special signs (!/?/./:/;) whereas the parent value in messages.properties doesn't.