Пример #1
0
def _check_original_title(metadata, ln, _):
    title = metadata.get('original_title', '')
    title = title.decode('UTF8')
    if title:
        if is_all_uppercase(title):
            return ('original_title', 'warning', [
                _('The original title field of the publication seems to be written all in UPPERCASE'
                  )
            ])
Пример #2
0
def _check_original_title(metadata, ln, _):
    title = metadata.get("original_title", "")
    title = title.decode("UTF8")
    if title:
        if is_all_uppercase(title):
            return (
                "original_title",
                "warning",
                [_("The original title field of the publication seems to be written all in UPPERCASE")],
            )
Пример #3
0
def _check_text(metadata, ln, _, field, mandatory=True):
    title = metadata.get(field, "")
    title = title.strip()
    if mandatory and not title:
        return (field, "error", [_("The field is mandatory but is currently empty")])
    elif title:
        title = title.decode("UTF8")
        if is_all_uppercase(title):
            return (field, "warning", [_("The field seems to be written all in UPPERCASE. Was this intentional?")])
        elif title.islower():
            return (field, "warning", [_("The field seems to be written all in lowercase. Was this intentional?")])
Пример #4
0
def _check_text(metadata, ln, _, field, mandatory=True):
    title = metadata.get(field, '')
    title = title.strip()
    if mandatory and not title:
        return (field, 'error',
                [_('The field is mandatory but is currently empty')])
    elif title:
        title = title.decode('UTF8')
        if is_all_uppercase(title):
            return (field, 'warning', [
                _('The field seems to be written all in UPPERCASE. Was this intentional?'
                  )
            ])
        elif title.islower():
            return (field, 'warning', [
                _('The field seems to be written all in lowercase. Was this intentional?'
                  )
            ])
def _check_original_title(metadata, ln, _):
    title = metadata.get('original_title', '')
    title = title.decode('UTF8')
    if title:
        if is_all_uppercase(title):
            return ('original_title', 'warning', [_('The original title field of the publication seems to be written all in UPPERCASE')])