diff --git a/pontoon/base/migrations/0047_fix_lt_plural_rule.py b/pontoon/base/migrations/0047_fix_lt_plural_rule.py new file mode 100644 index 0000000000..c4d832fb37 --- /dev/null +++ b/pontoon/base/migrations/0047_fix_lt_plural_rule.py @@ -0,0 +1,26 @@ +# Generated by Django 3.2.15 on 2023-10-17 07:09 + +from django.db import migrations + + +def fix_lt_plural_rule(apps, schema_editor): + Locale = apps.get_model("base", "Locale") + locale = Locale.objects.get(code="lt") + locale.plural_rule = ( + "(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2)" + ) + locale.save(update_fields=["plural_rule"]) + + +class Migration(migrations.Migration): + + dependencies = [ + ("base", "0046_projectslughistory"), + ] + + operations = [ + migrations.RunPython( + code=fix_lt_plural_rule, + reverse_code=migrations.RunPython.noop, + ), + ]