Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3871bd6
feat(i18n): Add translation wrappers to Settings Vue components
bvisible Jan 1, 2026
a64c87b
feat(i18n): Add translation wrappers to more Settings Vue components
bvisible Jan 1, 2026
7520d54
feat(i18n): Add translation wrappers to Settings components
bvisible Jan 1, 2026
690b32b
feat(i18n): Add translation wrappers to modal components
bvisible Jan 1, 2026
68ee4e1
feat(i18n): Add translation wrappers to more modal components
bvisible Jan 1, 2026
ea9986e
feat(i18n): Add translation wrappers to remaining modal components
bvisible Jan 1, 2026
5bde5f4
feat(i18n): Add translation wrappers to page components
bvisible Jan 1, 2026
461975f
feat(i18n): Add translation wrappers to ticket page components
bvisible Jan 1, 2026
bcad57c
feat(i18n): Add translation wrappers to more ticket page components
bvisible Jan 1, 2026
1ebf179
feat(i18n): Add translation wrappers to utility components
bvisible Jan 1, 2026
441351e
feat(i18n): Add translation wrappers to more utility components
bvisible Jan 1, 2026
762fef2
feat(i18n): Add translations to CommentBox, DiscardButton, EmailArea …
bvisible Jan 1, 2026
4d4d8ce
feat(i18n): Add translations to remaining Vue components
bvisible Jan 1, 2026
bc1cf54
feat(i18n): Add translations to Filter, EmailEditor, and telephony co…
bvisible Jan 1, 2026
b5ae086
style: Format Vue files with prettier
bvisible Jan 1, 2026
610b3c6
style: Format all Vue files with prettier
bvisible Jan 1, 2026
a5cae62
chore: Bump version from 1.18.0 to 1.18.1
RitvikSardana Jan 2, 2026
297cf80
fix: dont run onClick twice
RitvikSardana Jan 6, 2026
4ea0203
fix: revert translation changes
RitvikSardana Jan 6, 2026
4a8aed7
chore: Added missing translations for pt_BR on locale/pt_BR.po file
DaviWollmann Jan 11, 2026
711a611
Merge branch 'bvisible-feat/i18n-vue-translations' into develop
DaviWollmann Jan 11, 2026
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
5 changes: 3 additions & 2 deletions desk/src/components/AssignmentModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<Dialog
v-model="show"
:options="{
title: 'Assign To',
title: __('Assign To'),
size: 'xl',
}"
>
<template #body-content>
<AutocompleteNew
v-if="showRestrictedMembers"
placeholder="Search agents"
:placeholder="__('Search agents')"
:model-value="search"
:options="members"
@update:model-value="
Expand Down Expand Up @@ -87,6 +87,7 @@ import { useUserStore } from "@/stores/user";
import { call, createResource } from "frappe-ui";
import { useOnboarding } from "frappe-ui/frappe";
import { computed, onMounted, ref } from "vue";
import { __ } from "@/translation";

