Example #1
0
def _add_copyright(source_string, target_language, user):
    from transifex.addons.copyright.handlers import lotte_copyrights
    lotte_save_translation.connect(lotte_copyrights)
    lotte_save_translation.send(None,
                                resource=source_string.resource,
                                language=target_language,
                                user=user)
Example #2
0
def _add_copyright(source_string, target_language, user):
    from transifex.addons.copyright.handlers import lotte_copyrights
    lotte_save_translation.connect(lotte_copyrights)
    lotte_save_translation.send(
        None, resource=source_string.resource,
        language=target_language, user=user
    )
Example #3
0
def _add_copyright(source_string, target_language, user):
    profile_user = get_profile_or_user(user)
    firstname = profile_user.first_name
    surname = profile_user.last_name
    from transifex.addons.copyright.handlers import save_copyrights
    lotte_save_translation.connect(save_copyrights)
    lotte_save_translation.send(
        None, resource=source_string.source_entity.resource,
        language=target_language,
        copyrights=([(
                    ''.join([firstname, ' ', surname,
                             ' <', user.email, '>']),
                    [str(date.today().year)]
        ), ])
    )