Skip to content

Commit

Permalink
Say "Delete <thing>" i/o "Delete" in drawer modals
Browse files Browse the repository at this point in the history
  • Loading branch information
simenheg committed Sep 25, 2023
1 parent 09a565a commit 4f3f046
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 8 deletions.
6 changes: 5 additions & 1 deletion src/components/drawers/EditItemDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@
:object-type="type"
/>
<div v-else class="button-row">
<btn-delete :disabled="loading" @click="archive" />
<btn-delete
:disabled="loading"
:label="$t('admin.item.delete', { name: item.name })"
@click="archive"
/>
</div>
</template>
</template>
Expand Down
6 changes: 5 additions & 1 deletion src/components/drawers/EditKeyResult.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@
object-type="keyResult"
/>
<div v-else class="button-row">
<btn-delete :disabled="loading" @click="archive" />
<btn-delete
:disabled="loading"
:label="$t('admin.keyResult.delete')"
@click="archive"
/>
</div>
</template>
</template>
Expand Down
6 changes: 5 additions & 1 deletion src/components/drawers/EditObjective.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@
object-type="objective"
/>
<div v-else class="button-row">
<btn-delete :disabled="loading" @click="archive" />
<btn-delete
:disabled="loading"
:label="$t('admin.objective.delete')"
@click="archive"
/>
</div>
</template>
</template>
Expand Down
6 changes: 5 additions & 1 deletion src/components/drawers/KpiDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,11 @@
:text="$t('kpi.archived')"
/>
<div v-else class="button-row">
<btn-delete :disabled="loading" @click="archive" />
<btn-delete
:disabled="loading"
:label="$t('admin.measurement.delete')"
@click="archive"
/>
</div>
</template>
</template>
Expand Down
8 changes: 6 additions & 2 deletions src/locale/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@
"item": {
"change": "Edit {name}",
"updated": "{name} was updated!",
"delete": "Delete {name}",
"slugChangeInfo": "When changing the name of this item, the address to it might also change. In that case you will be automatically redirected after saving the form.",
"redirectInfo": "You will be redirected in {count} seconds."
},
Expand All @@ -427,19 +428,22 @@
"created": "Objective was created!",
"updated": "Objective was updated!",
"change": "Edit objective",
"delete": "Delete objective",
"useLastPeriod": "Set to last used period:"
},
"keyResult": {
"new": "New key result",
"created": "Key result was created!",
"updated": "Key result was updated!",
"change": "Edit key result"
"change": "Edit key result",
"delete": "Delete key result"
},
"measurement": {
"new": "New measurement",
"created": "Measurement created!",
"updated": "Measurement updated!",
"change": "Edit measurement"
"change": "Edit measurement",
"delete": "Delete measurement"
},
"apiSecret": "If you are using the API to update key results and/or measurements, you need to write an API Secret UUID here for the API call header (okr-team-secret)",
"apiDocs": "API documentation",
Expand Down
8 changes: 6 additions & 2 deletions src/locale/locales/nb-NO.json
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@
"item": {
"change": "Rediger {name}",
"updated": "{name} ble endret!",
"delete": "Slett {name}",
"slugChangeInfo": "Endring av navn kan også resultere i at gjeldende adresse for \"{name}\" endres. Du blir i så fall automatisk videresendt til den nye adressen etter at skjemaet lagres.",
"redirectInfo": "Du videresendes om {count} sekunder."
},
Expand All @@ -427,19 +428,22 @@
"created": "Målet ble opprettet!",
"updated": "Målet ble endret!",
"change": "Rediger mål",
"delete": "Slett mål",
"useLastPeriod": "Sett til sist brukte periode:"
},
"keyResult": {
"new": "Nytt nøkkelresultat",
"created": "Nøkkelresultatet ble opprettet!",
"updated": "Nøkkelresultatet ble endret!",
"change": "Rediger Nøkkelresultat"
"change": "Rediger Nøkkelresultat",
"delete": "Slett nøkkelresultat"
},
"measurement": {
"new": "Legg til måling",
"created": "Målingen ble opprettet!",
"updated": "Målingen ble endret!",
"change": "Rediger måling"
"change": "Rediger måling",
"delete": "Slett måling"
},
"apiSecret": "Hvis du har tenkt til å bruke API-et for å oppdatere nøkkelresultater og/eller målinger, så trenger du å skrive inn en streng her som legges inn i headeren til kallet (okr-team-secret)",
"apiDocs": "API-dokumentasjon",
Expand Down

0 comments on commit 4f3f046

Please sign in to comment.