[READ-ONLY] a fast, modern browser for the npm registry

fix(i18n): add missing i18n strings for like button + tooltip (#957)

authored by

Nico and committed by
GitHub
3a67356d bcfdd56f

+41 -15
+29 -15
app/pages/package/[...package].vue
··· 600 600 /> 601 601 602 602 <!-- Package likes --> 603 - <button 604 - @click="likeAction" 605 - type="button" 606 - class="inline-flex items-center gap-1.5 font-mono text-sm text-fg hover:text-fg-muted transition-colors duration-200" 607 - :title="$t('package.links.like')" 603 + <TooltipApp 604 + :text=" 605 + likesData?.userHasLiked ? $t('package.likes.unlike') : $t('package.likes.like') 606 + " 607 + position="bottom" 608 608 > 609 - <span 610 - :class=" 611 - likesData?.userHasLiked 612 - ? 'i-lucide-heart-minus text-red-500' 613 - : 'i-lucide-heart-plus' 609 + <button 610 + @click="likeAction" 611 + type="button" 612 + :title=" 613 + likesData?.userHasLiked ? $t('package.likes.unlike') : $t('package.likes.like') 614 614 " 615 - class="w-4 h-4" 616 - aria-hidden="true" 617 - /> 618 - <span>{{ formatCompactNumber(likesData?.totalLikes ?? 0, { decimals: 1 }) }}</span> 619 - </button> 615 + class="inline-flex items-center gap-1.5 font-mono text-sm text-fg hover:text-fg-muted transition-colors duration-200" 616 + :aria-label=" 617 + likesData?.userHasLiked ? $t('package.likes.unlike') : $t('package.likes.like') 618 + " 619 + > 620 + <span 621 + :class=" 622 + likesData?.userHasLiked 623 + ? 'i-lucide-heart-minus text-red-500' 624 + : 'i-lucide-heart-plus' 625 + " 626 + class="w-4 h-4" 627 + aria-hidden="true" 628 + /> 629 + <span>{{ 630 + formatCompactNumber(likesData?.totalLikes ?? 0, { decimals: 1 }) 631 + }}</span> 632 + </button> 633 + </TooltipApp> 620 634 <template #fallback> 621 635 <div 622 636 class="flex items-center gap-1.5 list-none m-0 p-0 relative top-[5px] self-baseline ms-1 sm:ms-2"
+4
i18n/locales/en.json
··· 185 185 "fund": "fund", 186 186 "compare": "compare" 187 187 }, 188 + "likes": { 189 + "like": "Like this package", 190 + "unlike": "Unlike this package" 191 + }, 188 192 "docs": { 189 193 "not_available": "Docs not available", 190 194 "not_available_detail": "We could not generate docs for this version."
+4
lunaria/files/en-GB.json
··· 185 185 "fund": "fund", 186 186 "compare": "compare" 187 187 }, 188 + "likes": { 189 + "like": "Like this package", 190 + "unlike": "Unlike this package" 191 + }, 188 192 "docs": { 189 193 "not_available": "Docs not available", 190 194 "not_available_detail": "We could not generate docs for this version."
+4
lunaria/files/en-US.json
··· 185 185 "fund": "fund", 186 186 "compare": "compare" 187 187 }, 188 + "likes": { 189 + "like": "Like this package", 190 + "unlike": "Unlike this package" 191 + }, 188 192 "docs": { 189 193 "not_available": "Docs not available", 190 194 "not_available_detail": "We could not generate docs for this version."