Skip to content

Instantly share code, notes, and snippets.

@brandizzi
Created July 3, 2015 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brandizzi/26a7c1fb6db1252dc80a to your computer and use it in GitHub Desktop.
Save brandizzi/26a7c1fb6db1252dc80a to your computer and use it in GitHub Desktop.
a patch
From 18479a579963d28bce2dec368fa27ffc42c7b1dc Mon Sep 17 00:00:00 2001
From: Adam Victor Nazareth Brandizzi <adam.brandizzi@liferay.com>
Date: Tue, 2 Sep 2014 14:23:53 -0300
Subject: [PATCH 1/6] LPS-49765 Using specific keys for positions (days of
weeks have different gender in some languages so the default keys appear
wrong)
---
.../docroot/WEB-INF/src/content/Language.properties | 5 +++++
.../docroot/calendar_booking_recurrence_container.jspf | 10 +++++-----
portlets/calendar-portlet/docroot/js/components.js | 10 +++++-----
3 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/portlets/calendar-portlet/docroot/WEB-INF/src/content/Language.properties b/portlets/calendar-portlet/docroot/WEB-INF/src/content/Language.properties
index 6b176b0..2817f06 100644
--- a/portlets/calendar-portlet/docroot/WEB-INF/src/content/Language.properties
+++ b/portlets/calendar-portlet/docroot/WEB-INF/src/content/Language.properties
@@ -96,6 +96,11 @@ on-the=on the
only-this-instance=Only This Instance
other-calendars=Other Calendars
please-enter-a-unique-resource-code=Please enter a unique resource code.
+position.first=first
+position.fourth=fourth
+position.last=last
+position.second=second
+position.third=third
recurring=Recurring
remember-last-date=Remember Last Date
reminder-email=Reminder Email
diff --git a/portlets/calendar-portlet/docroot/calendar_booking_recurrence_container.jspf b/portlets/calendar-portlet/docroot/calendar_booking_recurrence_container.jspf
index 89cc96a..eba213e 100644
--- a/portlets/calendar-portlet/docroot/calendar_booking_recurrence_container.jspf
+++ b/portlets/calendar-portlet/docroot/calendar_booking_recurrence_container.jspf
@@ -160,11 +160,11 @@ if (recurrence != null) {
<div class='<%= ListUtil.isEmpty(weekdays) ? "hide" : StringPool.BLANK %>' id="<portlet:namespace />viewPositionalWeekday">
<aui:select inlineField="<%= true %>" label="" name="position">
- <aui:option label="first" selected="<%= positionalWeekday.getPosition() == 1 %>" value="1" />
- <aui:option label="second" selected="<%= positionalWeekday.getPosition() == 2 %>" value="2" />
- <aui:option label="third" selected="<%= positionalWeekday.getPosition() == 3 %>" value="3" />
- <aui:option label="fourth" selected="<%= positionalWeekday.getPosition() == 4 %>" value="4" />
- <aui:option label="last" selected="<%= positionalWeekday.getPosition() == -1 %>" value="-1" />
+ <aui:option label="position.first" selected="<%= positionalWeekday.getPosition() == 1 %>" value="1" />
+ <aui:option label="position.second" selected="<%= positionalWeekday.getPosition() == 2 %>" value="2" />
+ <aui:option label="position.third" selected="<%= positionalWeekday.getPosition() == 3 %>" value="3" />
+ <aui:option label="position.fourth" selected="<%= positionalWeekday.getPosition() == 4 %>" value="4" />
+ <aui:option label="position.last" selected="<%= positionalWeekday.getPosition() == -1 %>" value="-1" />
</aui:select>
<aui:select inlineField="<%= true %>" label="" name="weekday">
diff --git a/portlets/calendar-portlet/docroot/js/components.js b/portlets/calendar-portlet/docroot/js/components.js
index 5ebc975..012bc04 100644
--- a/portlets/calendar-portlet/docroot/js/components.js
+++ b/portlets/calendar-portlet/docroot/js/components.js
@@ -1024,11 +1024,11 @@
],
POSITION_LABELS: {
- '-1': Liferay.Language.get('last'),
- '1': Liferay.Language.get('first'),
- '2': Liferay.Language.get('second'),
- '3': Liferay.Language.get('third'),
- '4': Liferay.Language.get('fourth')
+ '-1': Liferay.Language.get('position.last'),
+ '1': Liferay.Language.get('position.first'),
+ '2': Liferay.Language.get('position.second'),
+ '3': Liferay.Language.get('position.third'),
+ '4': Liferay.Language.get('position.fourth')
},
WEEKDAY_LABELS: {
--
1.9.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment