def i18n_representer(dumper, data):
    """oslo_i18n yaml representer

    Returns a translated to the default locale string for yaml.safe_dump

    :param dumper: a SafeDumper instance passed by yaml.safe_dump
    :param data: a oslo_i18n._message.Message instance
    """
    serializedData = str(data.translation())
    return dumper.represent_str(serializedData)