UX: copy and formating improvements to local-dates form (#7343)
This commit is contained in:
parent
6d0e8821f8
commit
ad5edc8bb1
|
@ -167,6 +167,14 @@ export default Ember.Component.extend({
|
||||||
return moment.tz.guess();
|
return moment.tz.guess();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@computed("currentUserTimezone")
|
||||||
|
formatedCurrentUserTimezone(timezone) {
|
||||||
|
return timezone
|
||||||
|
.replace("_", " ")
|
||||||
|
.replace("Etc/", "")
|
||||||
|
.split("/");
|
||||||
|
},
|
||||||
|
|
||||||
@computed("formats")
|
@computed("formats")
|
||||||
previewedFormats(formats) {
|
previewedFormats(formats) {
|
||||||
return formats.map(format => {
|
return formats.map(format => {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{#d-modal-body
|
{{#d-modal-body
|
||||||
title="discourse_local_dates.create.modal_title"
|
title="discourse_local_dates.title"
|
||||||
class="discourse-local-dates-create-modal"
|
class="discourse-local-dates-create-modal"
|
||||||
style="overflow: auto"}}
|
style="overflow: auto"}}
|
||||||
|
|
||||||
|
@ -10,8 +10,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="preview alert alert-info">
|
<div class="preview alert alert-info">
|
||||||
<b>{{currentUserTimezone}}: </b>
|
<b>{{formatedCurrentUserTimezone}} </b>{{currentPreview}}
|
||||||
{{currentPreview}}
|
|
||||||
</div>
|
</div>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,8 @@ en:
|
||||||
today: Today %{time}
|
today: Today %{time}
|
||||||
tomorrow: Tomorrow %{time}
|
tomorrow: Tomorrow %{time}
|
||||||
yesterday: Yesterday %{time}
|
yesterday: Yesterday %{time}
|
||||||
title: Insert date
|
title: Insert date / time
|
||||||
create:
|
create:
|
||||||
modal_title: Insert date
|
|
||||||
form:
|
form:
|
||||||
insert: Insert
|
insert: Insert
|
||||||
advanced_mode: Advanced mode
|
advanced_mode: Advanced mode
|
||||||
|
|
Loading…
Reference in New Issue