Commit 5ed8d557 by Adam Palay Committed by Jay Zoldak

put wiki templates back into Django templating

parent 39b82976
<%! from django.utils.translation import ugettext as _ %>
{% load i18n %}
<div class="modal hide fade" id="cheatsheetModal">
<a href="#" class="close-btn">×</a>
<div id="cheatsheet-body" class="modal-body">
<div class="left-column">
<section>
<h2>${_("Wiki Syntax Help")}</h2>
<p>${_("This wiki uses <strong>Markdown</strong> for styling. There are several useful guides online. See any of the links below for in-depth details:")}</p>
<h2>{% trans "Wiki Syntax Help" %}</h2>
<p>{% trans "This wiki uses <strong>Markdown</strong> for styling. There are several useful guides online. See any of the links below for in-depth details:" %}</p>
<ul>
<li>${_('<a href="http://daringfireball.net/projects/markdown/basics" target="_blank">Markdown: Basics</a>')}</li>
<li>${_('<a href="http://greg.vario.us/doc/markdown.txt" target="_blank">Quick Markdown Syntax Guide</a>')}</li>
<li>${_('<a href="http://www.lowendtalk.com/discussion/6/miniature-markdown-guide" target="_blank">Miniature Markdown Guide</a>')}</li>
<li>{% trans '<a href="http://daringfireball.net/projects/markdown/basics" target="_blank">Markdown: Basics</a>' %}</li>
<li>{% trans '<a href="http://greg.vario.us/doc/markdown.txt" target="_blank">Quick Markdown Syntax Guide</a>' %}</li>
<li>{% trans '<a href="http://www.lowendtalk.com/discussion/6/miniature-markdown-guide" target="_blank">Miniature Markdown Guide</a>' %}</li>
</ul>
<p>${_("To create a new wiki article, create a link to it. Clicking the link gives you the creation page.")}</p>
<pre>${_("[Article Name](wiki:ArticleName)")}</pre>
<p>{% trans "To create a new wiki article, create a link to it. Clicking the link gives you the creation page." %}</p>
<pre>{% trans "[Article Name](wiki:ArticleName)" %}</pre>
</section>
<section>
<h3>${_("{edX} Additions:").format(edX="edX")}</h3>
{% comment %}
Translators: Do not translate "edX"
{% endcomment %}
<h3>{% trans "edX Additions:" %}</h3>
<pre>
circuit-schematic:</pre>
<pre>
......@@ -25,30 +28,34 @@ $LaTeX Math Expression$</pre>
<div class="right-column">
<section>
<h3>${_("Useful examples:")}</h3>
<h3>{% trans "Useful examples:" %}</h3>
<pre>
${_("http://wikipedia.org\
[{Wikipedia}](http://wikipedia.org)\
[{edX} Wiki](wiki:/edx/)").format(edX="edX", Wikipedia="Wikipedia")}</pre>
{% comment %}
Translators: Do not translate "edX" or "Wikipedia"
{% endcomment %}
{% trans "http://wikipedia.org" %}
{% trans "[Wikipedia](http://wikipedia.org)" %}
{% trans "[edX Wiki](wiki:/edx/)" %}
</pre>
<pre>
${_("Huge Header")}
{% trans "Huge Header" %}
===========</pre>
<pre>
${_("Smaller Header")}
{% trans "Smaller Header" %}
--------------</pre>
<pre>
${_("*emphasis* or _emphasis_")}</pre>
{% trans "*emphasis* or _emphasis_" %}</pre>
<pre>
${_("**strong** or __strong__")}</pre>
{% trans "**strong** or __strong__" %}</pre>
<pre>
${_("- Unordered List\
- Sub Item 1\
- Sub Item 2")}</pre>
- {% trans "Unordered List" %}
- {% trans "Sub Item 1" %}
- {% trans "Sub Item 2" %}</pre>
<pre>
${_("1. Ordered\
2. List")}</pre>
1. {% trans "Ordered" %}
2. {% trans "List" %}</pre>
<pre>
${_("> Quotes")}</pre>
> {% trans "Quotes" %}</pre>
</section>
</div>
......
<%! from django.utils.translation import ugettext as _ %>
{% load i18n %}
<textarea {{ attrs }}>{{ content }}</textarea>
<p id="hint_id_content" class="help-block">
${_('Markdown syntax is allowed. See the <a id="cheatsheetLink" href="#">_{("cheatsheet")}</a> for help.')}
{% comment %}
Translators: Do not translate 'cheatsheetLink'
{% endcomment %}
{% trans "Markdown syntax is allowed. See the <a id='cheatsheetLink' href='#'>cheatsheet</a> for help." %}
</p>
<%! from django.utils.translation import ugettext as _ %>
<!DOCTYPE html>
{% load wiki_tags i18n %}{% load compressed %}
<html>
......@@ -29,8 +28,8 @@
{% if revision and revision.deleted %}
<div class="warning">
<strong>${_("This revision has been deleted.")}</strong>
<p>${_("Restoring to this revision will mark the article as deleted.")}</p>
<strong>{% trans "This revision has been deleted." %}</strong>
<p>{% trans "Restoring to this revision will mark the article as deleted." %}</p>
</div>
{% else %}
{% wiki_render article content %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment