Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: refine i18n for uc #4957

Merged
merged 1 commit into from
Nov 30, 2023
Merged
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
3 changes: 2 additions & 1 deletion console/console-src/layouts/BasicLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ onMounted(() => {

<div class="flex items-center gap-1">
<a
v-tooltip="'个人中心'"
v-tooltip="$t('core.sidebar.operations.profile.tooltip')"
class="group inline-block cursor-pointer rounded-full p-1.5 transition-all hover:bg-gray-100"
href="/uc"
>
Expand All @@ -188,6 +188,7 @@ onMounted(() => {
/>
</a>
<div
v-tooltip="$t('core.sidebar.operations.logout.tooltip')"
class="group inline-block cursor-pointer rounded-full p-1.5 transition-all hover:bg-gray-100"
@click="handleLogout"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ const handleResetForm = () => {
]
"
type="text"
label="登录之后默认跳转位置"
:label="$t('core.role.editing_modal.fields.redirect_on_login')"
></FormKit>
</FormKit>
</div>
Expand Down
2 changes: 1 addition & 1 deletion console/console-src/modules/system/users/UserDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function handleRouteToUC() {
type="primary"
@click="handleRouteToUC"
>
个人中心
{{ $t("core.user.detail.actions.profile.title") }}
</VButton>
<VDropdown v-if="currentUserHasPermission(['system:users:manage'])">
<VButton type="default">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function handleRouteToNotification(notification: Notification) {
<VCard
:body-class="['h-full', '@container', '!p-0', '!overflow-auto']"
class="h-full"
:title="$t('core.notification.title')"
:title="$t('core.dashboard.widgets.presets.notification.title')"
>
<template #actions>
<div style="padding: 12px 16px">
Expand All @@ -59,7 +59,7 @@ function handleRouteToNotification(notification: Notification) {
<VLoading v-if="isLoading" />
<VEmpty
v-else-if="!notifications?.length"
:title="$t('core.notification.empty.titles.unread')"
:title="$t('core.dashboard.widgets.presets.notification.empty.title')"
>
<template #actions>
<VButton :loading="isFetching" @click="refetch">
Expand Down
2 changes: 1 addition & 1 deletion console/packages/editor/src/locales/zh-CN.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ editor:
audio: 音频
table: 表格
no_results: 没有搜索结果
placeholder: "输入 / 以选择输入类型"
placeholder: 输入 / 以选择输入类型
link:
add_link: 添加链接
edit_link: 修改链接
Expand Down
8 changes: 4 additions & 4 deletions console/src/components/user-avatar/UserAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const handleUploadAvatar = () => {
handleCloseCropperModal();
})
.catch(() => {
Toast.error(t("core.user.detail.avatar.toast_upload_failed"));
Toast.error(t("core.components.user_avatar.toast_upload_failed"));
})
.finally(() => {
uploadSaving.value = false;
Expand All @@ -93,7 +93,7 @@ const handleUploadAvatar = () => {

const handleRemoveCurrentAvatar = () => {
Dialog.warning({
title: t("core.user.detail.avatar.remove.title"),
title: t("core.components.user_avatar.remove.title"),
description: t("core.common.dialog.descriptions.cannot_be_recovered"),
confirmType: "danger",
confirmText: t("core.common.buttons.confirm"),
Expand All @@ -111,7 +111,7 @@ const handleRemoveCurrentAvatar = () => {
queryClient.invalidateQueries({ queryKey: ["user-detail"] });
})
.catch(() => {
Toast.error(t("core.user.detail.avatar.toast_remove_failed"));
Toast.error(t("core.components.user_avatar.toast_remove_failed"));
});
},
});
Expand Down Expand Up @@ -174,7 +174,7 @@ const hasAvatar = computed(() => {
<VModal
:visible="visibleCropperModal"
:width="1200"
:title="$t('core.user.detail.avatar.cropper_modal.title')"
:title="$t('core.components.user_avatar.cropper_modal.title')"
mount-to-body
@update:visible="handleCloseCropperModal"
>
Expand Down
12 changes: 6 additions & 6 deletions console/src/components/user-avatar/UserAvatarCropper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,47 +64,47 @@ const defaultToolbars: ToolbarItem[] = [
onClick: () => {
emit("changeFile");
},
title: t("core.user.detail.avatar.tooltips.upload"),
title: t("core.components.user_avatar.tooltips.upload"),
},
{
name: "zoomIn",
icon: markRaw(IconZoomInLine),
onClick: () => {
cropper.value?.zoom(0.1);
},
title: t("core.user.detail.avatar.tooltips.zoom_in"),
title: t("core.components.user_avatar.tooltips.zoom_in"),
},
{
name: "zoomOut",
icon: markRaw(IconZoomOutLine),
onClick: () => {
cropper.value?.zoom(-0.1);
},
title: t("core.user.detail.avatar.tooltips.zoom_out"),
title: t("core.components.user_avatar.tooltips.zoom_out"),
},
{
name: "flipHorizontal",
icon: markRaw(IconArrowLeftRightLine),
onClick: () => {
cropper.value?.scaleX(-cropper.value?.getData().scaleX || -1);
},
title: t("core.user.detail.avatar.tooltips.flip_horizontal"),
title: t("core.components.user_avatar.tooltips.flip_horizontal"),
},
{
name: "flipVertical",
icon: markRaw(IconArrowUpDownLine),
onClick: () => {
cropper.value?.scaleY(-cropper.value?.getData().scaleY || -1);
},
title: t("core.user.detail.avatar.tooltips.flip_vertical"),
title: t("core.components.user_avatar.tooltips.flip_vertical"),
},
{
name: "reset",
icon: markRaw(IconRefreshLine),
onClick: () => {
cropper.value?.reset();
},
title: t("core.user.detail.avatar.tooltips.reset"),
title: t("core.components.user_avatar.tooltips.reset"),
},
];
const previewElement = ref<HTMLElement>();
Expand Down
Loading
Loading