Skip to content

Commit

Permalink
fixed google calendar i18n support (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
heikokue committed Mar 13, 2021
1 parent a8a3bd8 commit 7a47b1e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
18 changes: 15 additions & 3 deletions google/calendar.html
Expand Up @@ -46,7 +46,7 @@
<option value="hours" data-i18n="calendar.label.hours"></option>
<option value="days" data-i18n="calendar.label.days"></option>
</select>
<span id="node-input-type"><span data-i18n="calendar.label.before"></span></span> <span data-i18n="calendar.label.the"></span> <span id="node-input-from"><span data-i18n="calendar.label.start"></span></span> <span data-i18n="calendar.label.each-event"></span>
<span id="node-input-type"><span data-i18n="calendar.label.option_before"></span></span> <span data-i18n="calendar.label.the"></span> <span id="node-input-from"><span data-i18n="calendar.label.option_start"></span></span> <span data-i18n="calendar.label.each-event"></span>
</div>

<div class="form-row">
Expand Down Expand Up @@ -76,6 +76,10 @@
},
oneditprepare: function() {
var type = this.offsetType || "at";
var type_before = this._("calendar.label.option_before");
var type_after = this._("calendar.label.option_after");
var from_start = this._("calendar.label.option_start");
var from_end = this._("calendar.label.option_end");
$("#node-input-offsetType option").filter(function() {
return $(this).val() == type;
}).attr('selected', true);
Expand All @@ -95,8 +99,16 @@
if (type === "at") {
$("#node-row-offset").hide();
} else {
$("#node-input-type").html(type);
$("#node-input-from").html(from);
if (type === "before") {
$("#node-input-type").html(type_before);
} else if (type === "after") {
$("#node-input-type").html(type_after);
}
if (from === "start") {
$("#node-input-from").html(from_start);
} else if (from === "end") {
$("#node-input-from").html(from_end);
}
$("#node-row-offset").show();
}
};
Expand Down
2 changes: 0 additions & 2 deletions google/locales/en-US/calendar.json
Expand Up @@ -16,8 +16,6 @@
"minutes": "minutes",
"hours": "hours",
"days": "days",
"before": "before",
"start": "start",
"name": "Name",
"count": "Events"
},
Expand Down

0 comments on commit 7a47b1e

Please sign in to comment.