# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations


def add_cldr_plurals_to_locales(apps, schema_editor):
    Locale = apps.get_model('base', 'Locale')

    for locale in LOCALE_CLDR:
        l = Locale.objects.get(code=locale)
        l.cldr_plurals = LOCALE_CLDR[locale]
        l.save()


class Migration(migrations.Migration):

    dependencies = [
        ('base', '0007_auto_20150710_0944'),
    ]

    operations = [
        migrations.RunPython(add_cldr_plurals_to_locales),
    ]


LOCALE_CLDR = {
    "af": "1,5",
    "ak": "1,5",
    "sq": "1,5",
    "am": "1,5",
    "ar": "0,1,2,3,4,5",
    "an": "1,5",
    "hy": "1,5",
    "ast": "1,5",
    "az": "1,5",
    "eu": "1,5",
    "be": "1,3,5",
    "bn": "1,5",
    "bn-BD": "1,5",
    "bn-IN": "1,5",
    "bs": "1,3,5",
    "br": "1,5",
    "bg": "1,5",
    "my": "5",
    "ca": "1,5",
    "hne": "1,5",
    "zh": "1,5",
    "zh-CN": "1,5",
    "zh-HK": "1,5",
    "zh-TW": "1,5",
    "kw": "1,2,3,5",
    "hr": "1,3,5",
    "cs": "1,3,5",
    "da": "1,5",
    "nl": "1,5",
    "dz": "5",
    "en": "1,5",
    "en-AU": "1,5",
    "en-CA": "1,5",
    "en-IE": "1,5",
    "en-ZA": "1,5",
    "en-GB": "1,5",
    "en-US": "1,5",
    "eo": "1,5",
    "et": "1,5",
    "fo": "1,5",
    "fil": "1,5",
    "fi": "1,5",
    "fr": "1,5",
    "fur": "1,5",
    "ff": "1,5",
    "gd": "1,2,3,5",
    "gl": "1,5",
    "ka": "5",
    "de": "1,5",
    "el": "1,5",
    "gu": "1,5",
    "gu-IN": "1,5",
    "gun": "1,5",
    "ht": "1,5",
    "ha": "1,5",
    "he": "1,5",
    "hi": "1,5",
    "hi-IN": "1,5",
    "hu": "1,5",
    "is": "1,5",
    "id": "5",
    "ia": "1,5",
    "ga": "1,2,3,4,5",
    "it": "1,5",
    "ja": "5",
    "jv": "0,5",
    "kn": "1,5",
    "csb": "1,3,5",
    "kk": "5",
    "km": "5",
    "rw": "1,5",
    "ky": "5",
    "ko": "5",
    "ku": "1,5",
    "lo": "5",
    "lv": "0,1,5",
    "lij": "1,5",
    "ln": "1,5",
    "lt": "1,3,5",
    "lb": "1,5",
    "mk": "1,5",
    "mai": "1,5",
    "mg": "1,5",
    "ms": "5",
    "ml": "1,5",
    "mt": "1,3,4,5",
    "mi": "1,5",
    "arn": "1,5",
    "mr": "1,5",
    "mn": "1,5",
    "nah": "1,5",
    "nap": "1,5",
    "ne": "1,5",
    "se": "1,5",
    "nso": "1,5",
    "no": "1,5",
    "nb": "1,5",
    "nn": "1,5",
    "oc": "1,5",
    "or": "1,5",
    "pa": "1,5",
    "pap": "1,5",
    "fa": "5",
    "pms": "1,5",
    "pl": "1,3,5",
    "pt": "1,5",
    "pt-BR": "1,5",
    "ps": "1,5",
    "ro": "1,3,5",
    "rm": "1,5",
    "ru": "1,3,5",
    "sco": "1,5",
    "sr": "1,3,5",
    "sr@latin": "1,3,5",
    "si": "1,5",
    "sk": "1,3,5",
    "sl": "1,2,3,5",
    "sl-SI": "1,2,3,5",
    "so": "1,5",
    "son": "1,5",
    "st": "1,5",
    "es-AR": "1,5",
    "es": "1,5",
    "es-CL": "1,5",
    "es-MX": "1,5",
    "su": "5",
    "sw": "1,5",
    "sv": "1,5",
    "sv-SE": "1,5",
    "tg": "1,5",
    "ta": "1,5",
    "ta-IN": "1,5",
    "tt": "5",
    "te": "1,5",
    "th": "5",
    "bo": "5",
    "ti": "1,5",
    "tr": "1,5",
    "tk": "1,5",
    "ug": "5",
    "uk": "1,3,5",
    "hsb": "1,2,3,5",
    "ur": "1,5",
    "uz": "1,5",
    "vi": "5",
    "wa": "1,5",
    "cy": "1,2,3,5",
    "fy": "1,5",
    "wo": "1,5",
    "xh": "1,5",
    "yo": "1,5",
    "dsb": "1,2,3,5",
}
