|
@@ -134,7 +134,7 @@ class LangAreaView(TemplateView):
|
|
|
elif en_kv[r['word_key']]:
|
|
|
res[r['word_key']] = en_kv[r['word_key']]
|
|
|
for l in res:
|
|
|
- content_val = res[l].replace('"', '\'')
|
|
|
+ content_val = res[l].replace('"', '\"')
|
|
|
content = content + '"' + l + '"="' + content_val + '";\n'
|
|
|
elif type == 'android':
|
|
|
res_qs = LangKeyModel.objects.filter(langvalmodel__la__id=id).\
|
|
@@ -170,13 +170,11 @@ class LangAreaView(TemplateView):
|
|
|
lk = lk.replace('%', '_')
|
|
|
lk = lk.replace(';', '_')
|
|
|
lk = lk.replace('‘', '_')
|
|
|
- T = res[l]
|
|
|
- T.replace('"', '\\"')
|
|
|
- res[l] = T
|
|
|
- print(res[l])
|
|
|
+
|
|
|
# 正则表达式
|
|
|
# re.sub("[a-z]+", "$", "123abc78ab9cdeg00t8")
|
|
|
- content_val = res[l].replace("'","\\'")
|
|
|
+ content_val = res[l].replace("'", "\\'")
|
|
|
+ content_val = res[l].replace('"', '\\"')
|
|
|
content = content + '<string name="' + lk + '">' + content_val + '</string>\n'
|
|
|
response = StreamingHttpResponse(content)
|
|
|
response['Content-Type'] = 'application/octet-stream'
|