Skip to content

Commit 6dbe7ea

Browse files
hotlongCopilot
andcommitted
feat(app-crm): translate select option values for dashboard widgets
Add missing option translations so dashboard pivot/charts that group by select fields render localized values: - opportunity.lead_source.options (web/referral/event/partner/...) - case.origin.options (email/phone/web/chat/social_media) Add widget title/description for sales_dashboard pipeline_stage_by_source in all four locales (zh-CN, en, ja-JP, es-ES). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d005633 commit 6dbe7ea

5 files changed

Lines changed: 132 additions & 16 deletions

File tree

examples/app-crm/dist/objectstack.json

Lines changed: 84 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,15 @@
415415
"label": "Created Date"
416416
},
417417
"lead_source": {
418-
"label": "Lead Source"
418+
"label": "Lead Source",
419+
"options": {
420+
"web": "Web",
421+
"referral": "Referral",
422+
"event": "Event",
423+
"partner": "Partner",
424+
"advertisement": "Advertisement",
425+
"cold_call": "Cold Call"
426+
}
419427
},
420428
"competitors": {
421429
"label": "Competitors"
@@ -490,7 +498,14 @@
490498
"label": "Case Type"
491499
},
492500
"origin": {
493-
"label": "Case Origin"
501+
"label": "Case Origin",
502+
"options": {
503+
"email": "Email",
504+
"phone": "Phone",
505+
"web": "Web",
506+
"chat": "Chat",
507+
"social_media": "Social Media"
508+
}
494509
},
495510
"owner": {
496511
"label": "Case Owner"
@@ -1208,6 +1223,10 @@
12081223
"top_opportunities": {
12091224
"title": "Top Open Opportunities",
12101225
"description": "Highest-value deals still in flight"
1226+
},
1227+
"pipeline_stage_by_source": {
1228+
"title": "Pipeline by Stage × Lead Source",
1229+
"description": "Cross-tab of open opportunity amount by stage and source"
12111230
}
12121231
}
12131232
},
@@ -1852,7 +1871,14 @@
18521871
"label": "负责人"
18531872
},
18541873
"origin": {
1855-
"label": "工单来源"
1874+
"label": "工单来源",
1875+
"options": {
1876+
"email": "邮件",
1877+
"phone": "电话",
1878+
"web": "网站",
1879+
"chat": "在线客服",
1880+
"social_media": "社交媒体"
1881+
}
18561882
},
18571883
"created_date": {
18581884
"label": "创建日期"
@@ -2302,7 +2328,15 @@
23022328
"label": "创建日期"
23032329
},
23042330
"lead_source": {
2305-
"label": "线索来源"
2331+
"label": "线索来源",
2332+
"options": {
2333+
"web": "网站",
2334+
"referral": "推荐",
2335+
"event": "活动",
2336+
"partner": "合作伙伴",
2337+
"advertisement": "广告",
2338+
"cold_call": "陌生拜访"
2339+
}
23062340
},
23072341
"competitors": {
23082342
"label": "竞争对手"
@@ -2567,6 +2601,10 @@
25672601
"top_opportunities": {
25682602
"title": "重点商机",
25692603
"description": "当前金额最高的进行中商机"
2604+
},
2605+
"pipeline_stage_by_source": {
2606+
"title": "阶段 × 线索来源",
2607+
"description": "按阶段和来源交叉统计进行中商机金额"
25702608
}
25712609
}
25722610
},
@@ -3033,7 +3071,15 @@
30333071
"label": "作成日"
30343072
},
30353073
"lead_source": {
3036-
"label": "リードソース"
3074+
"label": "リードソース",
3075+
"options": {
3076+
"web": "ウェブ",
3077+
"referral": "紹介",
3078+
"event": "イベント",
3079+
"partner": "パートナー",
3080+
"advertisement": "広告",
3081+
"cold_call": "コールドコール"
3082+
}
30373083
},
30383084
"competitors": {
30393085
"label": "競合他社"
@@ -3108,7 +3154,14 @@
31083154
"label": "ケース種別"
31093155
},
31103156
"origin": {
3111-
"label": "ケース発生元"
3157+
"label": "ケース発生元",
3158+
"options": {
3159+
"email": "メール",
3160+
"phone": "電話",
3161+
"web": "ウェブ",
3162+
"chat": "チャット",
3163+
"social_media": "ソーシャルメディア"
3164+
}
31123165
},
31133166
"owner": {
31143167
"label": "ケース担当者"
@@ -3826,6 +3879,10 @@
38263879
"top_opportunities": {
38273880
"title": "主要オープン商談",
38283881
"description": "最も金額の大きい進行中商談"
3882+
},
3883+
"pipeline_stage_by_source": {
3884+
"title": "ステージ × リードソース",
3885+
"description": "ステージとソース別の進行中商談金額のクロス集計"
38293886
}
38303887
}
38313888
},
@@ -4292,7 +4349,15 @@
42924349
"label": "Fecha de Creación"
42934350
},
42944351
"lead_source": {
4295-
"label": "Origen del Prospecto"
4352+
"label": "Origen del Prospecto",
4353+
"options": {
4354+
"web": "Web",
4355+
"referral": "Referido",
4356+
"event": "Evento",
4357+
"partner": "Socio",
4358+
"advertisement": "Publicidad",
4359+
"cold_call": "Llamada en Frío"
4360+
}
42964361
},
42974362
"competitors": {
42984363
"label": "Competidores"
@@ -4367,7 +4432,14 @@
43674432
"label": "Tipo de Caso"
43684433
},
43694434
"origin": {
4370-
"label": "Origen del Caso"
4435+
"label": "Origen del Caso",
4436+
"options": {
4437+
"email": "Email",
4438+
"phone": "Teléfono",
4439+
"web": "Web",
4440+
"chat": "Chat",
4441+
"social_media": "Redes Sociales"
4442+
}
43714443
},
43724444
"owner": {
43734445
"label": "Propietario del Caso"
@@ -5085,6 +5157,10 @@
50855157
"top_opportunities": {
50865158
"title": "Oportunidades abiertas principales",
50875159
"description": "Negocios de mayor valor aún en curso"
5160+
},
5161+
"pipeline_stage_by_source": {
5162+
"title": "Pipeline por Etapa × Origen",
5163+
"description": "Tabla cruzada del importe de oportunidades abiertas por etapa y origen"
50885164
}
50895165
}
50905166
},

