translate possible uses of markdown. fixes #5

This commit is contained in:
Carl Chenet 2016-11-18 16:05:51 +01:00
parent ae52b30ed4
commit 1650a91851
4 changed files with 46 additions and 18 deletions

View file

@ -1,12 +1,12 @@
<div class="markdown_help" style="display: none; padding-top: 0.5em;">
<table>
<tr>
<td width="125"><em>emphasized text</em></td>
<td>surround text with <tt>*asterisks*</tt></td>
<td width="125"><em><%= t('.emphasizedtext') %></em></td>
<td><%= raw t('.emphasizedtextdesc') %></td>
</tr>
<tr>
<td><strong>strong text</strong></td>
<td>surround text with <tt>**two asterisks**</tt></td>
<td><strong><%= t('.strongtext') %></strong></td>
<td><%= raw t('.strongtextdesc') %></td>
</tr>
<!--
<tr>
@ -15,29 +15,26 @@
</tr>
-->
<tr>
<td><tt>fixed width</tt></td>
<td>surround text with <tt>`backticks`</tt></td>
<td><tt><%= t('.fixedwidth') %></tt></td>
<td><%= raw t('.fixedwidthdesc') %></td>
</tr>
<tr>
<td><a href="http://example.com/"
style="color: inherit;">linked text</a></td>
<td><tt>[linked text](http://example.com/)</tt> or just a bare URL
to create without a title</td>
style="color: inherit;"><%= t('.linkedtext') %></a></td>
<td><%= raw t('.linkedtextdesc') %></td>
</tr>
<tr>
<td><blockquote> quoted text</blockquote></td>
<td>prefix text with <tt>&gt;</tt></td>
<td><blockquote> <%= t('.quotedtext') %></blockquote></td>
<td><%= raw t('.quotedtextdesc') %></td>
</tr>
<tr>
<td><pre style="margin: 0px;">pre
text</pre></td>
<td>prefix text with at least<tt>&nbsp;&nbsp;&nbsp;&nbsp;4 spaces</tt></td>
<td><pre style="margin: 0px;"><%= t('.pretext') %></pre></td>
<td><%= raw t('.pretextdesc') %></td>
</tr>
<% if defined?(allow_images) && allow_images %>
<tr>
<td>(inline image)</td>
<td><tt>![alt text](http://example.com/image.jpg)</tt> (only allowed in
story text</td>
<td><%= t('.inlineimage') %></td>
<td><tt><%= raw t('.inlineimagedesc') %></td>
</tr>
<% end %>
</table>

View file

@ -17,7 +17,7 @@ module Lobsters
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
config.time_zone = 'Central Time (US & Canada)'
config.time_zone = 'Europe/Paris'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]

View file

@ -69,6 +69,21 @@ en:
delete: "delete"
reply: "reply"
about: "on:"
global:
markdownhelp:
emphasizedtext: "emphasized text"
emphasizedtextdesc: "surround text with <tt>*asterisks*</tt>"
strongtext: "strong text"
strongtextdesc: "<tt>surround text with <tt>**two asterisks**</tt>"
fixedwidth: "fixed width"
fixedwidthdesc: "<tt>surround text with <tt>`backticks`</tt>"
linkedtext: "linked text"
linkedtextdesc: "<tt>[linked text](http://example.com/)</tt> or just a bare URL to create without a title"
quotedtext: "quoted text"
quotedtextdesc: "prefix text with <tt>&gt;</tt>"
pretextdesc: "prefix text with at least<tt>&nbsp;&nbsp;&nbsp;&nbsp;4 spaces</tt>"
inlineimage: "(inline image)"
inlineimagedesc: "![alt text](http://example.com/image.jpg)</tt> (only allowed in story text)"
home:
index:
homerecentsdesc: "<em>The <a href=\"/newest\">newest</a> stories with a random sampling of recently submitted stories that have not yet reached the front page.</em>"

View file

@ -71,6 +71,22 @@ fr:
delete: "supprimer"
reply: "répondre"
about: "sur :"
global:
markdownhelp:
emphasizedtext: "italique"
emphasizedtextdesc: "encadrer le texte avec des <tt>*astérisques*</tt>"
strongtext: "gras"
strongtextdesc: "<tt>encadrer le texte avec <tt>**deux astérisques**</tt>"
fixedwidth: "chasse fixe"
fixedwidthdesc: "<tt>encadrer le texte avec <tt>`accent grave (backquote)`</tt>"
linkedtext: "lien"
linkedtextdesc: "<tt>[texte du lien](http://example.com/)</tt> ou bien l'url seule sans titre"
quotedtext: "citation"
quotedtextdesc: "précéder le texte avec <tt>&gt;</tt>"
pretext: "texte tabulé"
pretextdesc: "précéder le texte avec au moins <tt>&nbsp;&nbsp;&nbsp;&nbsp;4 spaces</tt>"
inlineimage: "(image en ligne)"
inlineimagedesc: "![texte de substitution](http://example.com/image.jpg)</tt> (autorisé seulement dans les articles)"
home:
index:
homerecentsdesc: "<em>Les <a href=\"/newest\">plus récentes</a> infos avec un panaché aléatoire des infos récentes soumises qui n'ont pas encore atteint la page principale.</em>"