Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
74d23d05
Commit
74d23d05
authored
Mar 21, 2016
by
Ray Schamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove inline default messages
parent
2d6a3880
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
60 deletions
+20
-60
src/components/navigation/navigation.jsx
src/components/navigation/navigation.jsx
+20
-60
No files found.
src/components/navigation/navigation.jsx
View file @
74d23d05
...
@@ -2,7 +2,6 @@ var classNames = require('classnames');
...
@@ -2,7 +2,6 @@ var classNames = require('classnames');
var
connect
=
require
(
'
react-redux
'
).
connect
;
var
connect
=
require
(
'
react-redux
'
).
connect
;
var
React
=
require
(
'
react
'
);
var
React
=
require
(
'
react
'
);
var
ReactIntl
=
require
(
'
react-intl
'
);
var
ReactIntl
=
require
(
'
react-intl
'
);
var
defineMessages
=
ReactIntl
.
defineMessages
;
var
FormattedMessage
=
ReactIntl
.
FormattedMessage
;
var
FormattedMessage
=
ReactIntl
.
FormattedMessage
;
var
injectIntl
=
ReactIntl
.
injectIntl
;
var
injectIntl
=
ReactIntl
.
injectIntl
;
...
@@ -21,21 +20,6 @@ require('./navigation.scss');
...
@@ -21,21 +20,6 @@ require('./navigation.scss');
Modal
.
setAppElement
(
document
.
getElementById
(
'
view
'
));
Modal
.
setAppElement
(
document
.
getElementById
(
'
view
'
));
var
defaultMessages
=
defineMessages
({
messages
:
{
id
:
'
general.messages
'
,
defaultMessage
:
'
Messages
'
},
myStuff
:
{
id
:
'
general.myStuff
'
,
defaultMessage
:
'
My Stuff
'
},
search
:
{
id
:
'
general.search
'
,
defaultMessage
:
'
Search
'
}
});
var
Navigation
=
React
.
createClass
({
var
Navigation
=
React
.
createClass
({
type
:
'
Navigation
'
,
type
:
'
Navigation
'
,
mixins
:
[
mixins
:
[
...
@@ -205,37 +189,27 @@ var Navigation = React.createClass({
...
@@ -205,37 +189,27 @@ var Navigation = React.createClass({
<
li
className=
"link create"
>
<
li
className=
"link create"
>
<
a
href=
{
createLink
}
>
<
a
href=
{
createLink
}
>
<
FormattedMessage
<
FormattedMessage
id=
"general.create"
/>
id=
"general.create"
defaultMessage=
{
'
Create
'
}
/>
</
a
>
</
a
>
</
li
>
</
li
>
<
li
className=
"link explore"
>
<
li
className=
"link explore"
>
<
a
href=
"/explore?date=this_month"
>
<
a
href=
"/explore?date=this_month"
>
<
FormattedMessage
<
FormattedMessage
id=
"general.explore"
/>
id=
"general.explore"
defaultMessage=
{
'
Explore
'
}
/>
</
a
>
</
a
>
</
li
>
</
li
>
<
li
className=
"link discuss"
>
<
li
className=
"link discuss"
>
<
a
href=
"/discuss"
>
<
a
href=
"/discuss"
>
<
FormattedMessage
<
FormattedMessage
id=
"general.discuss"
/>
id=
"general.discuss"
defaultMessage=
{
'
Discuss
'
}
/>
</
a
>
</
a
>
</
li
>
</
li
>
<
li
className=
"link about"
>
<
li
className=
"link about"
>
<
a
href=
"/about"
>
<
a
href=
"/about"
>
<
FormattedMessage
<
FormattedMessage
id=
"general.about"
/>
id=
"general.about"
defaultMessage=
{
'
About
'
}
/>
</
a
>
</
a
>
</
li
>
</
li
>
<
li
className=
"link help"
>
<
li
className=
"link help"
>
<
a
href=
"/help"
>
<
a
href=
"/help"
>
<
FormattedMessage
<
FormattedMessage
id=
"general.help"
/>
id=
"general.help"
defaultMessage=
{
'
Help
'
}
/>
</
a
>
</
a
>
</
li
>
</
li
>
...
@@ -243,8 +217,8 @@ var Navigation = React.createClass({
...
@@ -243,8 +217,8 @@ var Navigation = React.createClass({
<
form
action=
"/search/google_results"
method=
"get"
>
<
form
action=
"/search/google_results"
method=
"get"
>
<
Input
type=
"submit"
value=
""
/>
<
Input
type=
"submit"
value=
""
/>
<
Input
type=
"text"
<
Input
type=
"text"
aria
-
label=
{
formatMessage
(
defaultMessages
.
search
)
}
aria
-
label=
{
formatMessage
(
{
id
:
'
general.search
'
}
)
}
placeholder=
{
formatMessage
(
defaultMessages
.
search
)
}
placeholder=
{
formatMessage
(
{
id
:
'
general.search
'
}
)
}
name=
"q"
/>
name=
"q"
/>
<
Input
type=
"hidden"
name=
"date"
value=
"anytime"
/>
<
Input
type=
"hidden"
name=
"date"
value=
"anytime"
/>
<
Input
type=
"hidden"
name=
"sort_by"
value=
"datetime_shared"
/>
<
Input
type=
"hidden"
name=
"sort_by"
value=
"datetime_shared"
/>
...
@@ -254,18 +228,18 @@ var Navigation = React.createClass({
...
@@ -254,18 +228,18 @@ var Navigation = React.createClass({
<
li
className=
"link right messages"
key=
"messages"
>
<
li
className=
"link right messages"
key=
"messages"
>
<
a
<
a
href=
"/messages/"
href=
"/messages/"
title=
{
formatMessage
(
defaultMessages
.
messages
)
}
>
title=
{
formatMessage
(
{
id
:
'
general.messages
'
}
)
}
>
<
span
className=
{
messageClasses
}
>
{
this
.
state
.
unreadMessageCount
}
</
span
>
<
span
className=
{
messageClasses
}
>
{
this
.
state
.
unreadMessageCount
}
</
span
>
<
FormattedMessage
{
...
defaultMessages
.
messages
}
/>
<
FormattedMessage
id=
"general.messages"
/>
</
a
>
</
a
>
</
li
>,
</
li
>,
<
li
className=
"link right mystuff"
key=
"mystuff"
>
<
li
className=
"link right mystuff"
key=
"mystuff"
>
<
a
<
a
href=
"/mystuff/"
href=
"/mystuff/"
title=
{
formatMessage
(
defaultMessages
.
myStuff
)
}
>
title=
{
formatMessage
(
{
id
:
'
general.myStuff
'
}
)
}
>
<
FormattedMessage
{
...
defaultMessages
.
myStuff
}
/>
<
FormattedMessage
id=
"general.myStuff"
/>
</
a
>
</
a
>
</
li
>,
</
li
>,
<
li
className=
"link right account-nav"
key=
"account-nav"
>
<
li
className=
"link right account-nav"
key=
"account-nav"
>
...
@@ -279,46 +253,36 @@ var Navigation = React.createClass({
...
@@ -279,46 +253,36 @@ var Navigation = React.createClass({
onRequestClose=
{
this
.
closeAccountNav
}
>
onRequestClose=
{
this
.
closeAccountNav
}
>
<
li
>
<
li
>
<
a
href=
{
this
.
getProfileUrl
()
}
>
<
a
href=
{
this
.
getProfileUrl
()
}
>
<
FormattedMessage
<
FormattedMessage
id=
"general.profile"
/>
id=
'general.profile'
defaultMessage=
{
'
Profile
'
}
/>
</
a
>
</
a
>
</
li
>
</
li
>
<
li
>
<
li
>
<
a
href=
"/mystuff/"
>
<
a
href=
"/mystuff/"
>
<
FormattedMessage
{
...
defaultMessages
.
myStuff
}
/>
<
FormattedMessage
id=
"general.myStuff"
/>
</
a
>
</
a
>
</
li
>
</
li
>
{
this
.
props
.
session
.
permissions
.
educator
?
[
{
this
.
props
.
session
.
permissions
.
educator
?
[
<
li
>
<
li
>
<
a
href=
"/educators/classes/"
>
<
a
href=
"/educators/classes/"
>
<
FormattedMessage
<
FormattedMessage
id=
"general.myClasses"
/>
id=
'general.myClasses'
defaultMessage=
{
'
My Classes
'
}
/>
</
a
>
</
a
>
</
li
>
</
li
>
]
:
[]
}
]
:
[]
}
{
this
.
state
.
session
.
permissions
.
student
?
[
{
this
.
state
.
session
.
permissions
.
student
?
[
<
li
>
<
li
>
<
a
href=
{
'
/classes/
'
+
this
.
state
.
session
.
user
.
classroomId
+
'
/
'
}
>
<
a
href=
{
'
/classes/
'
+
this
.
state
.
session
.
user
.
classroomId
+
'
/
'
}
>
<
FormattedMessage
<
FormattedMessage
id=
"general.myClass"
/>
id=
'general.myClass'
defaultMessage=
{
'
My Class
'
}
/>
</
a
>
</
a
>
</
li
>
</
li
>
]
:
[]
}
]
:
[]
}
<
li
>
<
li
>
<
a
href=
"/accounts/settings/"
>
<
a
href=
"/accounts/settings/"
>
<
FormattedMessage
<
FormattedMessage
id=
"general.accountSettings"
/>
id=
'general.accountSettings'
defaultMessage=
{
'
Account settings
'
}
/>
</
a
>
</
a
>
</
li
>
</
li
>
<
li
className=
"divider"
>
<
li
className=
"divider"
>
<
a
href=
"#"
onClick=
{
this
.
handleLogOut
}
>
<
a
href=
"#"
onClick=
{
this
.
handleLogOut
}
>
<
FormattedMessage
<
FormattedMessage
id=
"navigation.signOut"
/>
id=
'navigation.signOut'
defaultMessage=
{
'
Sign out
'
}
/>
</
a
>
</
a
>
</
li
>
</
li
>
</
Dropdown
>
</
Dropdown
>
...
@@ -326,9 +290,7 @@ var Navigation = React.createClass({
...
@@ -326,9 +290,7 @@ var Navigation = React.createClass({
]
:
[
]
:
[
<
li
className=
"link right join"
key=
"join"
>
<
li
className=
"link right join"
key=
"join"
>
<
a
href=
"#"
onClick=
{
this
.
handleJoinClick
}
>
<
a
href=
"#"
onClick=
{
this
.
handleJoinClick
}
>
<
FormattedMessage
<
FormattedMessage
id=
"general.joinScratch"
/>
id=
'general.joinScratch'
defaultMessage=
{
'
Join Scratch
'
}
/>
</
a
>
</
a
>
</
li
>,
</
li
>,
<
Registration
<
Registration
...
@@ -342,9 +304,7 @@ var Navigation = React.createClass({
...
@@ -342,9 +304,7 @@ var Navigation = React.createClass({
onClick=
{
this
.
handleLoginClick
}
onClick=
{
this
.
handleLoginClick
}
className=
"ignore-react-onclickoutside"
className=
"ignore-react-onclickoutside"
key=
"login-link"
>
key=
"login-link"
>
<
FormattedMessage
<
FormattedMessage
id=
"general.signIn"
/>
id=
'general.signIn'
defaultMessage=
{
'
Sign In
'
}
/>
</
a
>
</
a
>
<
Dropdown
<
Dropdown
className=
"login-dropdown with-arrow"
className=
"login-dropdown with-arrow"
...
...
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