-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Translations: disable
zh
code (#11385)
* Translations: disable `zh` code The code `zh` is invalid and project shouldn't select it. They should use `zh-*` instead. This was causing issues when rendering the new dashboard. This step only disable this language code so new projects cannot select it. However, we still need to decide what to do with the db and write a data migration for them. I suppose that most of them are probably spam, tho. * Add issue to track the TODO * Migration
- Loading branch information
Showing
2 changed files
with
382 additions
and
1 deletion.
There are no files selected for viewing
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
373 changes: 373 additions & 0 deletions
373
readthedocs/projects/migrations/0124_remove_zh_locale.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,373 @@ | ||
# Generated by Django 4.2.13 on 2024-06-12 10:24 | ||
|
||
from django.db import migrations, models | ||
from django_safemigrate import Safe | ||
|
||
|
||
class Migration(migrations.Migration): | ||
safe = Safe.after_deploy | ||
|
||
dependencies = [ | ||
("projects", "0123_deprecate_old_vcs"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="historicalproject", | ||
name="language", | ||
field=models.CharField( | ||
choices=[ | ||
("aa", "Afar"), | ||
("ab", "Abkhaz"), | ||
("acr", "Achi"), | ||
("af", "Afrikaans"), | ||
("agu", "Awakateko"), | ||
("am", "Amharic"), | ||
("ar", "Arabic"), | ||
("as", "Assamese"), | ||
("ay", "Aymara"), | ||
("az", "Azerbaijani"), | ||
("ba", "Bashkir"), | ||
("be", "Belarusian"), | ||
("bg", "Bulgarian"), | ||
("bh", "Bihari"), | ||
("bi", "Bislama"), | ||
("bn", "Bengali"), | ||
("bo", "Tibetan"), | ||
("br", "Breton"), | ||
("ca", "Catalan"), | ||
("caa", "Ch'orti'"), | ||
("cac", "Chuj"), | ||
("cab", "Garífuna"), | ||
("cak", "Kaqchikel"), | ||
("co", "Corsican"), | ||
("cs", "Czech"), | ||
("cy", "Welsh"), | ||
("da", "Danish"), | ||
("de", "German"), | ||
("dz", "Dzongkha"), | ||
("el", "Greek"), | ||
("en", "English"), | ||
("eo", "Esperanto"), | ||
("es", "Spanish"), | ||
("et", "Estonian"), | ||
("eu", "Basque"), | ||
("fa", "Iranian"), | ||
("fi", "Finnish"), | ||
("fj", "Fijian"), | ||
("fo", "Faroese"), | ||
("fr", "French"), | ||
("fy", "Western Frisian"), | ||
("ga", "Irish"), | ||
("gd", "Scottish Gaelic"), | ||
("gl", "Galician"), | ||
("gn", "Guarani"), | ||
("gu", "Gujarati"), | ||
("ha", "Hausa"), | ||
("hi", "Hindi"), | ||
("he", "Hebrew"), | ||
("hr", "Croatian"), | ||
("hu", "Hungarian"), | ||
("hy", "Armenian"), | ||
("ia", "Interlingua"), | ||
("id", "Indonesian"), | ||
("ie", "Interlingue"), | ||
("ik", "Inupiaq"), | ||
("is", "Icelandic"), | ||
("it", "Italian"), | ||
("itz", "Itza'"), | ||
("iu", "Inuktitut"), | ||
("ixl", "Ixil"), | ||
("ja", "Japanese"), | ||
("jac", "Popti'"), | ||
("jv", "Javanese"), | ||
("ka", "Georgian"), | ||
("kjb", "Q'anjob'al"), | ||
("kek", "Q'eqchi'"), | ||
("kk", "Kazakh"), | ||
("kl", "Kalaallisut"), | ||
("km", "Khmer"), | ||
("kn", "Kannada"), | ||
("knj", "Akateko"), | ||
("ko", "Korean"), | ||
("ks", "Kashmiri"), | ||
("ku", "Kurdish"), | ||
("ky", "Kyrgyz"), | ||
("la", "Latin"), | ||
("ln", "Lingala"), | ||
("lo", "Lao"), | ||
("lt", "Lithuanian"), | ||
("lv", "Latvian"), | ||
("mam", "Mam"), | ||
("mg", "Malagasy"), | ||
("mi", "Maori"), | ||
("mk", "Macedonian"), | ||
("ml", "Malayalam"), | ||
("mn", "Mongolian"), | ||
("mop", "Mopan"), | ||
("mr", "Marathi"), | ||
("ms", "Malay"), | ||
("mt", "Maltese"), | ||
("my", "Burmese"), | ||
("na", "Nauru"), | ||
("ne", "Nepali"), | ||
("nl", "Dutch"), | ||
("no", "Norwegian"), | ||
("oc", "Occitan"), | ||
("om", "Oromo"), | ||
("or", "Oriya"), | ||
("pa", "Panjabi"), | ||
("pl", "Polish"), | ||
("pnb", "Western Punjabi"), | ||
("poc", "Poqomam"), | ||
("poh", "Poqomchi"), | ||
("ps", "Pashto"), | ||
("pt", "Portuguese"), | ||
("qu", "Quechua"), | ||
("quc", "K'iche'"), | ||
("qum", "Sipakapense"), | ||
("quv", "Sakapulteko"), | ||
("rm", "Romansh"), | ||
("rn", "Kirundi"), | ||
("ro", "Romanian"), | ||
("ru", "Russian"), | ||
("rw", "Kinyarwanda"), | ||
("sa", "Sanskrit"), | ||
("sd", "Sindhi"), | ||
("sg", "Sango"), | ||
("si", "Sinhala"), | ||
("sk", "Slovak"), | ||
("skr", "Saraiki"), | ||
("sl", "Slovenian"), | ||
("sm", "Samoan"), | ||
("sn", "Shona"), | ||
("so", "Somali"), | ||
("sq", "Albanian"), | ||
("sr", "Serbian"), | ||
("ss", "Swati"), | ||
("st", "Southern Sotho"), | ||
("su", "Sudanese"), | ||
("sv", "Swedish"), | ||
("sw", "Swahili"), | ||
("ta", "Tamil"), | ||
("te", "Telugu"), | ||
("tg", "Tajik"), | ||
("th", "Thai"), | ||
("ti", "Tigrinya"), | ||
("tk", "Turkmen"), | ||
("tl", "Tagalog"), | ||
("tn", "Tswana"), | ||
("to", "Tonga"), | ||
("tr", "Turkish"), | ||
("ts", "Tsonga"), | ||
("tt", "Tatar"), | ||
("ttc", "Tektiteko"), | ||
("tzj", "Tz'utujil"), | ||
("tw", "Twi"), | ||
("ug", "Uyghur"), | ||
("uk", "Ukrainian"), | ||
("ur", "Urdu"), | ||
("usp", "Uspanteko"), | ||
("uz", "Uzbek"), | ||
("vi", "Vietnamese"), | ||
("vo", "Volapuk"), | ||
("wo", "Wolof"), | ||
("xh", "Xhosa"), | ||
("xin", "Xinka"), | ||
("yi", "Yiddish"), | ||
("yo", "Yoruba"), | ||
("za", "Zhuang"), | ||
("zu", "Zulu"), | ||
("nb-no", "Norwegian Bokmal"), | ||
("pt-br", "Brazilian Portuguese"), | ||
("es-mx", "Mexican Spanish"), | ||
("uk-ua", "Ukrainian"), | ||
("zh-cn", "Simplified Chinese"), | ||
("zh-tw", "Traditional Chinese"), | ||
], | ||
default="en", | ||
help_text="The language the project documentation is rendered in. Note: this affects your project's URL.", | ||
max_length=20, | ||
verbose_name="Language", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="project", | ||
name="language", | ||
field=models.CharField( | ||
choices=[ | ||
("aa", "Afar"), | ||
("ab", "Abkhaz"), | ||
("acr", "Achi"), | ||
("af", "Afrikaans"), | ||
("agu", "Awakateko"), | ||
("am", "Amharic"), | ||
("ar", "Arabic"), | ||
("as", "Assamese"), | ||
("ay", "Aymara"), | ||
("az", "Azerbaijani"), | ||
("ba", "Bashkir"), | ||
("be", "Belarusian"), | ||
("bg", "Bulgarian"), | ||
("bh", "Bihari"), | ||
("bi", "Bislama"), | ||
("bn", "Bengali"), | ||
("bo", "Tibetan"), | ||
("br", "Breton"), | ||
("ca", "Catalan"), | ||
("caa", "Ch'orti'"), | ||
("cac", "Chuj"), | ||
("cab", "Garífuna"), | ||
("cak", "Kaqchikel"), | ||
("co", "Corsican"), | ||
("cs", "Czech"), | ||
("cy", "Welsh"), | ||
("da", "Danish"), | ||
("de", "German"), | ||
("dz", "Dzongkha"), | ||
("el", "Greek"), | ||
("en", "English"), | ||
("eo", "Esperanto"), | ||
("es", "Spanish"), | ||
("et", "Estonian"), | ||
("eu", "Basque"), | ||
("fa", "Iranian"), | ||
("fi", "Finnish"), | ||
("fj", "Fijian"), | ||
("fo", "Faroese"), | ||
("fr", "French"), | ||
("fy", "Western Frisian"), | ||
("ga", "Irish"), | ||
("gd", "Scottish Gaelic"), | ||
("gl", "Galician"), | ||
("gn", "Guarani"), | ||
("gu", "Gujarati"), | ||
("ha", "Hausa"), | ||
("hi", "Hindi"), | ||
("he", "Hebrew"), | ||
("hr", "Croatian"), | ||
("hu", "Hungarian"), | ||
("hy", "Armenian"), | ||
("ia", "Interlingua"), | ||
("id", "Indonesian"), | ||
("ie", "Interlingue"), | ||
("ik", "Inupiaq"), | ||
("is", "Icelandic"), | ||
("it", "Italian"), | ||
("itz", "Itza'"), | ||
("iu", "Inuktitut"), | ||
("ixl", "Ixil"), | ||
("ja", "Japanese"), | ||
("jac", "Popti'"), | ||
("jv", "Javanese"), | ||
("ka", "Georgian"), | ||
("kjb", "Q'anjob'al"), | ||
("kek", "Q'eqchi'"), | ||
("kk", "Kazakh"), | ||
("kl", "Kalaallisut"), | ||
("km", "Khmer"), | ||
("kn", "Kannada"), | ||
("knj", "Akateko"), | ||
("ko", "Korean"), | ||
("ks", "Kashmiri"), | ||
("ku", "Kurdish"), | ||
("ky", "Kyrgyz"), | ||
("la", "Latin"), | ||
("ln", "Lingala"), | ||
("lo", "Lao"), | ||
("lt", "Lithuanian"), | ||
("lv", "Latvian"), | ||
("mam", "Mam"), | ||
("mg", "Malagasy"), | ||
("mi", "Maori"), | ||
("mk", "Macedonian"), | ||
("ml", "Malayalam"), | ||
("mn", "Mongolian"), | ||
("mop", "Mopan"), | ||
("mr", "Marathi"), | ||
("ms", "Malay"), | ||
("mt", "Maltese"), | ||
("my", "Burmese"), | ||
("na", "Nauru"), | ||
("ne", "Nepali"), | ||
("nl", "Dutch"), | ||
("no", "Norwegian"), | ||
("oc", "Occitan"), | ||
("om", "Oromo"), | ||
("or", "Oriya"), | ||
("pa", "Panjabi"), | ||
("pl", "Polish"), | ||
("pnb", "Western Punjabi"), | ||
("poc", "Poqomam"), | ||
("poh", "Poqomchi"), | ||
("ps", "Pashto"), | ||
("pt", "Portuguese"), | ||
("qu", "Quechua"), | ||
("quc", "K'iche'"), | ||
("qum", "Sipakapense"), | ||
("quv", "Sakapulteko"), | ||
("rm", "Romansh"), | ||
("rn", "Kirundi"), | ||
("ro", "Romanian"), | ||
("ru", "Russian"), | ||
("rw", "Kinyarwanda"), | ||
("sa", "Sanskrit"), | ||
("sd", "Sindhi"), | ||
("sg", "Sango"), | ||
("si", "Sinhala"), | ||
("sk", "Slovak"), | ||
("skr", "Saraiki"), | ||
("sl", "Slovenian"), | ||
("sm", "Samoan"), | ||
("sn", "Shona"), | ||
("so", "Somali"), | ||
("sq", "Albanian"), | ||
("sr", "Serbian"), | ||
("ss", "Swati"), | ||
("st", "Southern Sotho"), | ||
("su", "Sudanese"), | ||
("sv", "Swedish"), | ||
("sw", "Swahili"), | ||
("ta", "Tamil"), | ||
("te", "Telugu"), | ||
("tg", "Tajik"), | ||
("th", "Thai"), | ||
("ti", "Tigrinya"), | ||
("tk", "Turkmen"), | ||
("tl", "Tagalog"), | ||
("tn", "Tswana"), | ||
("to", "Tonga"), | ||
("tr", "Turkish"), | ||
("ts", "Tsonga"), | ||
("tt", "Tatar"), | ||
("ttc", "Tektiteko"), | ||
("tzj", "Tz'utujil"), | ||
("tw", "Twi"), | ||
("ug", "Uyghur"), | ||
("uk", "Ukrainian"), | ||
("ur", "Urdu"), | ||
("usp", "Uspanteko"), | ||
("uz", "Uzbek"), | ||
("vi", "Vietnamese"), | ||
("vo", "Volapuk"), | ||
("wo", "Wolof"), | ||
("xh", "Xhosa"), | ||
("xin", "Xinka"), | ||
("yi", "Yiddish"), | ||
("yo", "Yoruba"), | ||
("za", "Zhuang"), | ||
("zu", "Zulu"), | ||
("nb-no", "Norwegian Bokmal"), | ||
("pt-br", "Brazilian Portuguese"), | ||
("es-mx", "Mexican Spanish"), | ||
("uk-ua", "Ukrainian"), | ||
("zh-cn", "Simplified Chinese"), | ||
("zh-tw", "Traditional Chinese"), | ||
], | ||
default="en", | ||
help_text="The language the project documentation is rendered in. Note: this affects your project's URL.", | ||
max_length=20, | ||
verbose_name="Language", | ||
), | ||
), | ||
] |