From 84ba03433787e265d8b8bc1c57079d4641f98f67 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Wed, 10 Aug 2022 11:13:58 +0530 Subject: [PATCH] incr: append lang and country to report --- src/errorHandling.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/errorHandling.ts b/src/errorHandling.ts index 7559e233..66e6a81a 100644 --- a/src/errorHandling.ts +++ b/src/errorHandling.ts @@ -1,5 +1,6 @@ import { ipcRenderer } from 'electron'; import { t } from 'fyo'; +import { ConfigKeys } from 'fyo/core/types'; import { Doc } from 'fyo/model/doc'; import { BaseError } from 'fyo/utils/errors'; import { ErrorLog } from 'fyo/utils/types'; @@ -176,6 +177,11 @@ function getIssueUrlQuery(errorLogObj?: ErrorLog): string { body.push(`**Platform**: \`${fyo.store.platform}\``); body.push(`**Path**: \`${router.currentRoute.value.fullPath}\``); + body.push(`**Language**: \`${fyo.config.get(ConfigKeys.Language)}\``); + if (fyo.singles.SystemSettings?.countryCode) { + body.push(`**Country**: \`${fyo.singles.SystemSettings.countryCode}\``); + } + const url = [baseUrl, `body=${body.join('\n')}`].join('&'); return encodeURI(url); }