зеркало из https://github.com/mozilla/kitsune.git
[bug 851207] Fix locale code casing of sr-Latn and sr-Cyrl.
This commit is contained in:
Родитель
9f9183b60a
Коммит
ac0b3bd6a7
|
@ -166,8 +166,8 @@ VISITORS_BY_LOCALE_RESPONSE = {
|
|||
[u'/sl/', u'530'],
|
||||
[u'/son/', u'1'],
|
||||
[u'/sq/', u'27'],
|
||||
[u'/sr-CYRL/', u'256'],
|
||||
[u'/sr-LATN/', u'31'],
|
||||
[u'/sr-Cyrl/', u'256'],
|
||||
[u'/sr-Latn/', u'31'],
|
||||
[u'/sv/', u'1488'],
|
||||
[u'/ta-LK/', u'13'],
|
||||
[u'/ta/', u'13'],
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
"english": "Gujarati",
|
||||
"native": "\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0"
|
||||
},
|
||||
"sr-CYRL": {
|
||||
"sr-Cyrl": {
|
||||
"iso639_1": "sr",
|
||||
"english": "Serbian",
|
||||
"native": "\u0421\u0440\u043f\u0441\u043a\u0438"
|
||||
|
@ -404,7 +404,7 @@
|
|||
"english": "Arabic",
|
||||
"native": "\u0639\u0631\u0628\u064a"
|
||||
},
|
||||
"sr-LATN": {
|
||||
"sr-Latn": {
|
||||
"iso639_1": "sr",
|
||||
"english": "Serbian",
|
||||
"native": "Srpski"
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
from gallery.models import Image, Video
|
||||
from users.models import Profile
|
||||
from wiki.models import Document, Locale
|
||||
|
||||
|
||||
def run():
|
||||
"""Fix casing in locale code for sr-Cyrl and sr-Latn."""
|
||||
Document.objects.filter(locale='sr-CYRL').update(locale='sr-Cyrl')
|
||||
Locale.objects.filter(locale='sr-CYRL').update(locale='sr-Cyrl')
|
||||
Image.objects.filter(locale='sr-CYRL').update(locale='sr-Cyrl')
|
||||
Video.objects.filter(locale='sr-CYRL').update(locale='sr-Cyrl')
|
||||
Profile.objects.filter(locale='sr-CYRL').update(locale='sr-Cyrl')
|
||||
|
||||
Document.objects.filter(locale='sr-LATN').update(locale='sr-Latn')
|
||||
Locale.objects.filter(locale='sr-LATN').update(locale='sr-Latn')
|
||||
Image.objects.filter(locale='sr-LATN').update(locale='sr-Latn')
|
||||
Video.objects.filter(locale='sr-LATN').update(locale='sr-Latn')
|
||||
Profile.objects.filter(locale='sr-LATN').update(locale='sr-Latn')
|
|
@ -154,8 +154,8 @@ SUMO_LANGUAGES = (
|
|||
'sl',
|
||||
'son',
|
||||
'sq',
|
||||
'sr-CYRL',
|
||||
'sr-LATN',
|
||||
'sr-Cyrl',
|
||||
'sr-Latn',
|
||||
'sv',
|
||||
'ta-LK',
|
||||
'ta',
|
||||
|
|
Загрузка…
Ссылка в новой задаче