Skip to content
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
1 change: 1 addition & 0 deletions src/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1934,6 +1934,7 @@
"prepaidDescription": "Pre-paid credits",
"prepaidCreditsInfo": "Pre-paid credits expire after 1 year from purchase date.",
"creditsRemainingThisMonth": "Credits remaining this month",
"creditsRemainingThisYear": "Credits remaining this year",
"creditsYouveAdded": "Credits you've added",
"monthlyCreditsInfo": "These credits refresh monthly and don't roll over",
"viewMoreDetailsPlans": "View more details about plans & pricing",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@
<div class="flex items-center gap-1 min-w-0">
<div
class="text-sm truncate text-muted"
:title="$t('subscription.creditsRemainingThisMonth')"
:title="creditsRemainingLabel"
>
{{ $t('subscription.creditsRemainingThisMonth') }}
{{ creditsRemainingLabel }}
</div>
</div>
</div>
Expand Down Expand Up @@ -397,6 +397,11 @@ const tierKey = computed(() => {
const tierPrice = computed(() =>
getTierPrice(tierKey.value, isYearlySubscription.value)
)
const creditsRemainingLabel = computed(() =>
isYearlySubscription.value
? t('subscription.creditsRemainingThisYear')
: t('subscription.creditsRemainingThisMonth')
)

// Tier benefits for v-for loop
type BenefitType = 'metric' | 'feature'
Expand All @@ -416,7 +421,9 @@ const tierBenefits = computed((): Benefit[] => {
key: 'monthlyCredits',
type: 'metric',
value: n(getTierCredits(key)),
label: t('subscription.monthlyCreditsLabel')
label: isYearlySubscription.value
? t('subscription.yearlyCreditsLabel')
: t('subscription.monthlyCreditsLabel')
},
{
key: 'maxDuration',
Expand Down