Skip to content

Commit

Permalink
Updated locales
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafamat committed Oct 23, 2023
1 parent 68612e4 commit 2b67b56
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 15 deletions.
12 changes: 6 additions & 6 deletions backend/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def cron_looker_f(self, view_):

separated_ = re.split(" ", scheduled_cron_)
if not (separated_ and len(separated_) == 5):
return {"result": False, "msg": "invalid cron separation"}
return {"result": False, "msg": "invalid cron format"}

minute_ = separated_[0].strip()
hour_ = separated_[1].strip()
Expand Down Expand Up @@ -4595,7 +4595,7 @@ def storage_f():

user_ = jwt_validate_f_["user"] if "user" in jwt_validate_f_ else None
if not user_:
raise SessionError({"result": False, "msg": "user session not found"})
raise SessionError({"result": False, "msg": "invalid user session"})

form_ = request.form.to_dict(flat=True)
if not form_:
Expand Down Expand Up @@ -4845,7 +4845,7 @@ def auth_f():
try:
input_ = request.json
if not input_:
raise APIError({"result": False, "msg": "input missing"})
raise APIError({"result": False, "msg": "input is missing"})
if "op" not in input_:
raise APIError({"result": False, "msg": "no operation found"})
op_ = input_["op"]
Expand Down Expand Up @@ -4878,7 +4878,7 @@ def auth_f():
input_["auth"] = auth_
res_ = Auth().account_f(input_)
else:
raise APIError({"result": False, "msg": f"operation not supported: {op_}"})
raise APIError({"result": False, "msg": "operation not supported"})

if not res_["result"]:
raise AuthError(res_)
Expand Down Expand Up @@ -5137,7 +5137,7 @@ def api_get_query(id_):
id_ = Misc().clean_f(id_)
try:
if not request.headers:
raise AuthError({"result": False, "msg": "no header provided"})
raise AuthError({"result": False, "msg": "no headers provided"})

