Several corrections
This commit is contained in:
parent
b8d165178c
commit
dfbd920c6c
@ -31,7 +31,7 @@ class Report(object):
|
||||
except:
|
||||
self.capture_sha1 = "N/A"
|
||||
|
||||
self.userlang = get_config(("frontend", "userlang"))
|
||||
self.userlang = get_config(("frontend", "user_lang"))
|
||||
|
||||
# Load template language
|
||||
if not re.match("^[a-z]{2}$", self.userlang):
|
||||
|
@ -6,7 +6,7 @@
|
||||
},
|
||||
"analysis": {
|
||||
"question": "Voulez-vous analyser les communications capturées ?",
|
||||
"no_btn": "Non, enregistrez-les directement.",
|
||||
"no_btn": "Non, enregistrez-les.",
|
||||
"yes_btn": "Oui, allons-y !",
|
||||
"please_wait_msg": "Merci d'attendre pendant l'analyse...",
|
||||
"some_time_msg": "Oui, cela peut prendre du temps..."
|
||||
@ -42,11 +42,11 @@
|
||||
"dix",
|
||||
"onze"
|
||||
],
|
||||
"stalkerware_msg": "Votre smartphone est compromis<br /> par un Stalkerware, merci de regarder le rapport.",
|
||||
"stalkerware_msg": "Votre smartphone est compromis<br /> par un Stalkerware, affichez le rapport.",
|
||||
"location_msg": "Une application dévoile votre<br /> géo-localisation actelle.",
|
||||
"fine_msg": "Tout semble OK, vous avez aucue alerte.",
|
||||
"high_msg": "Vous avez {nb} alerte(s) élevée(s),<br />votre appareil semble être compromis.",
|
||||
"moderate_msg": "Vous avez {nb} alerte(s) moyenne(s),<br />votre appareil peut être compromis.",
|
||||
"moderate_msg": "Vous avez {nb} alerte(s) moyenne(s),<br />votre appareil est peut-être compromis.",
|
||||
"low_msg": "Vous avez uniquement {nb} alerte(s) basse(s)<br /> n'hésitez pas à les lire.",
|
||||
"save_report": "Sauvegarder le rapport",
|
||||
"report_of": "Rapport de",
|
||||
|
@ -5,6 +5,8 @@ import subprocess as sp
|
||||
from flask import Blueprint, jsonify
|
||||
from app.utils import read_config
|
||||
import re
|
||||
import sys
|
||||
import os
|
||||
|
||||
misc_bp = Blueprint("misc", __name__)
|
||||
|
||||
@ -70,8 +72,8 @@ def get_lang():
|
||||
"""
|
||||
lang = read_config(("frontend", "user_lang"))
|
||||
if re.match("^[a-z]{2,3}$", lang):
|
||||
with open("app/assets/lang/{}.json".format(lang), "r") as f:
|
||||
with open(os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "app/assets/lang/{}.json".format(lang)), "r") as f:
|
||||
return(f.read())
|
||||
else:
|
||||
with open("app/assets/lang/en.json", "r") as f:
|
||||
with open(os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "app/assets/lang/en.json"), "r") as f:
|
||||
return(f.read())
|
||||
|
Loading…
Reference in New Issue
Block a user