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

fix(VTimePicker): AM/PM farsi translation and margins in RTL mode #10399

Merged
merged 1 commit into from
Feb 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Themeable from '../../mixins/themeable'
// Types
import mixins, { ExtractVue } from '../../util/mixins'
import Vue, { VNode, PropType } from 'vue'
import { PropValidator } from 'vue/types/options'

interface Point {
x: number
Expand Down Expand Up @@ -42,7 +43,7 @@ export default mixins<options &
format: {
type: Function,
default: (val: string | number) => val,
},
} as PropValidator<(val: string | number) => string | number>,
max: {
type: Number,
required: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@
display: flex
flex-direction: column
font-size: $time-picker-ampm-title-font-size
margin: $time-picker-ampm-title-margin
text-transform: uppercase

+ltr()
margin: $time-picker-ampm-title-margin-ltr

+rtl()
margin: $time-picker-ampm-title-margin-rtl

div:only-child
flex-direction: row

Expand Down
6 changes: 5 additions & 1 deletion packages/vuetify/src/components/VTimePicker/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
$time-picker-title-color: map-get($shades, 'white') !default;
$time-picker-title-btn-height: 70px !default;
$time-picker-landscape-title-btn-height: 55px !default;
$time-picker-ampm-title-margin: 8px 0 6px 8px !default;
$time-picker-ampm-title-margin-start: 8px !default;
$time-picker-ampm-title-margin-bottom: 6px !default;
$time-picker-ampm-title-margin: 0 0 $time-picker-ampm-title-margin-bottom $time-picker-ampm-title-margin-start !default; // TODO: remove in 3.0
$time-picker-ampm-title-margin-ltr: $time-picker-ampm-title-margin !default;
$time-picker-ampm-title-margin-rtl: 0 $time-picker-ampm-title-margin-start $time-picker-ampm-title-margin-bottom 0 !default;
$time-picker-ampm-title-font-size: 16px !default;
$time-picker-landscape-ampm-title-margin: 16px 0 0 !default;
$time-picker-number-font-size: 16px !default;
Expand Down
4 changes: 2 additions & 2 deletions packages/vuetify/src/locale/fa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default {
counterSize: '{0} پرونده ({1} در کل)',
},
timePicker: {
am: 'AM',
pm: 'PM',
am: 'قبل از ظهر',
pm: 'بعد از ظهر',
},
}