[s9y_event_markdown] Add documentation, update German translation. (#66)

* [s9y_event_markdown] Update German translation.

Signed-off-by: Thomas Hochstein <thh@inter.net>

* [s9y_event_markdown] Add documentation.

German and English language documentation added.

Signed-off-by: Thomas Hochstein <thh@inter.net>

* [s9y_event_markdown] Update/change language files.

* Add an explicit SmartyPants option instead
  of a simple "yes".
* Change (English and German) language files
  accordingly.
* Change URLs to https to avoid redirects.
* Bump version to 1.26
* Update ChangeLog.

Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
Thomas Hochstein 2017-08-06 14:16:32 +02:00 committed by onli
parent 2c0798670b
commit 123581d727
7 changed files with 440 additions and 14 deletions

View file

@ -1,3 +1,11 @@
Version 1.26:
=============
Changes by Thomas Hochstein <thh@inter.net>
- Some small text changes.
- Update German translation.
- Add English and German documentation.
Version 1.25:
=============
Changes by Thomas Hochstein <thh@inter.net>

View file

@ -1,6 +1,22 @@
<?php #
@define('PLUGIN_EVENT_MARKDOWN_NAME', 'Textformatierung: Markdown');
@define('PLUGIN_EVENT_MARKDOWN_DESC', 'Markdown Textformatierung durchführen');
@define('PLUGIN_EVENT_MARKDOWN_TRANSFORM', '<a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a>-Formatierung erlaubt');
/**
* @version 1.26
* @author Thomas Hochstein <thh@inter.net>
* EN-Revision: 1.26
*/
@define('PLUGIN_EVENT_MARKDOWN_NAME', 'Textformatierung: Markdown');
@define('PLUGIN_EVENT_MARKDOWN_DESC', 'Markdown-Textformatierung durchführen');
@define('PLUGIN_EVENT_MARKDOWN_EXTRA_NAME', '"Markdown Extra" verwenden');
@define('PLUGIN_EVENT_MARKDOWN_EXTRA_DESC', 'Markdown Extra iste eine erweiterte Markdown-Variante, vgl. https://michelf.ca/projects/php-markdown/extra/');
@define('PLUGIN_EVENT_MARKDOWN_TRANSFORM', '<a href="https://daringfireball.net/projects/markdown/syntax">Markdown</a>-Formatierung erlaubt');
@define('PLUGIN_EVENT_MARKDOWN_VERSION', 'Markdown-Version');
@define('PLUGIN_EVENT_MARKDOWN_VERSION_BLABLAH', 'Welche Markdown-Version verwenden? (Siehe https://michelf.ca/projects/php-markdown/ und https://michelf.ca/blog/2013/php-markdown-lib/)');
@define('PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_NAME', 'SmartyPants (und Typographer) verwenden');
@define('PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_DESC', 'SmartyPants (oder SmartyPants Typographer) "verschönern" Text durch Ersetzung bestimmter Zeichen mit passenden HTML-Entities, vgl. https://michelf.ca/projects/php-smartypants/ - Nur mit der "lib"-Version von Markdwon möglich!');
@define('PLUGIN_EVENT_MARKDOWN_SMARTYPANTS', 'SmartyPants');
@define('PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_EXTENDED', 'SmartyPants Typographer');
@define('PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_NEVER', 'deaktiviert');

View file

@ -0,0 +1,195 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Hilfedatei: Markdown</title>
<style type="text/css">
body {
font-family: Arial, sans-serif!important;
margin: 20px;
}
ol li {
margin-bottom: 0.5em;
}
h2 {
background: #efefef;
padding: 0.5em;
}
p {
max-width: 60em;
}
.titel {
background: #cfcfcf;
margin: 0;
padding: 0.5em;
}
#inhalt {
background: #efefef;
margin: 0;
padding: 0.5em;
}
#inhalt h2 {
padding: 0;
}
</style>
</head>
<body>
<h1 class="titel">Textformatierung: <i>Markdown</i></h1>
</div>
<div id="inhalt">
<h2>Inhalt</h2>
<ol>
<li><a href="#description">Beschreibung</a></li>
<li><a href="#config">Konfiguration</a></li>
<li><a href="#notes">Hinweise</a></li>
</ol>
</div>
<p>Diese Erweiterung stellt die Auszeichnungssprache
<a href="https://daringfireball.net/projects/markdown/"><i>Markdown</i></a>
von <i>John Gruber</i> in der PHP-Variante
("<a href="https://michelf.ca/projects/php-markdown/">PHP Markdown</a>")
mit der Erweiterung <i>Markdown Extra</i> von <i>Michel Fortin</i>
zur Verfügung.</p>
<p>Außerdem stehen optional die "Textverschönerer" (<em>prettyfier</em>)
<i>PHP SmartyPants</i> und <i>PHP SmartyPants Typographer</i>
zur Verfügung.</p>
<h2 id="description">Beschreibung</h2>
<p><i>Markdown</i> ist eine Auszeichnungssprache ("Markup") für Web-Autoren,
mit der sich ein einfach lesbarer, leicht zu schreibender Klartext in valides
HTML umsetzen lässt. Der "Rohtext" soll im Gegensatz zu anderen
Auszeichnungssprachen möglichst einfach lesbar sein und "natürlich"
wirken.</p>
<p><i>Markdown Extra</i> ist eine <i>Markdown</i>-Erweiterung, die zusätzliche
Funktionen wie Tabellen, Fußnoten und die Definition von Attributen
(<i>ID</i> oder <i>class</i>) zur Verfügung stellt.</p>
<p><i>SmartyPants</i> "verschönert" Texte, indem bestimmte einfache Zeichen
durch typographische HTML-Elemente ersetzt werden.</p>
<p>Mehr dazu:</p>
<ul>
<li><a href="https://de.wikipedia.org/wiki/Markdown">Wikipedia-Eintrag</a> zu <i>Markdown</i> (dt.)</li>
<li><a href="https://daringfireball.net/projects/markdown/"><i>Markdown</i>-Projektseite</a> (engl., mit Dokumentation und Syntax-Beschreibung)</li>
<li><a href="https://daringfireball.net/projects/smartypants/"><i>SmartyPants</i>-Projektseite</a> (engl.)</li>
</ul>
<h2 id="config">Konfiguration</h2>
<h3><i>Markdown</i>-Textformatierung aktivieren</h3>
<p>Die Textformatierung kann für folgende Bereiche gesondert aktiviert oder
deaktiviert werden:</p>
<ul>
<li>Eintrag</li>
<li>Erweiterter Eintrag</li>
<li>Kommentare</li>
<li>HTML-Klotz <em>(wenn <code>serendipity_plugin_html_nugget</code> verwendet wird)</em></li>
</ul>
<h3><i>Markdown</i> oder <i>Markdown Extra</i></h3>
<p>Es kann entweder das originale <i>Markdown</i> oder die Erweiterung
<i>Markdown Extra</i> verwendet werden.</p>
<p><i>Markdown Extra</i> hat folgende zusätzliche Features:</p>
<ul>
<li>HTML in <i>Markdown</i> und <i>Markdown</i> in HTML</li>
<li>Attribute wie "id" oder "class" in <i>Markdown</i></li>
<li>Code-Blocks ohne Einrückung</li>
<li>Tabellen</li>
<li>Fußnoten</li>
<li>Abkürzungen <em>(abbreviations, &lt;abbr&gt;&lt;/abbr&gt;)</em></li>
<li>Definitions-Listen <em>(definition lists, &lt;dl&gt;&lt;/dl&gt;)</em></li>
<li>nummerierte Listen (&lt;ol&gt;&lt;/ol&gt;) können mit anderen Zahlen als "1" starten</li>
</ul>
<p>Syntax-Dokumentation:</p>
<ul>
<li><a href="https://daringfireball.net/projects/markdown/syntax/"><i>Markdown</i>-Syntax</a> (engl.)</li>
<li><a href="https://michelf.ca/projects/php-markdown/extra/"><i>Markdown Extra</i></a> (engl.)</li>
</ul>
<p>Die <i>PHP-Markdown</i>-<a href="https://michelf.ca/projects/php-markdown/configuration/">Konfiguration</a>
ist auf die Standardwerte gesetzt und nicht veränderbar. Wenn Sie die
<code>lib</code>-Version verwenden, bekomme Fußnoten jedoch als Prefix die
Nummer des Eintrags in <i>Serendipity</i> (<code>fn_id_prefix</code>).</p>
<h3><i>Markdown</i>-Version</h3>
<p>Zur Auswahl stehen eine klassische Implementation (<code>classic</code>) oder
die Verwendung der <i>PHP-Markdown</i>-Bibliothek (<code>lib</code>).</p>
<p><strong>Da die klassische Implementation seit 2013 nicht mehr weiter gepflegt
wird, sollte hier jedenfalls die <code>lib</code>-Version ausgewählt
werden.</strong> Nur diese Version unterstützt auch Prefixe für Fußnoten in
<i>Markdown Extra</i> und die Textverschönerung durch <i>SmartyPants</i> oder
<i>SmartyPants Typographer</i>.</p>
<h3>Textformatierung mit <i>SmartyPants</i> und <i>SmartyPants Typographer</i> aktivieren</h3>
<p><i>SmartyPants</i> und <i>SmartyPants Typographer</i> sind sog. "prettyfier",
die Texte in typographischer Hinsicht "verschönern", indem sie bestimmte
Elemente wie Anführungszeichen in die entsprechenden HTML-Entities verwandeln
oder aus drei Punkten (...) eine "Ellipse" (&hellip;) machen.</p>
<p><strong>Die Aktivierung setzt die Verwendung der <code>lib</code>-Version
von <i>PHP-Markdown</i> voraus!</strong></p>
<p>Dokumentation: <a href="https://michelf.ca/projects/php-smartypants/"><i>PHP SmartyPants</i></a> (engl.)</p>
<h2 id="notes">Hinweise</h2>
<h3><i>CSS</i> für Fußnoten</h3>
<p>Für die Formatierung von Fußnotenzeichen und Fußnoten erzeugt das Plugin folgendes <i>CSS</i>:</p>
<pre>
/* Footnotes (generated by serendipity_event_markdown) */
footnote-ref:after {
content: ")";
}
.footnotes hr {
border-top: dashed #ccc;
border-width: 1px;
}
/* mostly taken from http://www.456bereastreet.com/archive/201105/styling_ordered_list_numbers/ */
.footnotes ol {
counter-reset: li;
margin-top: .2em;
margin-left: 1.5em;
padding-left: 0;
}
.footnotes ol > li {
list-style: none;
position: relative;
padding-left: .5em;
font-size: 90%;
}
.footnotes ol > li:before {
content: counter(li)")";
counter-increment: li;
position: absolute;
left: -2em;
top: -.1em;
width: 2em;
text-align: right;
font-size: 80%;
font-weight: bold;
}
/* --- end of Footnotes */
</pre>
</body>
</html>

View file

@ -0,0 +1,190 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Documentation: Markdown</title>
<style type="text/css">
body {
font-family: Arial, sans-serif!important;
margin: 20px;
}
ol li {
margin-bottom: 0.5em;
}
h2 {
background: #efefef;
padding: 0.5em;
}
p {
max-width: 60em;
}
.titel {
background: #cfcfcf;
margin: 0;
padding: 0.5em;
}
#inhalt {
background: #efefef;
margin: 0;
padding: 0.5em;
}
#inhalt h2 {
padding: 0;
}
</style>
</head>
<body>
<h1 class="titel">Markup: <i>Markdown</i></h1>
</div>
<div id="inhalt">
<h2>Inhalt</h2>
<ol>
<li><a href="#description">Description</a></li>
<li><a href="#config">Configuration</a></li>
<li><a href="#notes">Notes</a></li>
</ol>
</div>
<p>This plugin provides the
<a href="https://daringfireball.net/projects/markdown/"><i>Markdown</i></a>
markup language by <i>John Gruber</i>, using the
("<a href="https://michelf.ca/projects/php-markdown/">PHP Markdown</a>")
port (including the <i>Markdown Extra</i> extension)
by <i>Michel Fortin</i>.</p>
<p>Additionally it can provide the "prettyfier"
<i>PHP SmartyPants</i> and <i>PHP SmartyPants Typographer</i>.</p>
<h2 id="description">Description</h2>
<p>Markdown is a plain text format for writing structured documents, based on
formatting conventions from email and usenet. It allows you to write using an
easy-to-read, easy-to-write plain text format, then convert it to structurally
valid XHTML (or HTML).</p>
<p><i>Markdown Extra</i> is an extension to PHP Markdown implementing some
features currently not available with the plain Markdown syntax.</p>
<p><i>SmartyPants</i> is a free web typography prettifyier tool for web writers.
It translates plain ASCII punctuation characters into "smart" typographic
punctuation HTML entities.</p>
<p>Read more:</p>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Markdown">Wikipedia page</a> about <i>Markdown</i></li>
<li><a href="https://daringfireball.net/projects/markdown/"><i>Markdown</i> project page </a> (including documentation and syntax)</li>
<li><a href="https://daringfireball.net/projects/smartypants/"><i>SmartyPants</i> project page</a></li>
</ul>
<h2 id="config">Configuration</h2>
<h3>Activate <i>Markdown</i> parser</h3>
<p><i>Markdown</i> can be parsed in &hellip;</p>
<ul>
<li>Entry bodies</li>
<li>Extended bodies</li>
<li>Comments</li>
<li>HTML nuggets <em>(using <code>serendipity_plugin_html_nugget</code>)</em></li>
</ul>
<h3><i>Markdown</i> or <i>Markdown Extra</i></h3>
<p>You can choose from the traditional <i>Markdown</i> and
<i>Markdown Extra</i> flavours.</p>
<p><i>Markdown Extra</i> offers some additional features:</p>
<ul>
<li>HTML in <i>Markdown</i> and <i>Markdown</i> in HTML</li>
<li>attributes like "id" or "class" in <i>Markdown</i></li>
<li>fenced code blocks without intendation</li>
<li>tables</li>
<li>footnotes</li>
<li>Abbreviations <em>(&lt;abbr&gt;&lt;/abbr&gt;)</em></li>
<li>definition lists <em>(&lt;dl&gt;&lt;/dl&gt;)</em></li>
<li>ordered lists (&lt;ol&gt;&lt;/ol&gt;) can start with another value than "1"</li>
</ul>
<p>Syntax:</p>
<ul>
<li><a href="https://daringfireball.net/projects/markdown/syntax/"><i>Markdown</i> syntax</a></li>
<li><a href="https://michelf.ca/projects/php-markdown/extra/"><i>Markdown Extra</i> syntax</a></li>
</ul>
<p>All <i>PHP-Markdown</i> <a href="https://michelf.ca/projects/php-markdown/configuration/">configuration</a>
options are set to their default values and can't be changed, with one
exception: using the <code>lib</code> version, footnotes will get the
<i>Serendipity</i> entry id set as prefix (<code>fn_id_prefix</code>).</p>
<h3><i>Markdown</i> version</h3>
<p>You can choose from the <code>classic</code> or <code>lib</code> (library
package) version.</p>
<p><strong>As the <code>classic</code> version of <i>PHP Markdown</i> and
<i>PHP Markdown Extra</i> is no longer being supported since February 1, 2013,
you should choose the <code>lib</code> version in any case.</strong>
Furthermore, the <code>classic</code> version doesn't support
<i>SmartyPants</i> or footnote prefixes.</p>
<h3>Aktivate <i>SmartyPants</i> or <i>SmartyPants Typographer</i> parser</h3>
<p><i>SmartyPants</i> and <i>SmartyPants Typographer</i> translate plain ASCII
punctuation characters into "smart" typographic punctuation HTML entities.</p>
<p><strong>You have to choose the <code>lib</code> version of
<i>PHP-Markdown</i> to activate <i>SmartyPants</i>!</strong></p>
<p>Documentation: <a href="https://michelf.ca/projects/php-smartypants/"><i>PHP SmartyPants</i></a></p>
<h2 id="notes">Notes</h2>
<h3><i>CSS</i> for footnotes</h3>
<p>The plugin will add some <i>CSS</i> to style footnotes and footnote markers:</p>
<pre>
/* Footnotes (generated by serendipity_event_markdown) */
footnote-ref:after {
content: ")";
}
.footnotes hr {
border-top: dashed #ccc;
border-width: 1px;
}
/* mostly taken from http://www.456bereastreet.com/archive/201105/styling_ordered_list_numbers/ */
.footnotes ol {
counter-reset: li;
margin-top: .2em;
margin-left: 1.5em;
padding-left: 0;
}
.footnotes ol > li {
list-style: none;
position: relative;
padding-left: .5em;
font-size: 90%;
}
.footnotes ol > li:before {
content: counter(li)")";
counter-increment: li;
position: absolute;
left: -2em;
top: -.1em;
width: 2em;
text-align: right;
font-size: 80%;
font-weight: bold;
}
/* --- end of Footnotes */
</pre>
</body>
</html>

View file

@ -1,6 +1,22 @@
<?php #
@define('PLUGIN_EVENT_MARKDOWN_NAME', 'Textformatierung: Markdown');
@define('PLUGIN_EVENT_MARKDOWN_DESC', 'Markdown Textformatierung durchführen');
@define('PLUGIN_EVENT_MARKDOWN_TRANSFORM', '<a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a>-Formatierung erlaubt');
/**
* @version 1.26
* @author Thomas Hochstein <thh@inter.net>
* EN-Revision: 1.26
*/
@define('PLUGIN_EVENT_MARKDOWN_NAME', 'Textformatierung: Markdown');
@define('PLUGIN_EVENT_MARKDOWN_DESC', 'Markdown-Textformatierung durchführen');
@define('PLUGIN_EVENT_MARKDOWN_EXTRA_NAME', '"Markdown Extra" verwenden');
@define('PLUGIN_EVENT_MARKDOWN_EXTRA_DESC', 'Markdown Extra iste eine erweiterte Markdown-Variante, vgl. https://michelf.ca/projects/php-markdown/extra/');
@define('PLUGIN_EVENT_MARKDOWN_TRANSFORM', '<a href="https://daringfireball.net/projects/markdown/syntax">Markdown</a>-Formatierung erlaubt');
@define('PLUGIN_EVENT_MARKDOWN_VERSION', 'Markdown-Version');
@define('PLUGIN_EVENT_MARKDOWN_VERSION_BLABLAH', 'Welche Markdown-Version verwenden? (Siehe https://michelf.ca/projects/php-markdown/ und https://michelf.ca/blog/2013/php-markdown-lib/)');
@define('PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_NAME', 'SmartyPants (und Typographer) verwenden');
@define('PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_DESC', 'SmartyPants (oder SmartyPants Typographer) "verschönern" Text durch Ersetzung bestimmter Zeichen mit passenden HTML-Entities, vgl. https://michelf.ca/projects/php-smartypants/ - Nur mit der "lib"-Version von Markdwon möglich!');
@define('PLUGIN_EVENT_MARKDOWN_SMARTYPANTS', 'SmartyPants');
@define('PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_EXTENDED', 'SmartyPants Typographer');
@define('PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_NEVER', 'deaktiviert');

View file

@ -9,14 +9,15 @@
@define('PLUGIN_EVENT_MARKDOWN_NAME', 'Markup: Markdown');
@define('PLUGIN_EVENT_MARKDOWN_DESC', 'Apply Markdown markup to entry text');
@define('PLUGIN_EVENT_MARKDOWN_EXTRA_NAME', 'Markup: Markdown Extra');
@define('PLUGIN_EVENT_MARKDOWN_EXTRA_DESC', 'Apply Markdown Extra markup to entry text (See: http://michelf.ca/projects/php-markdown/extra/)');
@define('PLUGIN_EVENT_MARKDOWN_TRANSFORM', '<a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a> format allowed');
@define('PLUGIN_EVENT_MARKDOWN_EXTRA_DESC', 'Apply Markdown Extra markup to entry text (See: https://michelf.ca/projects/php-markdown/extra/)');
@define('PLUGIN_EVENT_MARKDOWN_TRANSFORM', '<a href="https://daringfireball.net/projects/markdown/syntax">Markdown</a> format allowed');
@define('PLUGIN_EVENT_MARKDOWN_VERSION', 'Markdown Version');
@define('PLUGIN_EVENT_MARKDOWN_VERSION_BLABLAH', 'Which version of Markdown do you want to use? (http://michelf.ca/projects/php-markdown/ and http://michelf.ca/blog/2013/php-markdown-lib/)');
@define('PLUGIN_EVENT_MARKDOWN_VERSION_BLABLAH', 'Which version of Markdown do you want to use? (https://michelf.ca/projects/php-markdown/ and https://michelf.ca/blog/2013/php-markdown-lib/)');
@define('PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_NAME', 'Markup: SmartyPants');
@define('PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_DESC', 'Apply SmartyPants (+Typographer) markup to entry text (See: http://michelf.ca/projects/php-smartypants/). Use with lib only!');
@define('PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_EXTENDED', '+Typographer');
@define('PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_NEVER', 'Disabled');
@define('PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_DESC', 'Apply SmartyPants (+Typographer) markup to entry text (See: https://michelf.ca/projects/php-smartypants/). Use with lib only!');
@define('PLUGIN_EVENT_MARKDOWN_SMARTYPANTS', 'SmartyPants');
@define('PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_EXTENDED', 'SmartyPants Typographer');
@define('PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_NEVER', 'none');

View file

@ -31,7 +31,7 @@ class serendipity_event_markdown extends serendipity_event
'smarty' => '2.6.7',
'php' => '5.3.0'
));
$propbag->add('version', '1.25');
$propbag->add('version', '1.26');
$propbag->add('cachable_events', array('frontend_display' => true));
$propbag->add('event_hooks', array(
'frontend_display' => true,
@ -112,7 +112,7 @@ class serendipity_event_markdown extends serendipity_event
$propbag->add('description', PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_DESC);
$propbag->add('radio', array(
'value' => array(1, 2, 0),
'desc' => array(YES, PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_EXTENDED, PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_NEVER)
'desc' => array(PLUGIN_EVENT_MARKDOWN_SMARTYPANTS, PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_EXTENDED, PLUGIN_EVENT_MARKDOWN_SMARTYPANTS_NEVER)
));
$propbag->add('default', 0);
return true;