Преглед изворни кода

fix: resolve translation JSON errors and export button issue #69

Fixed multiple translation-related issues:

1. Fixed Hungarian translation JSON syntax errors:
   - Replaced German-style quotes („") with regular quotes ('')
   - Fixed JSON parsing errors at lines 884 and 932

2. Fixed export button issue in CallLogsContent:
   - Restructured translation keys to have separate 'export' (string) and 'exportDialog' (object)
   - Previously 'export' was an object, causing "key returned an object instead of string" error
   - Updated ExportModal component to use 'callLogs.exportDialog.*' keys
   - Applied fix to all three language files (en, hu, de)

3. Updated vite dependency version to ^5.4.21

All translation files now parse correctly and TypeScript compiles without errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Claude пре 5 месеци
родитељ
комит
98e02532cf

+ 1 - 1
shopcall.ai-main/package.json

@@ -81,6 +81,6 @@
     "tailwindcss": "^3.4.11",
     "tailwindcss": "^3.4.11",
     "typescript": "^5.5.3",
     "typescript": "^5.5.3",
     "typescript-eslint": "^8.0.1",
     "typescript-eslint": "^8.0.1",
-    "vite": "^5.4.1"
+    "vite": "^5.4.21"
   }
   }
 }
 }

+ 9 - 9
shopcall.ai-main/src/components/ExportModal.tsx

