Browse Source

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 tháng trước cách đây
mục cha
commit
98e02532cf

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

@@ -81,6 +81,6 @@
     "tailwindcss": "^3.4.11",
     "typescript": "^5.5.3",
     "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 = [
     {
       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,
     },
     {
       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,
     },
     {
       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,
     },
   ];
@@ -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">
         <DialogHeader>
           <DialogTitle className="text-xl font-semibold text-white">
-            {t("callLogs.export.title")}
+            {t("callLogs.exportDialog.title")}
           </DialogTitle>
         </DialogHeader>
 
         <div className="py-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>
 
           <RadioGroup
@@ -119,7 +119,7 @@ export function ExportModal({ isOpen, onClose, data, onExport }: ExportModalProp
             disabled={isExporting}
           >
             <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>
         </DialogFooter>
       </DialogContent>

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

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

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

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

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

@@ -276,7 +276,7 @@
       "cost": "Költség",
       "actions": "Műveletek"
     },
-    "export": {
+    "exportDialog": {
       "title": "Hívásnapló Exportálása",
       "description": "{{count}} hívásnapló exportálása a választott formátumban",
       "download": "Letöltés",
@@ -881,7 +881,7 @@
       },
       "disclaimer": {
         "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": {
         "title": "Korlátozások",
@@ -929,7 +929,7 @@
       },
       "disclaimerSection": {
         "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."
       },
       "limitationsSection": {