Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
6817e89f
Commit
6817e89f
authored
9 years ago
by
Andy Armstrong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix i18n for last activity date on team cards
parent
7eb41ed8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
12 deletions
+27
-12
cms/static/cms/js/require-config.js
+2
-1
cms/static/coffee/spec/main.coffee
+2
-0
common/static/js/vendor/moment-with-locales.min.js
+0
-0
lms/djangoapps/teams/static/teams/js/spec/views/team_card_spec.js
+3
-3
lms/djangoapps/teams/static/teams/js/views/team_card.js
+12
-7
lms/static/js/spec/main.js
+2
-0
lms/static/js_test.yml
+1
-0
lms/static/lms/js/require-config.js
+5
-1
No files found.
cms/static/cms/js/require-config.js
View file @
6817e89f
...
...
@@ -27,8 +27,9 @@ require.config({
"jquery.immediateDescendents"
:
"coffee/src/jquery.immediateDescendents"
,
"datepair"
:
"js/vendor/timepicker/datepair"
,
"date"
:
"js/vendor/date"
,
"text"
:
'js/vendor/requirejs/text'
,
"moment"
:
"js/vendor/moment.min"
,
"moment-with-locales"
:
"js/vendor/moment-with-locales.min"
,
"text"
:
'js/vendor/requirejs/text'
,
"underscore"
:
"js/vendor/underscore-min"
,
"underscore.string"
:
"js/vendor/underscore.string.min"
,
"backbone"
:
"js/vendor/backbone-min"
,
...
...
This diff is collapsed.
Click to expand it.
cms/static/coffee/spec/main.coffee
View file @
6817e89f
...
...
@@ -23,6 +23,8 @@ requirejs.config({
"jquery.simulate"
:
"xmodule_js/common_static/js/vendor/jquery.simulate"
,
"datepair"
:
"xmodule_js/common_static/js/vendor/timepicker/datepair"
,
"date"
:
"xmodule_js/common_static/js/vendor/date"
,
"moment"
:
"xmodule_js/common_static/js/vendor/moment.min"
,
"moment-with-locales"
:
"xmodule_js/common_static/js/vendor/moment-with-locales.min"
,
"text"
:
"xmodule_js/common_static/js/vendor/requirejs/text"
,
"underscore"
:
"xmodule_js/common_static/js/vendor/underscore-min"
,
"underscore.string"
:
"xmodule_js/common_static/js/vendor/underscore.string.min"
,
...
...
This diff is collapsed.
Click to expand it.
common/static/js/vendor/moment-with-locales.min.js
0 → 100644
View file @
6817e89f
This source diff could not be displayed because it is too large. You can
view the blob
instead.
This diff is collapsed.
Click to expand it.
lms/djangoapps/teams/static/teams/js/spec/views/team_card_spec.js
View file @
6817e89f
...
...
@@ -43,8 +43,8 @@ define(['jquery',
expect
(
view
.
$el
).
toHaveClass
(
'list-card'
);
expect
(
view
.
$el
.
find
(
'.card-title'
).
text
()).
toContain
(
'Test Team'
);
expect
(
view
.
$el
.
find
(
'.card-description'
).
text
()).
toContain
(
'A team for testing'
);
expect
(
view
.
$el
.
find
(
'.team-activity abbr'
).
attr
(
'title'
)).
to
Equal
(
"2015-08-21T18:53:01.145Z"
);
expect
(
view
.
$el
.
find
(
'.team-activity'
).
text
()).
toContain
(
'Last
A
ctivity'
);
expect
(
view
.
$el
.
find
(
'.team-activity abbr'
).
attr
(
'title'
)).
to
Contain
(
'August 21st 2015'
);
expect
(
view
.
$el
.
find
(
'.team-activity'
).
text
()).
toContain
(
'Last
a
ctivity'
);
expect
(
view
.
$el
.
find
(
'.card-meta'
).
text
()).
toContain
(
'0 / 100 Members'
);
expect
(
view
.
$el
.
find
(
'.team-location'
).
text
()).
toContain
(
'United States of America'
);
expect
(
view
.
$el
.
find
(
'.team-language'
).
text
()).
toContain
(
'English'
);
...
...
@@ -143,7 +143,7 @@ define(['jquery',
{
username
:
'user_5'
,
image_url
:
'user_5_image'
},
{
username
:
'user_6'
,
image_url
:
'user_6_image'
},
{
username
:
'user_3'
,
image_url
:
'user_3_image'
},
{
username
:
'user_4'
,
image_url
:
'user_4_image'
}
,
{
username
:
'user_4'
,
image_url
:
'user_4_image'
}
]);
expect
(
view
.
$
(
'.item-member-thumb'
).
eq
(
-
1
)).
toHaveText
(
'and others…'
);
});
...
...
This diff is collapsed.
Click to expand it.
lms/djangoapps/teams/static/teams/js/views/team_card.js
View file @
6817e89f
;(
function
(
define
)
{
'use strict'
;
define
([
'jquery'
,
'backbone'
,
'underscore'
,
'gettext'
,
'
jquery.timeago
'
,
'
moment-with-locales
'
,
'js/components/card/views/card'
,
'teams/js/views/team_utils'
,
'text!teams/templates/team-membership-details.underscore'
,
'text!teams/templates/team-country-language.underscore'
,
'text!teams/templates/team-activity.underscore'
],
function
(
$
,
Backbone
,
_
,
gettext
,
timeago
,
moment
,
CardView
,
TeamUtils
,
teamMembershipDetailsTemplate
,
...
...
@@ -75,15 +77,18 @@
},
render
:
function
()
{
var
lastActivity
=
moment
(
this
.
date
),
currentLanguage
=
$
(
'html'
).
attr
(
'lang'
);
lastActivity
.
locale
(
currentLanguage
);
this
.
$el
.
html
(
interpolate
(
// Translators: 'date' is a placeholder for a fuzzy, relative timestamp (see: http
s://github.com/rmm5t/jquery-timeago
)
gettext
(
"Last
A
ctivity %(date)s"
),
{
date
:
this
.
template
({
date
:
this
.
date
})},
// Translators: 'date' is a placeholder for a fuzzy, relative timestamp (see: http
://momentjs.com/
)
gettext
(
"Last
a
ctivity %(date)s"
),
{
date
:
this
.
template
({
date
:
lastActivity
.
format
(
'MMMM Do YYYY, h:mm:ss a'
)
})},
true
)
);
this
.
$
(
'abbr'
).
t
imeago
(
);
this
.
$
(
'abbr'
).
t
ext
(
lastActivity
.
fromNow
()
);
}
});
...
...
@@ -103,7 +108,7 @@
},
teamModel
:
function
()
{
if
(
this
.
model
.
has
(
'team'
))
{
return
this
.
model
.
get
(
'team'
);
}
;
if
(
this
.
model
.
has
(
'team'
))
{
return
this
.
model
.
get
(
'team'
);
}
return
this
.
model
;
},
...
...
This diff is collapsed.
Click to expand it.
lms/static/js/spec/main.js
View file @
6817e89f
...
...
@@ -25,6 +25,8 @@
'jquery.url'
:
'xmodule_js/common_static/js/vendor/url.min'
,
'datepair'
:
'xmodule_js/common_static/js/vendor/timepicker/datepair'
,
'date'
:
'xmodule_js/common_static/js/vendor/date'
,
'moment'
:
'xmodule_js/common_static/js/vendor/moment.min'
,
'moment-with-locales'
:
'xmodule_js/common_static/js/vendor/moment-with-locales.min'
,
'text'
:
'xmodule_js/common_static/js/vendor/requirejs/text'
,
'underscore'
:
'xmodule_js/common_static/js/vendor/underscore-min'
,
'underscore.string'
:
'xmodule_js/common_static/js/vendor/underscore.string.min'
,
...
...
This diff is collapsed.
Click to expand it.
lms/static/js_test.yml
View file @
6817e89f
...
...
@@ -63,6 +63,7 @@ lib_paths:
-
xmodule_js/common_static/js/test/i18n.js
-
xmodule_js/common_static/js/vendor/date.js
-
xmodule_js/common_static/js/vendor/moment.min.js
-
xmodule_js/common_static/js/vendor/moment-with-locales.min.js
-
xmodule_js/common_static/js/utils/edx.utils.validate.js
# Paths to source JavaScript files
...
...
This diff is collapsed.
Click to expand it.
lms/static/lms/js/require-config.js
View file @
6817e89f
...
...
@@ -35,6 +35,8 @@
"gettext"
:
"/i18n"
,
"annotator_1.2.9"
:
"js/vendor/edxnotes/annotator-full.min"
,
"date"
:
"js/vendor/date"
,
"moment"
:
"js/vendor/moment.min"
,
"moment-with-locales"
:
"js/vendor/moment-with-locales.min"
,
"text"
:
"js/vendor/requirejs/text"
,
"logger"
:
"js/src/logger"
,
"backbone"
:
"js/vendor/backbone-min"
,
...
...
@@ -52,7 +54,6 @@
"URI"
:
"js/vendor/URI.min"
,
"string_utils"
:
"js/src/string_utils"
,
"utility"
:
"js/src/utility"
,
"moment"
:
"js/vendor/moment.min"
,
// Files needed by OVA
"annotator"
:
"js/vendor/ova/annotator-full"
,
...
...
@@ -189,6 +190,9 @@
// End of needed by OVA
"moment"
:
{
exports
:
"moment"
},
"moment-with-locales"
:
{
exports
:
"moment"
}
}
});
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment