Skip to content

Commit

Permalink
fix: translate passed message in EmptyState component instead of tran…
Browse files Browse the repository at this point in the history
…slating it everywhere

(cherry picked from commit 96a05bf)
  • Loading branch information
ruchamahabal authored and mergify[bot] committed Oct 30, 2024
1 parent 42985e0 commit e178078
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/EmptyState.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
props.isTableField ? 'border-2 border-dashed border-gray-300 mt-5' : '',
]"
>
{{ props.message }}
{{ __(props.message) }}
</div>
</template>

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ExpenseAdvancesTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</div>
</div>

<EmptyState v-else :message="__('No advances found')" :isTableField="true" />
<EmptyState v-else message="No advances found" :isTableField="true" />
</template>

<script setup>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/FormField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
:disabled="isReadOnly"
/>
<ErrorMessage :message="__(props.errorMessage)" />
<ErrorMessage :message="props.errorMessage" />
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
</div>
</div>
<EmptyState
:message="__('No {0} found', [__(props.doctype)])"
:message="`No ${props.doctype?.toLowerCase()}s found`"
v-else-if="!documents.loading"
/>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/RequestList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</Button>
</router-link>
</div>
<EmptyState :message="emptyStateMessage || __('You have no requests')" v-else />
<EmptyState :message="emptyStateMessage || 'You have no requests'" v-else />

<ion-modal
ref="modal"
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/views/attendance/ShiftRequestList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
</template>

<script setup>
import { inject } from "vue"
import { IonPage } from "@ionic/vue"
import ListView from "@/components/ListView.vue"
const __ = inject("$translate")
const TAB_BUTTONS = ["My Requests", "Team Requests"]
const SHIFT_REQUEST_FIELDS = [
"name",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/salary_slip/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</router-link>
</div>
</div>
<EmptyState :message="__('No salary slips found')" v-else />
<EmptyState message="No salary slips found" v-else />
</div>
</div>
</template>
Expand Down

0 comments on commit e178078

Please sign in to comment.