-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update migrations for updated supported languages.
- Loading branch information
Showing
2 changed files
with
367 additions
and
0 deletions.
There are no files selected for viewing
176 changes: 176 additions & 0 deletions
176
kolibri/core/auth/migrations/0027_alter_facilitydataset_extra_fields.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
# Generated by Django 3.2.25 on 2024-07-16 00:43 | ||
from django.db import migrations | ||
|
||
import kolibri.core.auth.constants.demographics | ||
import kolibri.core.fields | ||
import kolibri.core.utils.validators | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("kolibriauth", "0026_update_language_code_nyn_to_ny"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="facilitydataset", | ||
name="extra_fields", | ||
field=kolibri.core.fields.JSONField( | ||
blank=True, | ||
default={"facility": {}, "on_my_own_setup": False, "pin_code": ""}, | ||
null=True, | ||
validators=[ | ||
kolibri.core.utils.validators.JSON_Schema_Validator( | ||
{ | ||
"properties": { | ||
"demographic_fields": { | ||
"items": { | ||
"properties": { | ||
"description": {"type": "string"}, | ||
"enumValues": { | ||
"items": { | ||
"properties": { | ||
"defaultLabel": { | ||
"type": "string" | ||
}, | ||
"translations": { | ||
"items": { | ||
"properties": { | ||
"language": { | ||
"enum": [ | ||
"ar", | ||
"bg-bg", | ||
"bn-bd", | ||
"de", | ||
"el", | ||
"en", | ||
"es-419", | ||
"es-es", | ||
"fa", | ||
"ff-cm", | ||
"fr-fr", | ||
"gu-in", | ||
"ha", | ||
"hi-in", | ||
"ht", | ||
"id", | ||
"it", | ||
"ka", | ||
"km", | ||
"ko", | ||
"mr", | ||
"my", | ||
"ny", | ||
"pa", | ||
"pt-br", | ||
"pt-mz", | ||
"sw-tz", | ||
"te", | ||
"uk", | ||
"ur-pk", | ||
"vi", | ||
"yo", | ||
"zh-hans", | ||
], | ||
"type": "string", | ||
}, | ||
"message": { | ||
"type": "string" | ||
}, | ||
}, | ||
"type": "object", | ||
}, | ||
"optional": True, | ||
"type": "array", | ||
}, | ||
"value": {"type": "string"}, | ||
}, | ||
"type": "object", | ||
}, | ||
"type": "array", | ||
}, | ||
"id": {"type": "string"}, | ||
"translations": { | ||
"items": { | ||
"properties": { | ||
"language": { | ||
"enum": [ | ||
"ar", | ||
"bg-bg", | ||
"bn-bd", | ||
"de", | ||
"el", | ||
"en", | ||
"es-419", | ||
"es-es", | ||
"fa", | ||
"ff-cm", | ||
"fr-fr", | ||
"gu-in", | ||
"ha", | ||
"hi-in", | ||
"ht", | ||
"id", | ||
"it", | ||
"ka", | ||
"km", | ||
"ko", | ||
"mr", | ||
"my", | ||
"ny", | ||
"pa", | ||
"pt-br", | ||
"pt-mz", | ||
"sw-tz", | ||
"te", | ||
"uk", | ||
"ur-pk", | ||
"vi", | ||
"yo", | ||
"zh-hans", | ||
], | ||
"type": "string", | ||
}, | ||
"message": {"type": "string"}, | ||
}, | ||
"type": "object", | ||
}, | ||
"optional": True, | ||
"type": "array", | ||
}, | ||
}, | ||
"type": "object", | ||
}, | ||
"optional": True, | ||
"type": "array", | ||
}, | ||
"facility": {"optional": True, "type": "object"}, | ||
"on_my_own_setup": { | ||
"optional": True, | ||
"type": "boolean", | ||
}, | ||
"pin_code": { | ||
"optional": True, | ||
"type": ["string", "null"], | ||
}, | ||
}, | ||
"type": "object", | ||
} | ||
), | ||
kolibri.core.auth.constants.demographics.UniqueIdsValidator( | ||
"demographic_fields" | ||
), | ||
kolibri.core.auth.constants.demographics.DescriptionTranslationValidator( | ||
"demographic_fields" | ||
), | ||
kolibri.core.auth.constants.demographics.EnumValuesValidator( | ||
"demographic_fields" | ||
), | ||
kolibri.core.auth.constants.demographics.LabelTranslationValidator( | ||
"demographic_fields" | ||
), | ||
], | ||
), | ||
), | ||
] |
Oops, something went wrong.