Skip to content

Commit

Permalink
feat: Hardcoded english in DataTable quasarframework#284
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoenescu committed Dec 28, 2016
1 parent 7dce8cc commit 60f8cd6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
6 changes: 3 additions & 3 deletions dev/components/components/data-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ export default {
noDataAfterFiltering: '<i>warning</i> No results. Please refine your search terms.'
},
labels: {
columns: 'Coloane',
allFields: 'Toate campurile',
rows: 'Randuri'
columns: 'Coluuuuumns',
allCols: 'Eeeeeeeeevery Cols',
rows: 'Rooows'
}
},
columns: [
Expand Down
2 changes: 1 addition & 1 deletion src/vue-components/data-table/data-table.ios.styl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
> div:not(:first-of-type):not(:last-of-type)
margin 0 30px
.q-search
min-width 250px
width auto
margin 0 15px 0 0
@media (max-width $layout-small-max)
flex-wrap wrap-reverse
Expand Down
2 changes: 1 addition & 1 deletion src/vue-components/data-table/data-table.mat.styl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
&, &:hover
border-bottom transparent
.q-search
min-width 250px
width auto
margin 0 15px 0 0
@media (max-width $layout-small-max)
flex-wrap wrap-reverse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default {
}
})
return [{label: this.labels.allFields, value: ''}].concat(cols)
return [{label: this.labels.allCols, value: ''}].concat(cols)
}
}
}
Expand Down
15 changes: 10 additions & 5 deletions src/vue-components/data-table/plugins/i18n/i18n.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import Utils from '../../../../utils'
const labels = {
columns: 'Columns',
allCols: 'All Columns',
rows: 'Rows'
}

export default {
computed: {
labels () {
const labels = this.config && this.config.labels ? this.config.labels : {}
return {
columns: labels.columns || 'Columns',
allFields: labels.allFields || 'All Fields',
rows: labels.rows || 'Rows'
if (this.config && this.config.labels) {
return Utils.extend({}, labels, this.config.labels)
}
return labels
},
message () {
if (this.rows.length) {
Expand Down

0 comments on commit 60f8cd6

Please sign in to comment.