Source files of fsfe.org, pdfreaders.org, freeyourandroid.org, ilovefs.org, drm.info, and test.fsfe.org. Contribute: https://fsfe.org/contribute/web/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

uk.xsl 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet version="1.0"
  3. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4. xmlns:dt="http://xsltsl.org/date-time">
  5. <xsl:import href="../../tools/xsltsl/tagging.xsl" />
  6. <xsl:import href="../../tools/xsltsl/countries.xsl" />
  7. <xsl:import href="../../tools/xsltsl/translations.xsl" />
  8. <xsl:output method="xml" encoding="UTF-8" indent="yes" />
  9. <!-- To localise this page to a new country, copy this file and change the following:
  10. # <xsl:variable name="country-code">de</xsl:variable> -> change xx to your country code
  11. For more information, take a look at the documentation under
  12. /tools/xsltsl/tagging-documentation.txt
  13. -->
  14. <xsl:variable name="country-code">gb</xsl:variable>
  15. <!--display labels-->
  16. <!--translated word "news"-->
  17. <xsl:template match="news-label">
  18. <xsl:call-template name="gettext">
  19. <xsl:with-param name="id" select="'news'" />
  20. </xsl:call-template>
  21. </xsl:template>
  22. <!--translated word "events"-->
  23. <xsl:template match="events-label">
  24. <xsl:call-template name="gettext">
  25. <xsl:with-param name="id" select="'events'" />
  26. </xsl:call-template>
  27. </xsl:template>
  28. <!--translated word "microblog"-->
  29. <xsl:template match="microblog-label">
  30. <xsl:call-template name="gettext">
  31. <xsl:with-param name="id" select="'microblog'" />
  32. </xsl:call-template>
  33. </xsl:template>
  34. <!--translated word "contact"-->
  35. <xsl:template match="contact-label">
  36. <xsl:call-template name="gettext">
  37. <xsl:with-param name="id" select="'contact'" />
  38. </xsl:call-template>
  39. </xsl:template>
  40. <!--translated word "team"-->
  41. <xsl:template match="team-label">
  42. <xsl:call-template name="gettext">
  43. <xsl:with-param name="id" select="'team'" />
  44. </xsl:call-template>
  45. </xsl:template>
  46. <!--define contact information-->
  47. <xsl:template match="contact-details">
  48. <xsl:for-each select="/html/set/contact">
  49. <xsl:if test="@id = 'GB'">
  50. <!-- Email -->
  51. <xsl:if test="email != ''">
  52. <xsl:element name="p">
  53. <xsl:value-of select="/buildinfo/textset/text[@id='email']" />
  54. <xsl:text> </xsl:text>
  55. <xsl:element name="a">
  56. <xsl:attribute name="href">
  57. <xsl:text>mailto:</xsl:text>
  58. <xsl:value-of select="email" />
  59. </xsl:attribute>
  60. <xsl:value-of select="email" />
  61. </xsl:element>
  62. </xsl:element>
  63. </xsl:if>
  64. <!-- Address -->
  65. <xsl:if test="address != ''">
  66. <xsl:apply-templates select="address"/>
  67. </xsl:if>
  68. <!-- Phone -->
  69. <xsl:if test="phone != ''">
  70. <xsl:element name="p">
  71. <xsl:value-of select="/buildinfo/textset/text[@id='phone']" />
  72. <xsl:text> </xsl:text>
  73. <xsl:value-of select="phone" />
  74. </xsl:element>
  75. </xsl:if>
  76. <!-- Fax -->
  77. <xsl:if test="fax != ''">
  78. <xsl:element name="p">
  79. <xsl:value-of select="/buildinfo/textset/text[@id='fax']" />
  80. <xsl:text> </xsl:text>
  81. <xsl:value-of select="fax" />
  82. </xsl:element>
  83. </xsl:if>
  84. </xsl:if>
  85. </xsl:for-each>
  86. </xsl:template>
  87. <!--define dynamic list of country news items-->
  88. <xsl:template match="country-news">
  89. <xsl:call-template name="fetch-news">
  90. <xsl:with-param name="tag">
  91. <xsl:value-of select="$country-code" />
  92. </xsl:with-param>
  93. <xsl:with-param name="nb-items" select="3" />
  94. </xsl:call-template>
  95. </xsl:template>
  96. <!--define dynamic list of country event items-->
  97. <xsl:template match="country-events">
  98. <!-- Current events -->
  99. <xsl:call-template name="fetch-events">
  100. <xsl:with-param name="wanted-time" select="'present'" />
  101. <xsl:with-param name="tag">
  102. <xsl:value-of select="$country-code" />
  103. </xsl:with-param>
  104. <xsl:with-param name="display-details" select="'yes'" />
  105. </xsl:call-template>
  106. <!-- Future events -->
  107. <xsl:call-template name="fetch-events">
  108. <xsl:with-param name="wanted-time" select="'future'" />
  109. <xsl:with-param name="nb-items" select="3" />
  110. <xsl:with-param name="tag">
  111. <xsl:value-of select="$country-code" />
  112. </xsl:with-param>
  113. <xsl:with-param name="display-details" select="'yes'" />
  114. </xsl:call-template>
  115. </xsl:template>
  116. <!--define dynamic list of country team members-->
  117. <xsl:template match="country-team-list">
  118. <xsl:call-template name="country-people-list">
  119. <xsl:with-param name="team">
  120. <xsl:value-of select="$country-code" />
  121. </xsl:with-param>
  122. </xsl:call-template>
  123. </xsl:template>
  124. <!-- Do not copy <set> or <text> to output at all -->
  125. <xsl:template match="set | tags"/>
  126. <!-- For all other nodes, copy verbatim -->
  127. <xsl:template match="@*|node()" priority="-1">
  128. <xsl:copy>
  129. <xsl:apply-templates select="@*|node()"/>
  130. </xsl:copy>
  131. </xsl:template>
  132. </xsl:stylesheet>