@@ -38,20 +38,20 @@ export function ExportModal({ isOpen, onClose, data, onExport }: ExportModalProp
   const formatOptions = [
   const formatOptions = [
     {
     {
       value: "csv",
       value: "csv",
-      label: t("callLogs.export.formats.csv"),
-      description: t("callLogs.export.formats.csvDescription"),
+      label: t("callLogs.exportDialog.formats.csv"),
+      description: t("callLogs.exportDialog.formats.csvDescription"),
       icon: FileText,
       icon: FileText,
     },
     },
     {
     {
       value: "json",
       value: "json",
-      label: t("callLogs.export.formats.json"),
-      description: t("callLogs.export.formats.jsonDescription"),
+      label: t("callLogs.exportDialog.formats.json"),
+      description: t("callLogs.exportDialog.formats.jsonDescription"),
       icon: FileJson,
       icon: FileJson,
     },
     },
     {
     {
       value: "excel",
       value: "excel",
-      label: t("callLogs.export.formats.excel"),
-      description: t("callLogs.export.formats.excelDescription"),
+      label: t("callLogs.exportDialog.formats.excel"),
+      description: t("callLogs.exportDialog.formats.excelDescription"),
       icon: FileSpreadsheet,
       icon: FileSpreadsheet,
     },
     },
   ];
   ];
@@ -61,13 +61,13 @@ export function ExportModal({ isOpen, onClose, data, onExport }: ExportModalProp
       <DialogContent className="max-w-md bg-slate-800 border-slate-700 text-white">
       <DialogContent className="max-w-md bg-slate-800 border-slate-700 text-white">
         <DialogHeader>
         <DialogHeader>
           <DialogTitle className="text-xl font-semibold text-white">
           <DialogTitle className="text-xl font-semibold text-white">
-            {t("callLogs.export.title")}
+            {t("callLogs.exportDialog.title")}
           </DialogTitle>
           </DialogTitle>
         </DialogHeader>
         </DialogHeader>
 
 
         <div className="py-4">
         <div className="py-4">
           <p className="text-slate-400 text-sm mb-4">
           <p className="text-slate-400 text-sm mb-4">
-            {t("callLogs.export.description", { count: data.length })}
+            {t("callLogs.exportDialog.description", { count: data.length })}
           </p>
           </p>
 
 
           <RadioGroup
           <RadioGroup
@@ -119,7 +119,7 @@ export function ExportModal({ isOpen, onClose, data, onExport }: ExportModalProp
             disabled={isExporting}
             disabled={isExporting}
           >
           >
             <Download className="w-4 h-4 mr-2" />
             <Download className="w-4 h-4 mr-2" />
-            {isExporting ? t("callLogs.export.downloading") : t("callLogs.export.download")}
+            {isExporting ? t("callLogs.exportDialog.downloading") : t("callLogs.exportDialog.download")}
           </Button>
           </Button>
         </DialogFooter>
         </DialogFooter>
       </DialogContent>
       </DialogContent>

+ 1 - 1
shopcall.ai-main/src/i18n/locales/de.json

@@ -276,7 +276,7 @@
       "cost": "Kosten",
       "cost": "Kosten",
       "actions": "Aktionen"
       "actions": "Aktionen"
     },
     },
-    "export": {
+    "exportDialog": {
       "title": "Anrufprotokolle Exportieren",
       "title": "Anrufprotokolle Exportieren",
       "description": "{{count}} Anrufprotokolle in Ihrem bevorzugten Format exportieren",
       "description": "{{count}} Anrufprotokolle in Ihrem bevorzugten Format exportieren",
       "download": "Herunterladen",
       "download": "Herunterladen",

+ 1 - 1
shopcall.ai-main/src/i18n/locales/en.json

@@ -286,7 +286,7 @@
       "cost": "Cost",
       "cost": "Cost",
       "actions": "Actions"
       "actions": "Actions"
     },
     },
-    "export": {
+    "exportDialog": {
       "title": "Export Call Logs",
       "title": "Export Call Logs",
       "description": "Export {{count}} call logs in your preferred format",
       "description": "Export {{count}} call logs in your preferred format",
       "download": "Download",
       "download": "Download",

+ 3 - 3
shopcall.ai-main/src/i18n/locales/hu.json

@@ -276,7 +276,7 @@
       "cost": "Költség",
       "cost": "Költség",
       "actions": "Műveletek"
       "actions": "Műveletek"
     },
     },
-    "export": {
+    "exportDialog": {
       "title": "Hívásnapló Exportálása",
       "title": "Hívásnapló Exportálása",
       "description": "{{count}} hívásnapló exportálása a választott formátumban",
       "description": "{{count}} hívásnapló exportálása a választott formátumban",
       "download": "Letöltés",
       "download": "Letöltés",
@@ -881,7 +881,7 @@
       },
       },
       "disclaimer": {
       "disclaimer": {
         "title": "Nyilatkozat",
         "title": "Nyilatkozat",
-        "description": "A ShopCall.ai anyagai „ahogy van" alapon kerülnek biztosításra. A MarketingBrigad Ltd nem vállal semmilyen kifejezett vagy hallgatólagos garanciát."
+        "description": "A ShopCall.ai anyagai 'ahogy van' alapon kerülnek biztosításra. A MarketingBrigad Ltd nem vállal semmilyen kifejezett vagy hallgatólagos garanciát."
       },
       },
       "limitations": {
       "limitations": {
         "title": "Korlátozások",
         "title": "Korlátozások",
@@ -929,7 +929,7 @@
       },
       },
       "disclaimerSection": {
       "disclaimerSection": {
         "title": "5. Nyilatkozat",
         "title": "5. Nyilatkozat",
-        "paragraph1": "A ShopCall.ai anyagai „ahogy van" alapon kerülnek biztosításra. A MarketingBrigad Ltd nem vállal kifejezett vagy hallgatólagos garanciát, és ezennel elutasít és megtagad minden egyéb garanciát, beleértve korlátozás nélkül az eladhatóságra, adott célra való alkalmasságra vagy szellemi tulajdon megsértésének hiányára vonatkozó hallgatólagos garanciákat vagy feltételeket.",
+        "paragraph1": "A ShopCall.ai anyagai 'ahogy van' alapon kerülnek biztosításra. A MarketingBrigad Ltd nem vállal kifejezett vagy hallgatólagos garanciát, és ezennel elutasít és megtagad minden egyéb garanciát, beleértve korlátozás nélkül az eladhatóságra, adott célra való alkalmasságra vagy szellemi tulajdon megsértésének hiányára vonatkozó hallgatólagos garanciákat vagy feltételeket.",
         "paragraph2": "Továbbá, a MarketingBrigad Ltd nem garantálja és nem tesz kijelentéseket a weboldalán található anyagok pontosságára, valószínű eredményeire vagy megbízhatóságára vonatkozóan."
         "paragraph2": "Továbbá, a MarketingBrigad Ltd nem garantálja és nem tesz kijelentéseket a weboldalán található anyagok pontosságára, valószínű eredményeire vagy megbízhatóságára vonatkozóan."
       },
       },
       "limitationsSection": {
       "limitationsSection": {