const props = defineProps({
doctype: {
Expand Down
5 changes: 3 additions & 2 deletions desk/src/components/Autocomplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
type="text"
:value="query"
autocomplete="off"
placeholder="Search"
:placeholder="__('Search')"
@change="
(e) => {
query = e.target.value;
Expand Down Expand Up @@ -104,7 +104,7 @@
v-if="groups.length == 0"
class="mt-1.5 rounded-md px-2.5 py-1.5 text-base text-gray-600"
>
No results found
{{ __("No results found") }}
</li>
</ComboboxOptions>
<div v-if="slots.footer" class="border-t p-1.5 pb-0.5">
Expand All @@ -129,6 +129,7 @@ import {
} from "@headlessui/vue";
import { Popover, Button, FeatherIcon } from "frappe-ui";
import { ref, computed, useAttrs, useSlots, watch, nextTick } from "vue";
import { __ } from "@/translation";

const props = defineProps({
modelValue: {
Expand Down
31 changes: 18 additions & 13 deletions desk/src/components/CommentBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<span class="font-medium text-gray-800">
{{ commenter }}
</span>
<span> added a</span>
<span> {{ __("added a") }}</span>
<span class="max-w-xs truncate font-medium text-gray-800">
comment
{{ __("comment") }}
</span>
</p>
</div>
Expand All @@ -28,13 +28,13 @@
:placement="'right'"
:options="[
{
label: 'Edit',
label: __('Edit'),
onClick: () => handleEditMode(),
icon: 'edit-2',
condition: () => !isTicketMergedComment,
},
{
label: 'Delete',
label: __('Delete'),
onClick: () => (showDialog = true),
icon: 'trash-2',
},
Expand Down Expand Up @@ -67,8 +67,12 @@
>
<template #bottom v-if="editable">
<div class="flex flex-row-reverse gap-2">
<Button label="Save" @click="handleSaveComment" variant="solid" />
<Button label="Discard" @click="handleDiscard" />
<Button
:label="__('Save')"
@click="handleSaveComment"
variant="solid"
/>
<Button :label="__('Discard')" @click="handleDiscard" />
</div>
</template>
</TextEditor>
Expand All @@ -85,12 +89,12 @@
<Dialog
v-model="showDialog"
:options="{
title: 'Delete Comment',
message: 'Are you sure you want to confirm this action?',
title: __('Delete Comment'),
message: __('Are you sure you want to confirm this action?'),
actions: [
{ label: 'Cancel', onClick: () => (showDialog = false) },
{ label: __('Cancel'), onClick: () => (showDialog = false) },
{
label: 'Delete',
label: __('Delete'),
onClick: () => deleteComment.submit(),
variant: 'solid',
},
Expand Down Expand Up @@ -122,6 +126,7 @@ import {
toast,
} from "frappe-ui";
import { PropType, computed, onMounted, ref } from "vue";
import { __ } from "@/translation";
const authStore = useAuthStore();
const props = defineProps({
activity: {
Expand Down Expand Up @@ -167,7 +172,7 @@ const deleteComment = createResource({
onSuccess() {
emit("update");
showDialog.value = false;
toast.success("Comment deleted");
toast.success(__("Comment deleted"));
},
});

Expand All @@ -177,7 +182,7 @@ function handleSaveComment() {
return;
}
if (isContentEmpty(_content.value)) {
toast.error("Comment cannot be empty");
toast.error(__("Comment cannot be empty"));
return;
}

Expand All @@ -192,7 +197,7 @@ function handleSaveComment() {
onSuccess: () => {
editable.value = false;
emit("update");
toast.success("Comment updated");
toast.success(__("Comment updated"));
},
}
);
Expand Down
2 changes: 1 addition & 1 deletion desk/src/components/CommentTextEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
:mentions="agents"
@change="editable ? (newComment = $event) : null"
:extensions="[PreserveVideoControls]"
:uploadFunction="(file:any)=>uploadFunction(file, doctype, ticketId)"
:uploadFunction="(file: any) => uploadFunction(file, doctype, ticketId)"
>
<template #bottom>
<div v-if="editable" class="flex flex-col gap-2 px-6 md:pl-10 md:pr-9">
Expand Down
17 changes: 11 additions & 6 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-gray-300 hover:!bg-gray-200' : '']"
@click="toggleEmailBox()"
>
Expand All @@ -17,7 +17,7 @@
</Button>
<Button
variant="ghost"
label="Comment"
:label="__('Comment')"
:class="[showCommentBox ? '!bg-gray-300 hover:!bg-gray-200' : '']"
@click="toggleCommentBox()"
>
Expand All @@ -38,7 +38,11 @@
<EmailEditor
ref="emailEditorRef"
:label="
isMobileView ? 'Send' : isMac ? 'Send (⌘ + ⏎)' : 'Send (Ctrl + ⏎)'
isMobileView
? __('Send')
: isMac
? __('Send (⌘ + ⏎)')
: __('Send (Ctrl + ⏎)')
"
v-model:content="content"
placeholder="Hi John, we are looking into this issue."
Expand Down Expand Up @@ -69,10 +73,10 @@
ref="commentTextEditorRef"
:label="
isMobileView
? 'Comment'
? __('Comment')
: isMac
? 'Comment (⌘ + ⏎)'
: 'Comment (Ctrl + ⏎)'
? __('Comment (⌘ + ⏎)')
: __('Comment (Ctrl + ⏎)')
"
:ticketId="ticketId"
:editable="showCommentBox"
Expand Down Expand Up @@ -103,6 +107,7 @@ import { useShortcut } from "@/composables/shortcuts";
import { showCommentBox, showEmailBox } from "@/pages/ticket/modalStates";
import { ref, watch } from "vue";
import { onClickOutside } from "@vueuse/core";
import { __ } from "@/translation";

const emit = defineEmits(["update"]);
const content = defineModel("content");
Expand Down
4 changes: 3 additions & 1 deletion desk/src/components/ConfirmDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<template #actions>
<Button
class="w-full"
label="Confirm"
:label="__('Confirm')"
variant="solid"
:loading="isLoading"
@click="onConfirm"
Expand All @@ -18,6 +18,7 @@
</template>
<script>
import { Button, Dialog } from "frappe-ui";
import { __ } from "@/translation";

export default {
name: "ConfirmDialog",
Expand Down Expand Up @@ -49,6 +50,7 @@ export default {
};
},
methods: {
__,
async handleConfirmation() {
if (this.isLoading) return;
this.isLoading = true;
Expand Down
34 changes: 21 additions & 13 deletions desk/src/components/DiscardButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,33 @@

<script setup lang="ts">
import { globalStore } from "@/stores/globalStore";
import { __ } from "@/translation";
const { $dialog } = globalStore();
const emit = defineEmits<{
(event: "discard"): void;
}>();

const {
label = "Discard",
hideDialog = false,
title = "Discard?",
message = "Are you sure you want to discard this?",
} = defineProps<{
label?: string;
hideDialog?: boolean;
title?: string;
message?: string;
}>();
const props = withDefaults(
defineProps<{
label?: string;
hideDialog?: boolean;
title?: string;
message?: string;
}>(),
{
label: undefined,
hideDialog: false,
title: undefined,
message: undefined,
}
);

const label = props.label || __("Discard");
const title = props.title || __("Discard?");
const message = props.message || __("Are you sure you want to discard this?");

function handleDiscard() {
if (hideDialog) {
if (props.hideDialog) {
emit("discard");
return;
}
Expand All @@ -34,7 +42,7 @@ function handleDiscard() {
},
actions: [
{
label: "Confirm",
label: __("Confirm"),
variant: "solid",
onClick(close: Function) {
emit("discard");
Expand Down
7 changes: 4 additions & 3 deletions desk/src/components/EmailArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<!-- email design for mobile -->
<div v-if="isMobileView" class="flex items-center gap-2 text-sm">
<div class="leading-tight">
<p>{{ sender.full_name || "No name found" }}</p>
<p>{{ sender.full_name || __("No name found") }}</p>
<Tooltip :text="dateFormat(creation, dateTooltipFormat)">
<p class="text-xs md:text-sm text-gray-600">
{{ timeAgo(creation) }}
Expand All @@ -24,7 +24,7 @@
</div>
<!-- email design for desktop -->
<div v-else class="flex items-center gap-1">
<span>{{ sender.full_name || "No name found" }}</span>
<span>{{ sender.full_name || __("No name found") }}</span>
<span class="sm:flex hidden text-sm text-gray-600" v-if="sender.name">{{
"<" + sender.name + ">"
}}</span>
Expand Down Expand Up @@ -57,7 +57,7 @@
:placement="'right'"
:options="[
{
label: 'Split Ticket',
label: __('Split Ticket'),
icon: LucideSplit,
onClick: () => (showSplitModal = true),
},
Expand Down Expand Up @@ -115,6 +115,7 @@ import { ReplyAllIcon, ReplyIcon } from "./icons";
import TicketSplitModal from "./ticket/TicketSplitModal.vue";
import { useAuthStore } from "@/stores/auth";
import { storeToRefs } from "pinia";
import { __ } from "@/translation";

const props = defineProps({
activity: {
Expand Down
Loading