Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions desk/src/components/CommunicationArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Button
ref="sendEmailRef"
variant="ghost"
label="Reply"
:label="__('Reply')"
:class="[
showEmailBox ? '!bg-surface-gray-4 hover:!bg-surface-gray-3' : '',
]"
Expand All @@ -19,7 +19,7 @@
</Button>
<Button
variant="ghost"
label="Comment"
:label="__('Comment')"
:class="[
showCommentBox ? '!bg-surface-gray-4 hover:!bg-surface-gray-3' : '',
]"
Expand Down Expand Up @@ -79,10 +79,10 @@
ref="commentTextEditorRef"
:label="
isMobileView
? 'Comment'
? __('Comment')
: isMac
? 'Comment (⌘ + ⏎)'
: 'Comment (Ctrl + ⏎)'
? __('Comment (⌘ + ⏎)')
: __('Comment (Ctrl + ⏎)')
"
:ticketId="ticketId"
:editable="showCommentBox"
Expand Down
12 changes: 6 additions & 6 deletions desk/src/components/ticket-agent/TicketActivityPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,25 @@ const tabs: ComputedRef<TabObject[]> = computed(() => {
const _tabs: TabObject[] = [
{
name: "activity",
label: "Activity",
label: __("Activity"),
icon: ActivityIcon,
},
{
name: "email",
label: "Emails",
label: __("Emails"),
icon: EmailIcon,
},
{
name: "comment",
label: "Comments",
label: __("Comments"),
icon: CommentIcon,
},
];

if (isCallingEnabled.value) {
_tabs.push({
name: "call",
label: "Calls",
label: __("Calls"),
icon: PhoneIcon,
});
}
Expand Down Expand Up @@ -175,7 +175,7 @@ const _activities = computed(() => {
return {
type: "history",
key: h.creation,
content: h.action ? h.action : "viewed this",
content: h.action ? h.action : __("viewed this"),
Comment thread
greptile-apps[bot] marked this conversation as resolved.
creation: h.creation,
user: h.user.name + " ",
};
Expand Down Expand Up @@ -215,7 +215,7 @@ const _activities = computed(() => {
if (
nextActivity &&
nextActivity.user === currentActivity.user &&
nextActivity.content !== "viewed this" &&
nextActivity.content !== __("viewed this") &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Mobile activity grouping stays untranslated

When a mobile user views consecutive ticket-view events in a locale translating viewed this, the mobile activity path constructs translated content but compares it with the English literal, causing those events to be folded into a “+N changes” group.

Knowledge Base Used: Desk Ticket UI

Prompt To Fix With AI
This is a comment left during a code review.
Path: desk/src/components/ticket-agent/TicketActivityPanel.vue
Line: 218

Comment:
**Mobile activity grouping stays untranslated**

When a mobile user views consecutive ticket-view events in a locale translating `viewed this`, the mobile activity path constructs translated content but compares it with the English literal, causing those events to be folded into a “+N changes” group.

**Knowledge Base Used:** [Desk Ticket UI](https://app.greptile.com/frappe/-/custom-context/knowledge-base/frappe/helpdesk/-/docs/desk-ticket-ui.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

!nextActivity.content.includes("assigned") &&
!nextActivity.content.includes("unassigned")
) {
Expand Down
24 changes: 13 additions & 11 deletions desk/src/components/ticket-agent/TicketSLA.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,16 @@ const openCard = ref<string | null>(null);
const cards = computed<SLACard[]>(() =>
[
{
title: "First Response",
title: __("First Response"),
metric: firstResponse.value,
fulfilledLabel: "Fulfilled",
actualLabel: "Responded on",
fulfilledLabel: __("Fulfilled"),
actualLabel: __("Responded on"),
},
{
title: "Resolution",
title: __("Resolution"),
metric: resolution.value,
fulfilledLabel: "Fulfilled",
actualLabel: "Resolved on",
fulfilledLabel: __("Fulfilled"),
actualLabel: __("Resolved on"),
},
].filter((card): card is SLACard => Boolean(card.metric))
);
Expand All @@ -99,11 +99,11 @@ function cardDetails(card: SLACard) {
const metric = card.metric;
const rows = [];
if (metric.dueBy) {
rows.push({ label: "Due by", value: fmt(metric.dueBy), danger: false });
rows.push({ label: __("Due by"), value: fmt(metric.dueBy), danger: false });
}
if (metric.state === "hold") {
rows.push({
label: "On hold since",
label: __("On hold since"),
value: fmt(ticket.value.doc.on_hold_since as string),
danger: false,
});
Expand All @@ -119,21 +119,23 @@ function cardDetails(card: SLACard) {
}
if (metric.delay) {
rows.push({
label: metric.delayInWorkingHours ? "Delay (working hours)" : "Delay",
label: metric.delayInWorkingHours
? __("Delay (working hours)")
: __("Delay"),
value: metric.delay,
danger: true,
});
if (metric.calendarDelay) {
rows.push({
label: "Delay (total)",
label: __("Delay (total)"),
value: `+${metric.calendarDelay}`,
danger: true,
});
}
}
if (metric.fulfilledIn) {
rows.push({
label: "Fulfilled in",
label: __("Fulfilled in"),
value: metric.fulfilledIn,
danger: false,
});
Expand Down
6 changes: 3 additions & 3 deletions desk/src/composables/useSLA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export function useSLA(ticket: Ref<TicketLike | null | undefined>): {
);
}
const overdue = coarseDuration(d.response_by);
return metric("overdue", `Overdue by ${overdue}`, "red", {
return metric("overdue", __("Overdue by {0}", [overdue]), "red", {
dueBy: d.response_by,
delay: `+${overdue}`,
});
Expand All @@ -129,7 +129,7 @@ export function useSLA(ticket: Ref<TicketLike | null | undefined>): {
d.on_hold_since &&
pausedBeforeBreach
) {
return metric("hold", "On Hold", "blue", { dueBy: d.resolution_by });
return metric("hold", __("On Hold"), "blue", { dueBy: d.resolution_by });
}

if (d.resolution_date) {
Expand Down Expand Up @@ -174,7 +174,7 @@ export function useSLA(ticket: Ref<TicketLike | null | undefined>): {
);
}
const overdue = coarseDuration(d.resolution_by);
return metric("overdue", `Overdue by ${overdue}`, "red", {
return metric("overdue", __("Overdue by {0}", [overdue]), "red", {
dueBy: d.resolution_by,
delay: `+${overdue}`,
});
Expand Down