﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
740	translation middleware not working on win xp	radek <translate@…>	Adrian Holovaty	"In translation.py there is used split('/') for splitting path. This does not work on Win systems.

Patch:
{{{
Index: C:/Python24/Lib/site-packages/django/utils/translation.py
===================================================================
--- C:/Python24/Lib/site-packages/django/utils/translation.py	(revision 1092)
+++ C:/Python24/Lib/site-packages/django/utils/translation.py	(working copy)
@@ -338,7 +338,7 @@
                 # filename, because otherwise we might incorrectly
                 # report de_DE if we only have de available, but
                 # did find de_DE because of language normalization
-                lang = langfile[len(globalpath):].split('/')[1]
+                lang = langfile[len(globalpath):].split(os.path.sep)[1]
                 _accepted[accept] = lang
                 return lang
      
}}}


Btw. I have found use of split('/') in anothers files aswell:

c:\Python24\Lib\site-packages\django\middleware\common.py

c:\Python24\Lib\site-packages\django\parts\media\photos.py

c:\Python24\Lib\site-packages\django\views\static.py
"	defect	closed	Core (Other)	1.0	major	fixed			Unreviewed	0	0	0	0	0	0
