|
@@ -140,7 +140,7 @@ class LangAreaView(TemplateView):
|
|
|
lk = lk.replace('!', '_')
|
|
|
lk = lk.replace('’', '_')
|
|
|
lk = lk.replace('...', '_')
|
|
|
- lk = lk.replace('\n', '_')
|
|
|
+ lk = lk.replace('\\n', '_')
|
|
|
lk = lk.replace(':', '_')
|
|
|
lk = lk.replace(':', '_')
|
|
|
lk = lk.replace('(', '_')
|
|
@@ -149,6 +149,9 @@ class LangAreaView(TemplateView):
|
|
|
lk = lk.replace(',', '_')
|
|
|
lk = lk.replace('-', '_')
|
|
|
lk = lk.replace('%', '_')
|
|
|
+ lk = lk.replace('‘', '_')
|
|
|
+ # 正则表达式
|
|
|
+ # re.sub("[a-z]+", "$", "123abc78ab9cdeg00t8")
|
|
|
content = content + '<string name="' + lk + '">' + res[l] + '</string>\n'
|
|
|
from django.http import StreamingHttpResponse
|
|
|
response = StreamingHttpResponse(content)
|