examples/app-crm/src/translations/en.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,13 @@ export const en: TranslationData = {
206206
description: { label: 'Description' },
207207
next_step: { label: 'Next Step' },
208208
created_date: { label: 'Created Date' },
209-
lead_source: { label: 'Lead Source' },
209+
lead_source: {
210+
label: 'Lead Source',
211+
options: {
212+
web: 'Web', referral: 'Referral', event: 'Event',
213+
partner: 'Partner', advertisement: 'Advertisement', cold_call: 'Cold Call',
214+
},
215+
},
210216
competitors: { label: 'Competitors' },
211217
campaign: { label: 'Campaign' },
212218
days_in_stage: { label: 'Days in Current Stage' },
@@ -244,7 +250,10 @@ export const en: TranslationData = {
244250
status: { label: 'Status' },
245251
priority: { label: 'Priority' },
246252
type: { label: 'Case Type' },
247-
origin: { label: 'Case Origin' },
253+
origin: {
254+
label: 'Case Origin',
255+
options: { email: 'Email', phone: 'Phone', web: 'Web', chat: 'Chat', social_media: 'Social Media' },
256+
},
248257
owner: { label: 'Case Owner' },
249258
created_date: { label: 'Created Date' },
250259
closed_date: { label: 'Closed Date' },
@@ -569,6 +578,7 @@ export const en: TranslationData = {
569578
opportunities_by_owner: { title: 'Opportunities by Owner', description: 'Open pipeline value per sales rep' },
570579
lead_source_breakdown: { title: 'Lead Source', description: 'Where our pipeline is coming from' },
571580
top_opportunities: { title: 'Top Open Opportunities', description: 'Highest-value deals still in flight' },
581+
pipeline_stage_by_source: { title: 'Pipeline by Stage × Lead Source', description: 'Cross-tab of open opportunity amount by stage and source' },
572582
},
573583
},
574584
service_dashboard: {

examples/app-crm/src/translations/es-ES.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,13 @@ export const esES: TranslationData = {
205205
description: { label: 'Descripción' },
206206
next_step: { label: 'Próximo Paso' },
207207
created_date: { label: 'Fecha de Creación' },
208-
lead_source: { label: 'Origen del Prospecto' },
208+
lead_source: {
209+
label: 'Origen del Prospecto',
210+
options: {
211+
web: 'Web', referral: 'Referido', event: 'Evento',
212+
partner: 'Socio', advertisement: 'Publicidad', cold_call: 'Llamada en Frío',
213+
},
214+
},
209215
competitors: { label: 'Competidores' },
210216
campaign: { label: 'Campaña' },
211217
days_in_stage: { label: 'Días en Etapa Actual' },
@@ -243,7 +249,10 @@ export const esES: TranslationData = {
243249
status: { label: 'Estado' },
244250
priority: { label: 'Prioridad' },
245251
type: { label: 'Tipo de Caso' },
246-
origin: { label: 'Origen del Caso' },
252+
origin: {
253+
label: 'Origen del Caso',
254+
options: { email: 'Email', phone: 'Teléfono', web: 'Web', chat: 'Chat', social_media: 'Redes Sociales' },
255+
},
247256
owner: { label: 'Propietario del Caso' },
248257
created_date: { label: 'Fecha de Creación' },
249258
closed_date: { label: 'Fecha de Cierre' },
@@ -568,6 +577,7 @@ export const esES: TranslationData = {
568577
opportunities_by_owner: { title: 'Oportunidades por responsable', description: 'Valor del pipeline abierto por representante' },
569578
lead_source_breakdown: { title: 'Origen del prospecto', description: 'De dónde proviene nuestro pipeline' },
570579
top_opportunities: { title: 'Oportunidades abiertas principales', description: 'Negocios de mayor valor aún en curso' },
580+
pipeline_stage_by_source: { title: 'Pipeline por Etapa × Origen', description: 'Tabla cruzada del importe de oportunidades abiertas por etapa y origen' },
571581
},
572582
},
573583
service_dashboard: {

examples/app-crm/src/translations/ja-JP.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,13 @@ export const jaJP: TranslationData = {
205205
description: { label: '説明' },
206206
next_step: { label: '次のステップ' },
207207
created_date: { label: '作成日' },
208-
lead_source: { label: 'リードソース' },
208+
lead_source: {
209+
label: 'リードソース',
210+
options: {
211+
web: 'ウェブ', referral: '紹介', event: 'イベント',
212+
partner: 'パートナー', advertisement: '広告', cold_call: 'コールドコール',
213+
},
214+
},
209215
competitors: { label: '競合他社' },
210216
campaign: { label: 'キャンペーン' },
211217
days_in_stage: { label: '現ステージ滞在日数' },
@@ -243,7 +249,10 @@ export const jaJP: TranslationData = {
243249
status: { label: 'ステータス' },
244250
priority: { label: '優先度' },
245251
type: { label: 'ケース種別' },
246-
origin: { label: 'ケース発生元' },
252+
origin: {
253+
label: 'ケース発生元',
254+
options: { email: 'メール', phone: '電話', web: 'ウェブ', chat: 'チャット', social_media: 'ソーシャルメディア' },
255+
},
247256
owner: { label: 'ケース担当者' },
248257
created_date: { label: '作成日' },
249258
closed_date: { label: 'クローズ日' },
@@ -568,6 +577,7 @@ export const jaJP: TranslationData = {
568577
opportunities_by_owner: { title: '担当者別商談', description: '営業担当ごとのオープンパイプライン金額' },
569578
lead_source_breakdown: { title: 'リードソース', description: 'パイプラインの流入元' },
570579
top_opportunities: { title: '主要オープン商談', description: '最も金額の大きい進行中商談' },
580+
pipeline_stage_by_source: { title: 'ステージ × リードソース', description: 'ステージとソース別の進行中商談金額のクロス集計' },
571581
},
572582
},
573583
service_dashboard: {

examples/app-crm/src/translations/zh-CN.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,10 @@ export const zhCN: TranslationData = {
285285
},
286286
type: { label: '类型' },
287287
owner: { label: '负责人' },
288-
origin: { label: '工单来源' },
288+
origin: {
289+
label: '工单来源',
290+
options: { email: '邮件', phone: '电话', web: '网站', chat: '在线客服', social_media: '社交媒体' },
291+
},
289292
created_date: { label: '创建日期' },
290293
closed_date: { label: '关闭日期' },
291294
first_response_date: { label: '首次响应日期' },
@@ -500,7 +503,13 @@ export const zhCN: TranslationData = {
500503
description: { label: '描述' },
501504
next_step: { label: '下一步' },
502505
created_date: { label: '创建日期' },
503-
lead_source: { label: '线索来源' },
506+
lead_source: {
507+
label: '线索来源',
508+
options: {
509+
web: '网站', referral: '推荐', event: '活动',
510+
partner: '合作伙伴', advertisement: '广告', cold_call: '陌生拜访',
511+
},
512+
},
504513
competitors: { label: '竞争对手' },
505514
campaign: { label: '营销活动' },
506515
days_in_stage: { label: '当前阶段天数' },
@@ -641,6 +650,7 @@ export const zhCN: TranslationData = {
641650
opportunities_by_owner: { title: '负责人商机分布', description: '各销售负责的进行中商机' },
642651
lead_source_breakdown: { title: '线索来源分布', description: '按来源统计的线索数量' },
643652
top_opportunities: { title: '重点商机', description: '当前金额最高的进行中商机' },
653+
pipeline_stage_by_source: { title: '阶段 × 线索来源', description: '按阶段和来源交叉统计进行中商机金额' },
644654
},
645655
},
646656
service_dashboard: {

0 commit comments

Comments
 (0)