"""This modules holds constants for ``common`` app."""

from django.utils.translation import ugettext_lazy as _, ungettext_lazy

# Resolution Variables
RESOLUTIONS = {
    'retina_width': 1448,
    'retina_height': 530,
    'normal_width': 724,
    'normal_height': 265,
    'preview_width': 475,
    'preview_height': 198,
}

# Admin fieldset
SYNC_STATUS_FIELDS = (
    _("SYNC STATUS"), {
        'fields': (
            'is_deleted',
            'update_locally',
            'first_update',
            'last_update',
        )
    }
)

TIMEDELTA_STRING_SEPARATOR = ', '
PLURAL_NUM = 'num'
PERIODS = [
    ('years', ungettext_lazy('%(num)s year', '%(num)s years', PLURAL_NUM), 60 * 60 * 24 * 365),
    ('months', ungettext_lazy('%(num)s month', '%(num)s months', PLURAL_NUM), 60 * 60 * 24 * 30),
    ('days', ungettext_lazy('%(num)s day', '%(num)s days', PLURAL_NUM), 60 * 60 * 24),
    ('hours', ungettext_lazy('%(num)s hour', '%(num)s hours', PLURAL_NUM), 60 * 60),
    ('minutes', ungettext_lazy('%(num)s minute', '%(num)s minutes', PLURAL_NUM), 60),
    ('seconds', ungettext_lazy('%(num)s second', '%(num)s seconds', PLURAL_NUM), 1)
]
TOKEN_RETRIES = 50
