class ShortcutHelper {

    public String getPart(final String text,
                          final int part) {
        if (part < 1) {
            throw new RuntimeException("The first part is the number one.");
        }

        int beginIndex = 0;

        if (part > 1) {
            final int i = part - 2;
            final String s = "{" + i + "}";
            beginIndex = text.indexOf(s);
            if (beginIndex < 0) {
                throw new RuntimeException("The translation " + text + " is missing parameters.");
            } else {
                beginIndex += String.valueOf(i).length() + 2;
            }
        }

        final int i2 = part - 1;
        final String s2 = "{" + i2 + "}";
        int endIndex = text.indexOf(s2);
        if (endIndex < 0) {
            endIndex = text.length();
        }

        return text.substring(beginIndex,
                              endIndex);
    }

    public  ShortcutHelper();
    @Inject public  ShortcutHelper(final AuthorizationManager authorizationManager,
                          final User user,
                          final PlaceManager placeManager);

}