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

Update LifeMetrics.vue, line 229, solving 2 SonarCloud reliability bugs #7186

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 20 additions & 11 deletions resources/js/Pages/Vault/Dashboard/Partials/LifeMetrics.vue
Original file line number Diff line number Diff line change
Expand Up @@ -226,18 +226,27 @@ const destroy = (lifeMetric) => {
<div
v-if="editedLifeMetricId !== lifeMetric.id && lifeMetric.show_graph"
class="m-3 mb-2 rounded-lg border border-gray-200">
<table class="charts-css column show-labels show-primary-axis h-72">
<tbody>
<tr v-for="month in lifeMetric.months" :key="month.id">
<td :style="'--size: calc(' + month.events + '/' + lifeMetric.max_number_of_events">
{{ month.friendly_name }}

<div>
<table class="charts-css column show-labels show-primary-axis h-72">
<caption style="caption-side: top;">Tabla de seguimiento del estado de ánimo por mes,
mostrando el número de eventos de seguimiento del estado de ánimo que ocurrieron en cada mes.</caption>
<thead>
<tr>
<th>Mes</th>
<th>Eventos</th>
Comment on lines +231 to +236
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't add hardcoded texts like that.
You must use the $t() function, and write the text in english. Then we can translate it in any languages.

</tr>
</thead>
<tbody>
<tr v-for="month in lifeMetric.months" :key="month.id">
<td :style="'--size: calc(' + month.events + '/' + lifeMetric.max_number_of_events">
{{ month.friendly_name }}
<span class="tooltip"> {{ month.events }} events </span>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</div>


<!-- edit modal -->
<form
Expand Down