+
Skip to content

feat(i18n): add tooltip and favoriteButton i18n #756

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

Merged
merged 1 commit into from
Nov 16, 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
4 changes: 4 additions & 0 deletions locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ home:
toggleMenu: 'Toggle menu'
home: Home
uiLib: 'UI Lib'
support: 'Support IT Tools development'
buyMeACoffee: 'Buy me a coffee'
follow:
title: 'You like it-tools?'
Expand Down Expand Up @@ -48,6 +49,9 @@ about:
sorry: 'Sorry, this page does not seem to exist'
maybe: 'Maybe the cache is doing tricky things, try force-refreshing?'
backHome: 'Back home'
favoriteButton:
remove: 'Remove from favorites'
add: 'Add to favorites'
toolCard:
new: New
search:
Expand Down
2 changes: 1 addition & 1 deletion src/components/FavoriteButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function toggleFavorite(event: MouseEvent) {
</script>

<template>
<c-tooltip :tooltip="isFavorite ? 'Remove from favorites' : 'Add to favorites' ">
<c-tooltip :tooltip="isFavorite ? $t('favoriteButton.remove') : $t('favoriteButton.add') ">
<c-button
variant="text"
circle
Expand Down
6 changes: 3 additions & 3 deletions src/layouts/base.layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ const tools = computed<ToolCategory[]>(() => [
<NIcon size="25" :component="Menu2" />
</c-button>

<c-tooltip tooltip="Home" position="bottom">
<c-tooltip :tooltip="$t('home.home')" position="bottom">
<c-button to="/" circle variant="text" :aria-label="$t('home.home')">
<NIcon size="25" :component="Home2" />
</c-button>
</c-tooltip>

<c-tooltip tooltip="UI Lib" position="bottom">
<c-tooltip :tooltip="$t('home.uiLib')" position="bottom">
<c-button v-if="config.app.env === 'development'" to="/c-lib" circle variant="text" :aria-label="$t('home.uiLib')">
<icon-mdi:brush-variant text-20px />
</c-button>
Expand All @@ -120,7 +120,7 @@ const tools = computed<ToolCategory[]>(() => [
<NavbarButtons v-if="!styleStore.isSmallScreen" />
</div>

<c-tooltip position="bottom" tooltip="Support IT Tools development">
<c-tooltip position="bottom" :tooltip="$t('home.support')">
<c-button
round
href="https://www.buymeacoffee.com/cthmsst"
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载