|
@@ -132,7 +132,7 @@ class LangAreaView(TemplateView):
|
|
|
en_kv[e['word_key']] = e['langvalmodel__word_val']
|
|
|
|
|
|
content = ''
|
|
|
- if type == 'ios' or type == 'link_ios':
|
|
|
+ if type == 'ios' or type == 'link_ios' or type == 'flutter':
|
|
|
res_qs = LangKeyModel.objects.filter(langvalmodel__la__id=id, type__in=langType). \
|
|
|
values('word_key', 'langvalmodel__word_val')
|
|
|
res = {}
|
|
@@ -144,7 +144,10 @@ class LangAreaView(TemplateView):
|
|
|
res[r['word_key']] = en_kv[r['word_key']]
|
|
|
for l in res:
|
|
|
content_val = res[l].replace('"', '\'')
|
|
|
- content = content + '"' + l + '"="' + content_val + '";\n'
|
|
|
+ if type == 'ios' or type == 'link_ios':
|
|
|
+ content = content + '"' + l + '"="' + content_val + '";\n'
|
|
|
+ else:
|
|
|
+ content = content + '"' + l + '":"' + content_val + '";\n'
|
|
|
elif type == 'android' or type == 'link_android':
|
|
|
res_qs = LangKeyModel.objects.filter(langvalmodel__la__id=id, type__in=langType). \
|
|
|
values('word_key', 'langvalmodel__word_val').order_by('addTime')
|
|
@@ -196,7 +199,6 @@ class LangAreaView(TemplateView):
|
|
|
response['Content-Type'] = 'application/octet-stream'
|
|
|
response['Content-Disposition'] = 'attachment;filename="lang.txt"'
|
|
|
return response
|
|
|
- return response.json(0, res)
|
|
|
|
|
|
def do_download_avss(self, id):
|
|
|
content = ''
|