x_api_token_ = request.headers["X-Api-Token"] if "X-Api-Token" in request.headers and request.headers["X-Api-Token"] is not None else None
if not x_api_token_:
Expand Down Expand Up @@ -5186,7 +5186,7 @@ def get_data_f(id_):
res_ = None
try:
if not request.headers:
raise AuthError({"result": False, "msg": "no header provided"})
raise AuthError({"result": False, "msg": "no headers provided"})
id_ = Misc().clean_f(id_)
user_ = None
api_token_ = request.headers["X-Api-Token"] if "X-Api-Token" in request.headers and request.headers["X-Api-Token"] is not None else None
Expand Down
4 changes: 2 additions & 2 deletions pwa/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "technoplatz-bi-pwa",
"version": "4.5.1",
"version": "4.5.2",
"author": "Mustafa Mat, Technoplatz IT Solutions GmbH",
"homepage": "https://bi.technoplatz.com",
"scripts": {
"ng": "ng",
"start": "ng serve",
"prebuild": "npm --no-git-tag-version version patch",
"build": "ng build",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
Expand Down
4 changes: 2 additions & 2 deletions pwa/src/app/classes/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,10 @@ export class Miscellaneous {
}

async doMessage(msg: string, type: string) {
type === "error" ? console.error("*** err msg", msg) : null;
type === "error" ? console.error("!!! err msg", msg) : null;
if (msg) {
const typed: any = {
message: `${msg?.toString()?.toLowerCase()}.`,
message: `${this.translate.instant(msg?.toString())?.toLowerCase()}.`,
duration: type === "success" ? 3000 : 10000,
cssClass: type === "success" ? "toast-class-success" : type === "error" ? "toast-class-error" : "toast-class-warning",
buttons: [{
Expand Down
22 changes: 21 additions & 1 deletion pwa/src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"10-OnTheWay": "10-am-Weg",
"20-OnCustoms": "20-am-Zoll",
"2F Authentication": "Zwei-Faktor-Authentifizierung",
"2FA required": "2FA erforderlich",
"30-OnCustomsProcess": "30-am-ZollProzess",
"40-ClearanceCompleted": "40-AbfertigungErledigt",
"50-OnTheTouchpoint": "50-aufDepode",
Expand Down Expand Up @@ -193,9 +194,28 @@
"You can edit the query or get help from the Administrators": "Sie können die Abfrage bearbeiten oder die Hilfe des Administrators in Anspruch nehmen",
"Your OTP has been sent by E-mail": "Ihr Verifizierungscode wurde jetzt per E-Mail versandt",
"and": "und",
"file was imported successfully": "Datei wurde erfolgreich importiert",
"in": "enthalten",
"input is missing": "Eingabe fehlt",
"invalid cron format": "ungültiges Cron-Format",
"invalid crontab": "ungültige crontab",
"invalid session": "Sitzung ungültig",
"invalid user session": "ungültige Benutzersitzung",
"live": "live",
"missing token": "fehlendes Token",
"no authentication": "keine Authentifizierung",
"no data provided": "keine Daten bereitgestellt",
"no document included": "kein Dokument enthalten",
"no headers provided": "keine Header bereitgestellt",
"no operation found": "keine Operation gefunden",
"no process provided": "kein Prozess bereitgestellt",
"no request provided": "keine Anfrage bereitgestellt",
"operation not supported": "Operation nicht unterstützt",
"please find the error details in the email we've just sent you": "Bitte entnehmen Sie die Fehlerdetails der E-Mail, die wir Ihnen soeben geschickt haben",
"records are displayed": "Datensatz wird angezeigt",
"records were filtered": "Datensätze wurden gefiltert",
"test": "Test"
"test": "Test",
"update completed successfully": "Aktualisierung erfolgreich abgeschlossen",
"user session ended": "Benutzersitzung beendet",
"user session not found": "Benutzersitzung nicht gefunden"
}
22 changes: 21 additions & 1 deletion pwa/src/assets/i18n/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"10-OnTheWay": "10-Yolda",
"20-OnCustoms": "20-Gümrükte",
"2F Authentication": "İki Aşamalı Doğrulama",
"2FA required": "Tek kullanımlık şifre zorunludur",
"30-OnCustomsProcess": "30-Gümrükleniyor",
"40-ClearanceCompleted": "40-GümrüklemeTamamlandı",
"50-OnTheTouchpoint": "50-Depoda",
Expand Down Expand Up @@ -193,9 +194,28 @@
"You can edit the query or get help from the Administrators": "Sorguyu düzenleyebilir ya da Yöneticiden yardım isteyebilirsiniz",
"Your OTP has been sent by E-mail": "Doğrulama kodunuz şimdi E-posta ile gönderildi",
"and": "ve",
"file was imported successfully": "dosya başarıyla aktarıldı",
"in": "içerir",
"input is missing": "veri eksik",
"invalid cron format": "geçersiz crontab format",
"invalid crontab": "geçersiz crontab",
"invalid session": "geçersiz oturum",
"invalid user session": "kullanıcı oturumu geçersiz",
"live": "Canlı",
"missing token": "geçersiz token",
"no authentication": "yetkilendirme sorunu",
"no data provided": "veri sağlanmadı",
"no document included": "döküman eklenmemiş",
"no headers provided": "istek başlığı bulunamadı",
"no operation found": "geçersiz operasyon",
"no process provided": "işlem belirtilmedi",
"no request provided": "geçerli istek yaılmadı",
"operation not supported": "desteklenmeyen operasyon",
"please find the error details in the email we've just sent you": "Lütfen eposta ile gönderdiğimiz yükleme sonuçlarına bakınız",
"records are displayed": "kayıt gösterilmektedir",
"records were filtered": "kayıt filtrelendi",
"test": "Test"
"test": "Test",
"update completed successfully": "kayıt başarıyla güncellendi",
"user session ended": "oturum sonlandırıldı",
"user session not found": "kullanıcı oturumu bulunamadı"
}
6 changes: 3 additions & 3 deletions pwa/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
<meta name="theme-color" content="#ffffff" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="icon" type="image/png" href="assets/icon/favicon.png" />
<link rel="apple-touch-icon" href="assets/icon/favicon.png">
<link rel="manifest" href="manifest.webmanifest" crossorigin="use-credentials">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<link rel="icon" type="image/png" href="assets/icon/favicon.png" />
<link rel="apple-touch-icon" href="assets/icon/favicon.png">
<link rel="manifest" href="manifest.webmanifest" crossorigin="use-credentials">
</head>

<body>
Expand Down

0 comments on commit 2b67b56

Please sign in to comment.