+1 for moving those messages out of CliStrings if at all possible and
placing them where they are used. In my experiences with those strings, I
have rarely if ever seen them reused across classes, so they really should
belong in the class they are used by.

On Thu, Oct 19, 2017 at 3:05 PM, Jared Stewart <jstew...@pivotal.io> wrote:

> I wanted to kick off a discussion about the usage of CliStrings.  For
> those unfamiliar, it’s a java class that contains about ~3000 lines of
> String constants and has a javadoc explaining that it is an attempt at i18n
> localization.  Does anyone know if this localization is actually
> implemented in practice?
>
> If not, I would like suggest that we try to move away from this pattern
> going forward.  We have ended up with many constants in CliStrings like
> this:
> CliStrings.CREATE_REGION__MSG__ONLY_ONE_OF_REGIONSHORTCUT_
> AND_USEATTRIBUESFROM_CAN_BE_SPECIFIED
> The constant is only used in CreateRegionCommand, so I would be happier to
> see it as a member of CreateRegionCommand (where there would be no need for
> the unwieldy "CREATE_REGION__MSG__” prefix) unless there is localization
> being done which I am unaware of.
>
> Thoughts?
>
> Thanks,
> Jared

Reply via email to