Bug 38201: Fix translatability of RelationshipWidget
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
0b9f1ac8da
commit
be6515d5ac
|
|
@ -265,9 +265,13 @@ export default {
|
|||
type: "resourceProperty",
|
||||
resourceProperty: "periods",
|
||||
},
|
||||
resourceName: {
|
||||
type: "string",
|
||||
value: "period",
|
||||
resourceStrings: {
|
||||
type: "object",
|
||||
value: {
|
||||
nameLC: __("period"),
|
||||
nameUC: __("Period"),
|
||||
namePL: __("periods"),
|
||||
},
|
||||
},
|
||||
newRelationship: {
|
||||
type: "object",
|
||||
|
|
@ -472,9 +476,13 @@ export default {
|
|||
type: "resourceProperty",
|
||||
resourceProperty: "agreement_licenses",
|
||||
},
|
||||
resourceName: {
|
||||
type: "string",
|
||||
value: "license",
|
||||
resourceStrings: {
|
||||
type: "object",
|
||||
value: {
|
||||
nameLC: __("license"),
|
||||
nameUC: __("License"),
|
||||
namePL: __("licenses"),
|
||||
},
|
||||
},
|
||||
},
|
||||
subFields: [
|
||||
|
|
@ -569,9 +577,13 @@ export default {
|
|||
type: "resourceProperty",
|
||||
resourceProperty: "agreement_relationships",
|
||||
},
|
||||
resourceName: {
|
||||
type: "string",
|
||||
value: "relationship",
|
||||
resourceStrings: {
|
||||
type: "object",
|
||||
value: {
|
||||
nameLC: __("relationship"),
|
||||
nameUC: __("Relationship"),
|
||||
namePL: __("relationships"),
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
type: "filter",
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@
|
|||
:is="relationshipWidget"
|
||||
:title="attr.label"
|
||||
:apiClient="attr.apiClient"
|
||||
:name="attr.name"
|
||||
v-bind="requiredProps()"
|
||||
v-on="getEventHandlers()"
|
||||
></component>
|
||||
|
|
|
|||
|
|
@ -1,22 +1,19 @@
|
|||
<template>
|
||||
<fieldset class="rows" :id="`${resourceName + '_' + title}`">
|
||||
<fieldset class="rows" :id="`${name + '_' + 'relationship'}`">
|
||||
<legend>{{ title }}</legend>
|
||||
<fieldset
|
||||
:id="`${resourceName + '_' + title + '_' + counter}`"
|
||||
:id="`${name + '_' + counter}`"
|
||||
class="rows"
|
||||
v-for="(resourceRelationship, counter) in resourceRelationships"
|
||||
v-bind:key="counter"
|
||||
>
|
||||
<legend>
|
||||
{{
|
||||
resourceName.slice(0, 1).toUpperCase() +
|
||||
resourceName.slice(1) +
|
||||
" " +
|
||||
(counter + 1)
|
||||
}}
|
||||
{{ resourceStrings.nameUC + " " + (counter + 1) }}
|
||||
<a href="#" @click.prevent="deleteResourceRelationship(counter)"
|
||||
><i class="fa fa-trash"></i>
|
||||
{{ $__("Remove this %s").format(resourceName) }}</a
|
||||
{{
|
||||
$__("Remove this %s").format(resourceStrings.nameLC)
|
||||
}}</a
|
||||
>
|
||||
</legend>
|
||||
<ol>
|
||||
|
|
@ -35,10 +32,10 @@
|
|||
class="btn btn-default"
|
||||
@click="addResourceRelationship"
|
||||
><font-awesome-icon icon="plus" />
|
||||
{{ $__("Add new %s").format(resourceName) }}</a
|
||||
{{ $__("Add new %s").format(resourceStrings.nameLC) }}</a
|
||||
>
|
||||
<span v-else>{{
|
||||
$__("There are no %s created yet").format(resourceName)
|
||||
$__("There are no %s created yet").format(resourceStrings.namePL)
|
||||
}}</span>
|
||||
</fieldset>
|
||||
</template>
|
||||
|
|
@ -62,12 +59,13 @@ export default {
|
|||
props: {
|
||||
resourceRelationships: Array,
|
||||
subFields: Array,
|
||||
resourceName: String,
|
||||
resourceStrings: Object,
|
||||
title: String,
|
||||
apiClient: Object,
|
||||
newRelationship: Object,
|
||||
filters: Object,
|
||||
fetchOptions: Boolean,
|
||||
name: String,
|
||||
},
|
||||
beforeCreate() {
|
||||
if (this.apiClient) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue