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

F t31115 remove translator from dp select #357

Merged
merged 10 commits into from
Jul 11, 2023
15 changes: 7 additions & 8 deletions src/components/DpSelect/DpSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,22 @@
disabled
value=""
:selected="selected === ''">
{{ Translator.trans(placeholder) }}
{{ selectPlaceholder }}
ahmad-demos marked this conversation as resolved.
Show resolved Hide resolved
</option>
<option
v-for="(option, idx) in options"
:selected="option.value === selected"
:value="option.value"
:key="idx">
{{ Translator.trans(option.label) }}
{{ option.label }}
</option>
</select>
</div>
</template>

<script>
import DpLabel from '../DpLabel/DpLabel'
import { de } from '../shared/translations'
import { prefixClassMixin } from '../../mixins'

export default {
Expand Down Expand Up @@ -96,12 +97,6 @@ export default {
type: Array
},

placeholder: {
type: String,
required: false,
default: 'warning.select.entry'
},

required: {
type: Boolean,
required: false,
Expand All @@ -122,6 +117,10 @@ export default {
},

computed: {
selectPlaceholder () {
return de.selectPlaceholder
},

nameOrId () {
/*
* As long as there is no necessity of having the id to differ from name,
Expand Down
3 changes: 2 additions & 1 deletion src/components/shared/translations.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const de = {
contextualHelp: 'Kontexthilfe',
loadingData: 'Daten werden geladen...'
loadingData: 'Daten werden geladen...',
selectPlaceholder: 'Bitte wählen Sie einen Eintrag aus.'
}

export { de }