mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: Regression in timezone name localizations (#15761)
This also switches to using the NPM package for better build stability. And adds a clearer label in the alert that is displayed to show your current timezone (when changing timezones).
This commit is contained in:
@ -205,7 +205,7 @@ export default Component.extend({
|
||||
|
||||
@computed("currentUserTimezone")
|
||||
formatedCurrentUserTimezone(timezone) {
|
||||
return timezone.replace("_", " ").replace("Etc/", "").split("/");
|
||||
return timezone.replace("_", " ").replace("Etc/", "").replace("/", ", ");
|
||||
},
|
||||
|
||||
@computed("formats")
|
||||
@ -398,8 +398,10 @@ export default Component.extend({
|
||||
return new Promise((resolve) => {
|
||||
loadScript("/javascripts/pikaday.js").then(() => {
|
||||
const options = {
|
||||
field: this.$(`.fake-input`)[0],
|
||||
container: this.$(`#picker-container-${this.elementId}`)[0],
|
||||
field: this.element.querySelector(".fake-input"),
|
||||
container: this.element.querySelector(
|
||||
`#picker-container-${this.elementId}`
|
||||
),
|
||||
bound: false,
|
||||
format: "YYYY-MM-DD",
|
||||
reposition: false,
|
||||
|
@ -7,7 +7,8 @@
|
||||
{{#if isValid}}
|
||||
{{#if timezoneIsDifferentFromUserTimezone}}
|
||||
<div class="preview alert alert-info">
|
||||
<b>{{formatedCurrentUserTimezone}} </b>{{currentPreview}}
|
||||
{{i18n "discourse_local_dates.create.form.current_timezone"}}
|
||||
<b>{{formatedCurrentUserTimezone}}</b>{{currentPreview}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
|
Reference in New Issue
Block a user