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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Since v0.0.10, this Changelog is formatted according to the [Common Changelog][c

## UNRELEASED

### Removed

- ([#357](https://github.com/demos-europe/demosplan-ui/pull/357)) Remove Translator from DpSelect ([@ahmad-demos](https://github.com/ahmad-demos))

- ([#344](https://github.com/demos-europe/demosplan-ui/pull/344)) Add documentation for DpTabs ([@ahmad-demos](https://github.com/@ahmad-demos))
- ([#333](https://github.com/demos-europe/demosplan-ui/pull/333)) Add "rounded" prop to DpButton, add "arrow-up" and "arrow-down" icons to DpIcon ([@spiess-demos](https://github.com/spiess-demos))
ahmad-demos marked this conversation as resolved.
Show resolved Hide resolved

Expand Down
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 }