Skip to content

Commit 4484f26

Browse files
Stefan ErnstStefan Ernst
authored andcommitted
Translation issue and minor prompt fix
1 parent bc59a9e commit 4484f26

6 files changed

Lines changed: 70 additions & 8 deletions

File tree

frontend/src/lib/locales/ar/ui.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,27 @@ export default {
121121
narrowWidth: 'ضيق (1/3 العرض)',
122122
mediumWidth: 'متوسط (2/3 العرض)',
123123
fullWidth: 'عرض كامل',
124+
chart: {
125+
items: 'عناصر',
126+
},
127+
completionChart: {
128+
emptyMessage: 'لا تتوفر بيانات الإنجاز',
129+
},
130+
createdChart: {
131+
emptyMessage: 'لا تتوفر بيانات الإنشاء',
132+
},
133+
milestoneProgress: {
134+
emptyTitle: 'لا توجد معالم',
135+
emptySubtitle: 'أنشئ معالم لتتبع التقدم',
136+
due: 'الاستحقاق',
137+
done: 'مكتمل',
138+
item: 'عنصر',
139+
items: 'عناصر',
140+
noItems: 'لا توجد عناصر',
141+
noStatus: 'بدون حالة',
142+
activeMilestone: 'نشط',
143+
noCategorizedWork: 'لا يوجد عمل مصنف',
144+
},
124145
},
125146

126147
footer: {

frontend/src/lib/locales/de/ui.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,14 @@ export default {
393393
milestoneProgress: {
394394
emptyTitle: 'Keine Meilensteine',
395395
emptySubtitle: 'Erstellen Sie Meilensteine, um den Fortschritt zu verfolgen',
396+
due: 'Fällig',
397+
done: 'erledigt',
398+
item: 'Element',
399+
items: 'Elemente',
400+
noItems: 'Keine Elemente',
401+
noStatus: 'Kein Status',
402+
activeMilestone: 'Aktiv',
403+
noCategorizedWork: 'Keine kategorisierte Arbeit',
396404
},
397405
},
398406

frontend/src/lib/locales/en/ui.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,14 @@ export default {
387387
milestoneProgress: {
388388
emptyTitle: 'No milestones',
389389
emptySubtitle: 'Create milestones to track progress',
390+
due: 'Due',
391+
done: 'done',
392+
item: 'item',
393+
items: 'items',
394+
noItems: 'No items',
395+
noStatus: 'No status',
396+
activeMilestone: 'Active',
397+
noCategorizedWork: 'No categorized work',
390398
},
391399
},
392400

frontend/src/lib/locales/es/ui.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,27 @@ export default {
118118
narrowWidth: 'Estrecho (1/3 de ancho)',
119119
mediumWidth: 'Medio (2/3 de ancho)',
120120
fullWidth: 'Ancho completo',
121+
chart: {
122+
items: 'elementos',
123+
},
124+
completionChart: {
125+
emptyMessage: 'No hay datos de finalización disponibles',
126+
},
127+
createdChart: {
128+
emptyMessage: 'No hay datos de creación disponibles',
129+
},
130+
milestoneProgress: {
131+
emptyTitle: 'Sin hitos',
132+
emptySubtitle: 'Crea hitos para seguir el progreso',
133+
due: 'Vence',
134+
done: 'completados',
135+
item: 'elemento',
136+
items: 'elementos',
137+
noItems: 'Sin elementos',
138+
noStatus: 'Sin estado',
139+
activeMilestone: 'Activo',
140+
noCategorizedWork: 'Sin trabajo categorizado',
141+
},
121142
},
122143

123144
footer: {},

internal/handlers/ai.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ func (h *AIHandler) DecomposeItem(w http.ResponseWriter, r *http.Request) {
764764
systemPrompt := `You are a project management assistant. Given a work item, suggest how to break it down into smaller sub-tasks.
765765
766766
Return a JSON object with:
767-
- sub_tasks: array with title (imperative form) and description (1-2 sentences)
767+
- sub_tasks: array of objects, each with "title" (string, imperative form) and "description" (string, 1-2 sentences)
768768
- reasoning: brief explanation of the decomposition approach
769769
770770
Suggest 3-8 meaningful, actionable sub-tasks. Don't create trivially small tasks. If existing children are listed, don't duplicate them.`

internal/llm/openai.go

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,17 @@ func (c *openaiClient) ChatCompletion(ctx context.Context, req ChatCompletionReq
5454

5555
// Add response_format for structured output
5656
if req.StructuredOutput != nil && len(req.StructuredOutput.Schema) > 0 {
57-
bodyMap["response_format"] = map[string]interface{}{
58-
"type": "json_schema",
59-
"json_schema": map[string]interface{}{
60-
"name": req.StructuredOutput.SchemaName,
61-
"schema": req.StructuredOutput.Schema,
62-
"strict": req.StructuredOutput.Strict,
63-
},
57+
// Unmarshal schema to interface{} so it embeds correctly in the JSON
58+
var schemaObj interface{}
59+
if err := json.Unmarshal(req.StructuredOutput.Schema, &schemaObj); err == nil {
60+
bodyMap["response_format"] = map[string]interface{}{
61+
"type": "json_schema",
62+
"json_schema": map[string]interface{}{
63+
"name": req.StructuredOutput.SchemaName,
64+
"schema": schemaObj,
65+
"strict": req.StructuredOutput.Strict,
66+
},
67+
}
6468
}
6569
}
6670

0 commit comments

Comments
 (0)