Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add some info and link to wiki in formatting help

  • Loading branch information...
commit 5e186ee612e7f2239d253cae0dd8103cec81176b 1 parent 40caa66
Chad Birch Deimos authored
1  r2/r2/lib/strings.py
View
@@ -130,6 +130,7 @@
invalid_search_query = _("I couldn't understand your query, so I simplified it and searched for \"%(clean_query)s\" instead."),
completely_invalid_search_query = _("I couldn't understand your search query. Please try again."),
search_help = _("You may also want to check the [search help page](%(search_help)s) for more information."),
+ formatting_help_info = _('reddit uses a slightly-customized version of [Markdown](http://daringfireball.net/projects/markdown/syntax) for formatting. See below for some basics, or check [the commenting wiki page](/wiki/commenting) for more detailed help and solutions to common issues.'),
generic_quota_msg = _("You've submitted too many links recently. Please try again in an hour."),
verified_quota_msg = _("Looks like you're either a brand new user or your posts have not been doing well recently. You may have to wait a bit to post again. In the meantime feel free to [check out the reddiquette](%(reddiquette)s) or join the conversation in a different thread."),
unverified_quota_msg = _("Looks like you're either a brand new user or your posts have not been doing well recently. You may have to wait a bit to post again. In the meantime feel free to [check out the reddiquette](%(reddiquette)s), join the conversation in a different thread, or [verify your email address](%(verify)s)."),
24 r2/r2/public/static/css/reddit.less
View
@@ -3741,18 +3741,20 @@ ul.tabmenu.formtab {
width: 100%;
}
-.usertext table.markhelp {
- background-color: white;
- margin: 5px 0px;
- width: 100%;
-}
-
-.usertext .markhelp,
-.usertext .markhelp td,
-.usertext .markhelp tr {
- border: 1px solid #C0C0C0;
+.usertext .markhelp {
padding: 4px;
- margin: 0px;
+ margin: 5px 0px;
+ border-top: 1px dotted #c0c0c0;
+
+ table {
+ width: 100%;
+ margin: 5px 0px;
+ }
+
+ tr, td {
+ width: 50%;
+ border: 1px solid #c0c0c0;
+ }
}
.usertext .markhelp .spaces {background-color: #c0c0c0}
4 r2/r2/templates/usertext.compact
View
@@ -22,11 +22,12 @@
<%!
from r2.lib.filters import unsafe, safemarkdown, keep_space
+ from r2.lib.strings import strings
from r2.lib.utils import randstr
%>
<%namespace file="printablebuttons.html" import="toggle_button" />
-<%namespace file="utils.html" import="error_field"/>
+<%namespace file="utils.html" import="error_field, md"/>
<%def name="action_button(name, btn_type, onclick, display)">
<button type="${btn_type}" onclick="${onclick}" class="${name}"
@@ -89,6 +90,7 @@
${error_field("USER_BLOCKED", "parent", "span")}
</div>
<div class="markhelp-parent">
+ <p>${md(strings.formatting_help_info)}</p>
<table class="markhelp">
<tr style="background-color: #ffff99; text-align: center">
<td><em>${_( "you type:")}</em></td>
126 r2/r2/templates/usertext.html
View
@@ -22,11 +22,12 @@
<%!
from r2.lib.filters import unsafe, safemarkdown, keep_space
+ from r2.lib.strings import strings
from r2.lib.utils import randstr
%>
<%namespace file="printablebuttons.html" import="toggle_button" />
-<%namespace file="utils.html" import="error_field"/>
+<%namespace file="utils.html" import="error_field, md"/>
<%def name="action_button(name, btn_type, onclick, display)">
<button type="${btn_type}" onclick="${onclick}" class="${name}"
@@ -91,69 +92,72 @@
</div>
</div>
- <table class="markhelp md" style="display: none">
- <tr style="background-color: #ffff99; text-align: center">
- <td><em>${_( "you type:")}</em></td>
- <td><em>${_( "you see:")}</em></td>
- </tr>
- <tr>
- <td>*${_( "italics")}*</td>
- <td><em>${_( "italics")}</em></td>
- </tr>
- <tr>
- <td>**${_( "bold")}**</td>
- <td><b>${_( "bold")}</b></td>
- </tr>
- <tr>
- <td>[reddit!](http://reddit.com)</td>
- <td><a href="http://reddit.com">reddit!</a></td>
- </tr>
- <tr>
- <td>
- * ${_( "item")} 1<br/>
- * ${_( "item")} 2<br/>
- * ${_( "item")} 3
- </td>
- <td>
- <ul>
- <li>${_( "item")} 1</li>
- <li>${_( "item")} 2</li>
- <li>${_( "item")} 3</li>
- </ul>
- </td>
- </tr>
- <tr>
- <td>&gt; ${_( "quoted text")}</td>
- <td><blockquote>${_( "quoted text" )}</blockquote></td>
- </tr>
- <tr>
+ <div class="markhelp" style="display:none">
+ <p>${md(strings.formatting_help_info)}</p>
+ <table class="md">
+ <tr style="background-color: #ffff99; text-align: center">
+ <td><em>${_( "you type:")}</em></td>
+ <td><em>${_( "you see:")}</em></td>
+ </tr>
+ <tr>
+ <td>*${_( "italics")}*</td>
+ <td><em>${_( "italics")}</em></td>
+ </tr>
+ <tr>
+ <td>**${_( "bold")}**</td>
+ <td><b>${_( "bold")}</b></td>
+ </tr>
+ <tr>
+ <td>[reddit!](http://reddit.com)</td>
+ <td><a href="http://reddit.com">reddit!</a></td>
+ </tr>
+ <tr>
<td>
- Lines starting with four spaces <br/>
- are treated like code:<br/><br/>
- <span class="spaces">
- &nbsp;&nbsp;&nbsp;&nbsp;
- </span>
- if 1 * 2 &lt; 3:<br/>
- <span class="spaces">
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- </span>
- print "hello, world!"<br/>
+ * ${_( "item")} 1<br/>
+ * ${_( "item")} 2<br/>
+ * ${_( "item")} 3
</td>
- <td>Lines starting with four spaces <br/>
- are treated like code:<br/>
- <pre>if 1 * 2 &lt; 3:<br/>&nbsp;&nbsp;&nbsp;&nbsp;print "hello,
- world!"</pre>
+ <td>
+ <ul>
+ <li>${_( "item")} 1</li>
+ <li>${_( "item")} 2</li>
+ <li>${_( "item")} 3</li>
+ </ul>
</td>
- </tr>
- <tr>
- <td>~~strikethrough~~</td>
- <td><strike>strikethrough</strike></td>
- </tr>
- <tr>
- <td>super^script</td>
- <td>super<sup>script</sup></td>
- </tr>
- </table>
+ </tr>
+ <tr>
+ <td>&gt; ${_( "quoted text")}</td>
+ <td><blockquote>${_( "quoted text" )}</blockquote></td>
+ </tr>
+ <tr>
+ <td>
+ Lines starting with four spaces <br/>
+ are treated like code:<br/><br/>
+ <span class="spaces">
+ &nbsp;&nbsp;&nbsp;&nbsp;
+ </span>
+ if 1 * 2 &lt; 3:<br/>
+ <span class="spaces">
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ </span>
+ print "hello, world!"<br/>
+ </td>
+ <td>Lines starting with four spaces <br/>
+ are treated like code:<br/>
+ <pre>if 1 * 2 &lt; 3:<br/>&nbsp;&nbsp;&nbsp;&nbsp;print "hello,
+ world!"</pre>
+ </td>
+ </tr>
+ <tr>
+ <td>~~strikethrough~~</td>
+ <td><strike>strikethrough</strike></td>
+ </tr>
+ <tr>
+ <td>super^script</td>
+ <td>super<sup>script</sup></td>
+ </tr>
+ </table>
+ </div>
</div>
%endif
Please sign in to comment.
Something went wrong with that request. Please try again.