summaryrefslogtreecommitdiff
path: root/po/underlays/directives/ikiwiki/directive/template.es.po
blob: 8fd25af1323cc46971d21cf5a34f19601ccee9ae (plain)
  1. # SOME DESCRIPTIVE TITLE
  2. # Copyright (C) YEAR Free Software Foundation, Inc.
  3. # This file is distributed under the same license as the PACKAGE package.
  4. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
  5. #
  6. #, fuzzy
  7. msgid ""
  8. msgstr ""
  9. "Project-Id-Version: PACKAGE VERSION\n"
  10. "POT-Creation-Date: 2011-05-05 20:04+0300\n"
  11. "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  12. "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  13. "Language-Team: LANGUAGE <LL@li.org>\n"
  14. "Language: \n"
  15. "MIME-Version: 1.0\n"
  16. "Content-Type: text/plain; charset=UTF-8\n"
  17. "Content-Transfer-Encoding: 8bit\n"
  18. #. type: Plain text
  19. msgid ""
  20. "The `template` directive is supplied by the [[!iki plugins/template "
  21. "desc=template]] plugin."
  22. msgstr ""
  23. #. type: Plain text
  24. msgid ""
  25. "The template directive allows wiki pages to be used as templates. These "
  26. "templates can be filled out and inserted into other pages in the wiki using "
  27. "the directive. The [[templates]] page lists templates that can be used with "
  28. "this directive."
  29. msgstr ""
  30. #. type: Plain text
  31. msgid ""
  32. "The directive has an `id` parameter that identifies the template to use. The "
  33. "remaining parameters are used to fill out the template."
  34. msgstr ""
  35. #. type: Title ##
  36. #, no-wrap
  37. msgid "Example"
  38. msgstr ""
  39. #. type: Plain text
  40. #, no-wrap
  41. msgid ""
  42. "\t\\[[!template id=note text=\"\"\"Here is the text to insert into my "
  43. "note.\"\"\"]]\n"
  44. msgstr ""
  45. #. type: Plain text
  46. msgid ""
  47. "This fills out the `note` template, filling in the `text` field with the "
  48. "specified value, and inserts the result into the page."
  49. msgstr ""
  50. #. type: Title ##
  51. #, no-wrap
  52. msgid "Using a template"
  53. msgstr ""
  54. #. type: Plain text
  55. msgid ""
  56. "Generally, a value can include any markup that would be allowed in the wiki "
  57. "page outside the template. Triple-quoting the value even allows quotes to be "
  58. "included in it. Combined with multi-line quoted values, this allows for "
  59. "large chunks of marked up text to be embedded into a template:"
  60. msgstr ""
  61. #. type: Plain text
  62. #, no-wrap
  63. msgid ""
  64. " \\[[!template id=foo name=\"Sally\" color=\"green\" age=8 "
  65. "notes=\"\"\"\n"
  66. msgstr ""
  67. #. type: Bullet: ' * '
  68. msgid "\\[[Charley]]'s sister."
  69. msgstr ""
  70. #. type: Bullet: ' * '
  71. msgid "\"I want to be an astronaut when I grow up.\""
  72. msgstr ""
  73. #. type: Bullet: ' * '
  74. msgid "Really 8 and a half."
  75. msgstr ""
  76. #. type: Title ##
  77. #, no-wrap
  78. msgid "Creating a template"
  79. msgstr ""
  80. #. type: Plain text
  81. msgid ""
  82. "The template is a regular wiki page, located in the `templates/` "
  83. "subdirectory inside the source directory of the wiki."
  84. msgstr ""
  85. #. type: Plain text
  86. msgid ""
  87. "Alternatively, templates can be stored in a directory outside the wiki, as "
  88. "files with the extension \".tmpl\". By default, these are searched for in "
  89. "`/usr/share/ikiwiki/templates`, the `templatedir` setting can be used to "
  90. "make another directory be searched first. When referring to templates "
  91. "outside the wiki source directory, the \"id\" parameter is not interpreted "
  92. "as a pagespec, and you must include the full filename of the template page, "
  93. "including the \".tmpl\" extension. E.g.:"
  94. msgstr ""
  95. #. type: Plain text
  96. #, no-wrap
  97. msgid " \\[[!template id=blogpost.tmpl]]\n"
  98. msgstr ""
  99. #. type: Plain text
  100. msgid ""
  101. "The template uses the syntax used by the [[!cpan HTML::Template]] perl "
  102. "module, which allows for some fairly complex things to be done. Consult its "
  103. "documentation for the full syntax, but all you really need to know are a few "
  104. "things:"
  105. msgstr ""
  106. #. type: Bullet: '* '
  107. msgid ""
  108. "Each parameter you pass to the template directive will generate a template "
  109. "variable. There are also some pre-defined variables like PAGE and BASENAME."
  110. msgstr ""
  111. #. type: Bullet: '* '
  112. msgid ""
  113. "To insert the value of a variable, use `<TMPL_VAR variable>`. Wiki markup in "
  114. "the value will first be converted to html."
  115. msgstr ""
  116. #. type: Bullet: '* '
  117. msgid ""
  118. "To insert the raw value of a variable, with wiki markup not yet converted to "
  119. "html, use `<TMPL_VAR raw_variable>`."
  120. msgstr ""
  121. #. type: Bullet: '* '
  122. msgid ""
  123. "To make a block of text conditional on a variable being set use `<TMPL_IF "
  124. "variable>text</TMPL_IF>`."
  125. msgstr ""
  126. #. type: Bullet: '* '
  127. msgid ""
  128. "To use one block of text if a variable is set and a second if it's not, use "
  129. "`<TMPL_IF variable>text<TMPL_ELSE>other text</TMPL_IF>`"
  130. msgstr ""
  131. #. type: Plain text
  132. msgid "Here's a sample template:"
  133. msgstr ""
  134. #. type: Plain text
  135. #, no-wrap
  136. msgid ""
  137. " <span class=\"infobox\">\n"
  138. " Name: \\[[<TMPL_VAR raw_name>]]<br />\n"
  139. " Age: <TMPL_VAR age><br />\n"
  140. " <TMPL_IF color>\n"
  141. " Favorite color: <TMPL_VAR color><br />\n"
  142. " <TMPL_ELSE>\n"
  143. " No favorite color.<br />\n"
  144. " </TMPL_IF>\n"
  145. " <TMPL_IF notes>\n"
  146. " <hr />\n"
  147. " <TMPL_VAR notes>\n"
  148. " </TMPL_IF>\n"
  149. " </span>\n"
  150. msgstr ""
  151. #. type: Plain text
  152. msgid ""
  153. "The filled out template will be formatted the same as the rest of the page "
  154. "that contains it, so you can include WikiLinks and all other forms of wiki "
  155. "markup in the template. Note though that such WikiLinks will not show up as "
  156. "backlinks to the page that uses the template."
  157. msgstr ""
  158. #. type: Plain text
  159. msgid ""
  160. "Note the use of \"raw_name\" inside the [[ikiwiki/WikiLink]] generator in "
  161. "the example above. This ensures that if the name contains something that "
  162. "might be mistaken for wiki markup, it's not converted to html before being "
  163. "processed as a [[ikiwiki/WikiLink]]."
  164. msgstr ""
  165. #. type: Plain text
  166. #, no-wrap
  167. msgid "[[!meta robots=\"noindex, follow\"]]\n"
  168. msgstr ""