def string_repr(source_string):
    """Return a nice visual representation of the given
    SourceString and all its properties.

    Any property that isn't populated (e.g. tags
    or developer comment) will be omitted.
    """
    return (
        '[green]"{string}"[end]\n'
        '{key}'
        '{context}'
        '{comment}'
        '{charlimit}'
        '{tags}'
        '   [high]occurrences:[end] [file]{occurrences}[end]\n'
    ).format(
        string=source_string.string,
        key=(
            '   [high]key:[end] "[yel]{}[end]"\n'.format(
                source_string.key
            )
        ),
        context=(
            '   [high]context:[end] {}\n'.format(
                u', '.join(source_string.context)
            )
            if source_string.context else ''
        ),
        comment=(
            '   [high]comment:[end] {}\n'.format(
                source_string.developer_comment
            )
            if source_string.developer_comment else ''
        ),
        charlimit=(
            '   [high]character limit:[end] {}\n'.format(
                source_string.character_limit
            )
            if source_string.character_limit else ''
        ),
        tags=(
            '   [high]tags:[end] {}\n'.format(
                u', '.join(source_string.tags)
            )
            if source_string.tags else ''
        ),
        occurrences=u', '.join(source_string.occurrences),
    )