Commits

Andriy Kornatskyy committed d47a680

Localization for wheezy templates

  • Participants
  • Parent commits 3244236

Comments (0)

Files changed (3)

demos/template/content/templates-wheezy/public/about.html

 @extends("shared/master.html")
-@require(path_for)
+@require(_, path_for)
 
 @def title():
-About
+@_('About')
 @end
 
 @def content():
 <div id="about">
-    <h2>About</h2>
+    <h2>@_('About')</h2>
     <p>Proin at lorem vel dolor pharetra aliquam. Phasellus auctor,
     nunc vitae lobortis pretium, mauris ligula sagittis quam, nec
     volutpat est arcu a diam. Nunc nisi augue, sollicitudin eu

demos/template/content/templates-wheezy/public/home.html

 @extends("shared/master.html")
+@require(_)
 
 @def title():
-Home
+@_('Home')
 @end
 
 @def content():
 <div id="welcome">
-    <h2>Welcome!</h2>
+    <h2>@_('Welcome!')</h2>
     <p>
     Lorem ipsum dolor sit amet, consectetur adipiscing elit. \
     Donec quis tempus tellus. Curabitur faucibus fermentum enim, \

demos/template/content/templates-wheezy/shared/master.html

-@require(path_for)
+@require(_, path_for)
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
-        <title>My Site - \
+        <title>@_('My Site') - \
         @def title():
         @end
         @title()</title>
         <div class="page">
             <div id="header">
                 <div id="title">
-                    <h1><a href="@path_for('default')">My Site</a></h1>
+                    <h1><a href="@path_for('default')">@_('My Site')</a></h1>
                 </div>
                 <div id="logindisplay">
                     @inline("shared/snippet/menu-signin.html")
                     @end
                     @content()\
                 </div>
-                <div id="footer">Version @__version__</div>
+                <div id="footer">@_('Version') @__version__</div>
             </div>
         </div>
         @inline("shared/snippet/script.html")