def clean_output_text(_text):
    """clean_output_text: Clean msgstr's text after translates

    :_text: list of msgid's text
    :returns: clean text, with 'msgstr "' and double quotes
    """
    _temp = ''
    _templist = _text.splitlines()
    _templistlen = len(_templist) - 1
    for i, l in enumerate(_templist):
        _temptext = l.rstrip()
        _temptext = _temptext.replace('\\', '\\\\').replace('\t', '\\t'
            ).replace('\r', '\\r').replace('\n', '\\n').replace('"', '\\"')
        if i == 0 and i == _templistlen:
            _temp += 'msgstr "' + _temptext + '"\n'
        elif i == 0 and i != _templistlen and len(_temptext) > 0:
            _temp += 'msgstr "' + _temptext + ' "\n'
        elif i == 0 and i != _templistlen and len(_temptext) == 0:
            _temp += 'msgstr "' + _temptext + '"\n'
        elif i != 0 and i == _templistlen:
            _temp += '"' + _temptext + '"\n'
        else:
            _temp += '"' + _temptext + ' "\n'
    return _temp
