فهرست منبع

HUE-766 [core] Desktop template i18n

Created message bundles for all the templates
Fixed findings of code review
Enrico Berti 13 سال پیش
والد
کامیت
5728384bb7

+ 2 - 0
desktop/core/babel.cfg

@@ -0,0 +1,2 @@
+[python: src/desktop/**.py]
+[mako: src/desktop/templates/**.mako]

+ 228 - 0
desktop/core/src/desktop/locale/django.pot

@@ -0,0 +1,228 @@
+# Translations template for PROJECT.
+# Copyright (C) 2012 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2012-07-09 21:58+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 0.9.6\n"
+
+#: src/desktop/lib/django_util.py:429
+msgid "year"
+msgid_plural "years"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/desktop/lib/django_util.py:430
+msgid "month"
+msgid_plural "months"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/desktop/lib/django_util.py:431
+msgid "week"
+msgid_plural "weeks"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/desktop/lib/django_util.py:432
+msgid "day"
+msgid_plural "days"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/desktop/lib/django_util.py:433
+msgid "hour"
+msgid_plural "hours"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/desktop/lib/django_util.py:434
+msgid "minute"
+msgid_plural "minutes"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/desktop/lib/django_util.py:435
+msgid "second"
+msgid_plural "seconds"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/desktop/lib/django_util.py:456
+msgid "s"
+msgstr ""
+
+#: src/desktop/lib/django_util.py:458
+msgid "seconds"
+msgstr ""
+
+#: src/desktop/lib/django_util.py:464
+#, python-format
+msgid "%(number)d%(type)s"
+msgstr ""
+
+#: src/desktop/lib/django_util.py:466
+#, python-format
+msgid "%(number)d %(type)s"
+msgstr ""
+
+#: src/desktop/lib/django_util.py:473
+#, python-format
+msgid "%(separator)s %(number)d%(type)s"
+msgstr ""
+
+#: src/desktop/lib/django_util.py:475
+#, python-format
+msgid "%(separator)s %(number)d %(type)s"
+msgstr ""
+
+#: src/desktop/templates/404.mako:20
+msgid "Not Found"
+msgstr ""
+
+#: src/desktop/templates/404.mako:23
+msgid "Page not found"
+msgstr ""
+
+#: src/desktop/templates/404.mako:24
+msgid "We're sorry, but the requested page could not be found:"
+msgstr ""
+
+#: src/desktop/templates/500.mako:20 src/desktop/templates/error.mako:21
+msgid "Error"
+msgstr ""
+
+#: src/desktop/templates/500.mako:23
+msgid "Server Error (500)"
+msgstr ""
+
+#: src/desktop/templates/500.mako:24
+msgid ""
+"Sorry, there's been an error. Please contact your site administrators. "
+"Thanks for your patience."
+msgstr ""
+
+#: src/desktop/templates/about_layout.mako:34
+msgid "Configuration"
+msgstr ""
+
+#: src/desktop/templates/about_layout.mako:35
+msgid "Check for misconfiguration"
+msgstr ""
+
+#: src/desktop/templates/about_layout.mako:36
+msgid "Server Logs"
+msgstr ""
+
+#: src/desktop/templates/check_config.mako:22
+#: src/desktop/templates/dump_config.mako:24 src/desktop/templates/logs.mako:24
+msgid "About"
+msgstr ""
+
+#: src/desktop/templates/check_config.mako:27
+#: src/desktop/templates/dump_config.mako:29
+msgid "Configuration files located in"
+msgstr ""
+
+#: src/desktop/templates/check_config.mako:30
+msgid "Potential misconfiguration detected. Please fix and restart HUE."
+msgstr ""
+
+#: src/desktop/templates/check_config.mako:47
+msgid "Current value:"
+msgstr ""
+
+#: src/desktop/templates/check_config.mako:55
+msgid "All ok. Configuration check passed!"
+msgstr ""
+
+#: src/desktop/templates/common_header.mako:91
+msgid "About Hue"
+msgstr ""
+
+#: src/desktop/templates/common_header.mako:98
+msgid "Profile"
+msgstr ""
+
+#: src/desktop/templates/common_header.mako:100
+msgid "Sign Out"
+msgstr ""
+
+#: src/desktop/templates/config_alert_dock.mako:20
+msgid "Misconfiguration detected"
+msgstr ""
+
+#: src/desktop/templates/dump_config.mako:32
+msgid "Installed applications"
+msgstr ""
+
+#: src/desktop/templates/dump_config.mako:39
+msgid "Configuration Sections and Variables"
+msgstr ""
+
+#: src/desktop/templates/dump_config.mako:82
+#: src/desktop/templates/dump_config.mako:94
+msgid "No help available."
+msgstr ""
+
+#: src/desktop/templates/dump_config.mako:95
+msgid "Default:"
+msgstr ""
+
+#: src/desktop/templates/error.mako:24 src/desktop/templates/login.mako:74
+msgid "Error!"
+msgstr ""
+
+#: src/desktop/templates/login.mako:56
+msgid "Username"
+msgstr ""
+
+#: src/desktop/templates/login.mako:59
+msgid "Password"
+msgstr ""
+
+#: src/desktop/templates/login.mako:64
+msgid "Sign up"
+msgstr ""
+
+#: src/desktop/templates/login.mako:66
+msgid "Sign in"
+msgstr ""
+
+#: src/desktop/templates/login.mako:74
+msgid "Invalid username or password."
+msgstr ""
+
+#: src/desktop/templates/login.mako:85
+msgid ""
+"Since this is your first time logging in, please pick any username and "
+"password. Be sure to remember these, as"
+msgstr ""
+
+#: src/desktop/templates/login.mako:86
+msgid "they will become your superuser credentials for Hue"
+msgstr ""
+
+#: src/desktop/templates/logs.mako:27
+msgid "Log entries (most recent first)"
+msgstr ""
+
+#: src/desktop/templates/logs.mako:29
+msgid "Download entire log as zip"
+msgstr ""
+
+#: src/desktop/templates/popup_error.mako:35
+msgid "Go back"
+msgstr ""
+

+ 228 - 0
desktop/core/src/desktop/locale/en_US/LC_MESSAGES/django.po

@@ -0,0 +1,228 @@
+# English (United States) translations for PROJECT.
+# Copyright (C) 2012 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2012-07-09 21:58+0200\n"
+"PO-Revision-Date: 2012-07-09 21:58+0200\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: en_US <LL@li.org>\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 0.9.6\n"
+
+#: src/desktop/lib/django_util.py:429
+msgid "year"
+msgid_plural "years"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/desktop/lib/django_util.py:430
+msgid "month"
+msgid_plural "months"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/desktop/lib/django_util.py:431
+msgid "week"
+msgid_plural "weeks"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/desktop/lib/django_util.py:432
+msgid "day"
+msgid_plural "days"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/desktop/lib/django_util.py:433
+msgid "hour"
+msgid_plural "hours"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/desktop/lib/django_util.py:434
+msgid "minute"
+msgid_plural "minutes"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/desktop/lib/django_util.py:435
+msgid "second"
+msgid_plural "seconds"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/desktop/lib/django_util.py:456
+msgid "s"
+msgstr ""
+
+#: src/desktop/lib/django_util.py:458
+msgid "seconds"
+msgstr ""
+
+#: src/desktop/lib/django_util.py:464
+#, python-format
+msgid "%(number)d%(type)s"
+msgstr ""
+
+#: src/desktop/lib/django_util.py:466
+#, python-format
+msgid "%(number)d %(type)s"
+msgstr ""
+
+#: src/desktop/lib/django_util.py:473
+#, python-format
+msgid "%(separator)s %(number)d%(type)s"
+msgstr ""
+
+#: src/desktop/lib/django_util.py:475
+#, python-format
+msgid "%(separator)s %(number)d %(type)s"
+msgstr ""
+
+#: src/desktop/templates/404.mako:20
+msgid "Not Found"
+msgstr ""
+
+#: src/desktop/templates/404.mako:23
+msgid "Page not found"
+msgstr ""
+
+#: src/desktop/templates/404.mako:24
+msgid "We're sorry, but the requested page could not be found:"
+msgstr ""
+
+#: src/desktop/templates/500.mako:20 src/desktop/templates/error.mako:21
+msgid "Error"
+msgstr ""
+
+#: src/desktop/templates/500.mako:23
+msgid "Server Error (500)"
+msgstr ""
+
+#: src/desktop/templates/500.mako:24
+msgid ""
+"Sorry, there's been an error. Please contact your site administrators. "
+"Thanks for your patience."
+msgstr ""
+
+#: src/desktop/templates/about_layout.mako:34
+msgid "Configuration"
+msgstr ""
+
+#: src/desktop/templates/about_layout.mako:35
+msgid "Check for misconfiguration"
+msgstr ""
+
+#: src/desktop/templates/about_layout.mako:36
+msgid "Server Logs"
+msgstr ""
+
+#: src/desktop/templates/check_config.mako:22
+#: src/desktop/templates/dump_config.mako:24 src/desktop/templates/logs.mako:24
+msgid "About"
+msgstr ""
+
+#: src/desktop/templates/check_config.mako:27
+#: src/desktop/templates/dump_config.mako:29
+msgid "Configuration files located in"
+msgstr ""
+
+#: src/desktop/templates/check_config.mako:30
+msgid "Potential misconfiguration detected. Please fix and restart HUE."
+msgstr ""
+
+#: src/desktop/templates/check_config.mako:47
+msgid "Current value:"
+msgstr ""
+
+#: src/desktop/templates/check_config.mako:55
+msgid "All ok. Configuration check passed!"
+msgstr ""
+
+#: src/desktop/templates/common_header.mako:91
+msgid "About Hue"
+msgstr ""
+
+#: src/desktop/templates/common_header.mako:98
+msgid "Profile"
+msgstr ""
+
+#: src/desktop/templates/common_header.mako:100
+msgid "Sign Out"
+msgstr ""
+
+#: src/desktop/templates/config_alert_dock.mako:20
+msgid "Misconfiguration detected"
+msgstr ""
+
+#: src/desktop/templates/dump_config.mako:32
+msgid "Installed applications"
+msgstr ""
+
+#: src/desktop/templates/dump_config.mako:39
+msgid "Configuration Sections and Variables"
+msgstr ""
+
+#: src/desktop/templates/dump_config.mako:82
+#: src/desktop/templates/dump_config.mako:94
+msgid "No help available."
+msgstr ""
+
+#: src/desktop/templates/dump_config.mako:95
+msgid "Default:"
+msgstr ""
+
+#: src/desktop/templates/error.mako:24 src/desktop/templates/login.mako:74
+msgid "Error!"
+msgstr ""
+
+#: src/desktop/templates/login.mako:56
+msgid "Username"
+msgstr ""
+
+#: src/desktop/templates/login.mako:59
+msgid "Password"
+msgstr ""
+
+#: src/desktop/templates/login.mako:64
+msgid "Sign up"
+msgstr ""
+
+#: src/desktop/templates/login.mako:66
+msgid "Sign in"
+msgstr ""
+
+#: src/desktop/templates/login.mako:74
+msgid "Invalid username or password."
+msgstr ""
+
+#: src/desktop/templates/login.mako:85
+msgid ""
+"Since this is your first time logging in, please pick any username and "
+"password. Be sure to remember these, as"
+msgstr ""
+
+#: src/desktop/templates/login.mako:86
+msgid "they will become your superuser credentials for Hue"
+msgstr ""
+
+#: src/desktop/templates/logs.mako:27
+msgid "Log entries (most recent first)"
+msgstr ""
+
+#: src/desktop/templates/logs.mako:29
+msgid "Download entire log as zip"
+msgstr ""
+
+#: src/desktop/templates/popup_error.mako:35
+msgid "Go back"
+msgstr ""
+

+ 4 - 3
desktop/core/src/desktop/templates/404.mako

@@ -15,12 +15,13 @@
 ## limitations under the License.
 <%!
 from desktop.views import commonheader, commonfooter
+from django.utils.translation import ugettext as _
 %>
-${commonheader("Not Found", "")}
+${commonheader(_('Not Found'), "")}
 
   <div class="container-fluid">
-    <h1>Page not found</h1>
-    <p>We're sorry, but the requested page could not be found:</p>
+    <h1>${_('Page not found')}</h1>
+    <p>${_("We're sorry, but the requested page could not be found:")}</p>
     <br/>
     <code>${uri}</code>
   </div>

+ 4 - 3
desktop/core/src/desktop/templates/500.mako

@@ -15,12 +15,13 @@
 ## limitations under the License.
 <%!
 from desktop.views import commonheader, commonfooter
+from django.utils.translation import ugettext as _
 %>
-${commonheader("Error", "")}
+${commonheader(_('Error'), "")}
 
   <div class="container-fluid">
-    <h1>Server Error (500)</h1>
-    <p>Sorry, there's been an error. Please contact your site administrators. Thanks for your patience.</p>
+    <h1>${_('Server Error (500)')}</h1>
+    <p>${_("Sorry, there's been an error. Please contact your site administrators. Thanks for your patience.")}</p>
   </div>
 
 ${commonfooter()}

+ 5 - 3
desktop/core/src/desktop/templates/about_layout.mako

@@ -18,6 +18,8 @@
 ## no spaces in this method please; we're declaring a CSS class, and ART uses this value for stuff, and it splits on spaces, and
 ## multiple spaces and line breaks cause issues
 <%!
+from django.utils.translation import ugettext as _
+
 def is_selected(section, matcher):
   if section == matcher:
     return "active"
@@ -29,9 +31,9 @@ def is_selected(section, matcher):
 	<div class="subnav subnav-fixed">
 		<div class="container-fluid">
 		<ul class="nav nav-pills">
-			<li class="${is_selected(section, 'dump_config')}"><a href="${url("desktop.views.dump_config")}">Configuration</a></li>
-			<li class="${is_selected(section, 'check_config')}"><a href="${url("desktop.views.check_config")}">Check for misconfiguration</a></li>
-			<li class="${is_selected(section, 'log_view')}"><a href="${url("desktop.views.log_view")}">Server Logs</a></li>
+			<li class="${is_selected(section, 'dump_config')}"><a href="${url("desktop.views.dump_config")}">${_('Configuration')}</a></li>
+			<li class="${is_selected(section, 'check_config')}"><a href="${url("desktop.views.check_config")}">${_('Check for misconfiguration')}</a></li>
+			<li class="${is_selected(section, 'log_view')}"><a href="${url("desktop.views.log_view")}">${_('Server Logs')}</a></li>
 		</ul>
 		</div>
 	</div>

+ 34 - 33
desktop/core/src/desktop/templates/check_config.mako

@@ -16,45 +16,46 @@
 <%!
 from desktop.lib.conf import BoundConfig
 from desktop.views import commonheader, commonfooter
+from django.utils.translation import ugettext as _
 %>
 <%namespace name="layout" file="about_layout.mako" />
-${commonheader("About", "about", "100px")}
+${commonheader(_('About'), "about", "100px")}
 ${layout.menubar(section='check_config')}
 
-	<div class="container-fluid">
+    <div class="container-fluid">
 
-		Configuration files located in <code>${conf_dir}</code>
-		<br/><br/>
-		% if error_list:
-	      <h2>Potential misconfiguration detected. Please fix and restart HUE.</h2>
-		  <br/>
-			<table class="table table-striped">
-	      % for confvar, error in error_list:
-			<tr>
-				<td width="5%">
-					<code>
-		            % if isinstance(confvar, str):
-		              ${confvar | n}
-		            % else:
-		              ${confvar.get_fully_qualifying_key()}
-		            % endif
-		          </code>
-		        </td>
-				<td>
-		          ## Doesn't make sense to print the value of a BoundContainer
-		          % if type(confvar) is BoundConfig:
-		            Current value: <code>${confvar.get()}</code><br/>
-		          % endif
-		          ${error | n}
-	        	</td>
-			</tr>
-	      % endfor
-		</table>
-	    % else:
-	      <h2>All ok. Configuration check passed!</h2>
-	    % endif
+        ${_('Configuration files located in')} <code>${conf_dir}</code>
+        <br/><br/>
+        % if error_list:
+          <h2>${_('Potential misconfiguration detected. Please fix and restart HUE.')}</h2>
+          <br/>
+            <table class="table table-striped">
+          % for confvar, error in error_list:
+            <tr>
+                <td width="5%">
+                    <code>
+                    % if isinstance(confvar, str):
+                      ${confvar | n}
+                    % else:
+                      ${confvar.get_fully_qualifying_key()}
+                    % endif
+                  </code>
+                </td>
+                <td>
+                  ## Doesn't make sense to print the value of a BoundContainer
+                  % if type(confvar) is BoundConfig:
+                    ${_('Current value:')} <code>${confvar.get()}</code><br/>
+                  % endif
+                  ${error | n}
+                </td>
+            </tr>
+          % endfor
+        </table>
+        % else:
+          <h2>${_('All ok. Configuration check passed!')}</h2>
+        % endif
 
-	</div>
+    </div>
 
 
 ${commonfooter()}

+ 4 - 3
desktop/core/src/desktop/templates/common_header.mako

@@ -15,6 +15,7 @@
 ## limitations under the License.
 <%!
 from desktop.lib.i18n import smart_unicode
+from django.utils.translation import ugettext as _
 %>
 
 <!DOCTYPE html>
@@ -88,16 +89,16 @@ from desktop.lib.i18n import smart_unicode
 <div class="navbar navbar-fixed-top">
     <div class="navbar-inner">
       <div class="container-fluid">
-        <a class="brand nav-tooltip" title="About Hue" href="/about">Hue</a>
+        <a class="brand nav-tooltip" title="${_('About Hue')}" href="/about">Hue</a>
         <div id="usernameDropdown" class="btn-group pull-right hide">
           <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
             <i class="icon-user"></i> <span id="username"></span>
             <span class="caret"></span>
           </a>
           <ul class="dropdown-menu">
-            <li><a class="userProfile" href="#">Profile</a></li>
+            <li><a class="userProfile" href="#">${_('Profile')}</a></li>
             <li class="divider"></li>
-            <li><a href="/accounts/logout/">Sign Out</a></li>
+            <li><a href="/accounts/logout/">${_('Sign Out')}</a></li>
           </ul>
         </div>
 

+ 4 - 2
desktop/core/src/desktop/templates/config_alert_dock.mako

@@ -13,9 +13,11 @@
 ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
-
+<%!
+from django.utils.translation import ugettext as _
+%>
 % if error_list:
-  <a href="${url('desktop.views.check_config')}" title="Misconfiguration detected" alt="Misconfiguration detected">
+  <a href="${url('desktop.views.check_config')}" title="${_('Misconfiguration detected')}" alt="${_('Misconfiguration detected')}">
     <img src="/static/art/error.png"/>
   </a>
 % endif

+ 8 - 7
desktop/core/src/desktop/templates/dump_config.mako

@@ -18,24 +18,25 @@
 <%!
 from desktop.lib.conf import BoundContainer, is_anonymous
 from desktop.views import commonheader, commonfooter
+from django.utils.translation import ugettext as _
 %>
 <%namespace name="layout" file="about_layout.mako" />
-${commonheader("About", "about", "100px")}
+${commonheader(_('About'), "about", "100px")}
 ${layout.menubar(section='dump_config')}
 
 	<div class="container-fluid">
 
-		Configuration files located in <code>${conf_dir}</code>
+        ${_('Configuration files located in')} <code>${conf_dir}</code>
 		<br/><br/>
 
-		<h2>Installed applications</h2>
+		<h2>${_('Installed applications')}</h2>
 		<ul>
 		% for app in sorted(apps, key=lambda app: app.name.lower()):
 			<li>${app.name}</li>
 		% endfor
 		</ul>
 
-		<h2>Configuration Sections and Variables</h2>
+		<h2>${_('Configuration Sections and Variables')}</h2>
 
 		<ul class="nav nav-tabs">
 			% for obj in top_level.get().values():
@@ -78,7 +79,7 @@ ${layout.menubar(section='dump_config')}
 			  	<td>
 			 % endif
 			  % if isinstance(config_obj, BoundContainer):
-			    <p class="dump_config_help"><i>${config_obj.config.help or "No help available."}</i></p>
+			    <p class="dump_config_help"><i>${config_obj.config.help or _('No help available.')}</i></p>
 
 			    % for v in config_obj.get().values():
 			<%
@@ -90,8 +91,8 @@ ${layout.menubar(section='dump_config')}
 			    % endfor
 			  % else:
 			    <p>${str(config_obj.get())}</p>
-			    <p class="dump_config_help"><i>${config_obj.config.help or "No help available."}</i></p>
-			    <p class="dump_config_default">Default: <i>${config_obj.config.default}</i></p>
+			    <p class="dump_config_help"><i>${config_obj.config.help or _('No help available.')}</i></p>
+			    <p class="dump_config_default">${_('Default:')} <i>${config_obj.config.default}</i></p>
 			  % endif
 			  </td>
 			</tr>

+ 3 - 2
desktop/core/src/desktop/templates/error.mako

@@ -16,11 +16,12 @@
 <%!
 from desktop.views import commonheader, commonfooter
 from desktop.lib.i18n import smart_unicode
+from django.utils.translation import ugettext as _
 %>
-${commonheader("Error", "")}
+${commonheader(_('Error'), "")}
 
   <div class="container-fluid">
-    <h1>Error!</h1>
+    <h1>${_('Error!')}</h1>
     <pre>${smart_unicode(error) | h }</pre>
 
     %if traceback:

+ 10 - 8
desktop/core/src/desktop/templates/login.mako

@@ -13,6 +13,9 @@
 ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
+<%!
+from django.utils.translation import ugettext as _
+%>
 <!DOCTYPE html>
 <html lang="en">
 <head>
@@ -50,17 +53,17 @@
 		<div class="row">
 			<div class="span4 offset4">
     			<form method="POST" action="${action}" class="well">
-					<label>Username
+					<label>${_('Username')}
 						<input name="username" class="input-large" type="text" maxlength="30">
 					</label>
-					<label>Password
+					<label>${_('Password')}
 						<input name="password" class="input-large" type="password" maxlength="30">
 					</label>
 
 					%if first_login_ever==True:
-						<input type="submit" class="btn primary" value="Sign up" />
+						<input type="submit" class="btn primary" value="${_('Sign up')}" />
 					%else:
-						<input type="submit" class="btn primary" value="Sign in" />
+						<input type="submit" class="btn primary" value="${_('Sign in')}" />
 					%endif
 		    		<input type="hidden" name="next" value="${next}" />
 
@@ -68,7 +71,7 @@
 						<br/>
 						<br/>
 						<div class="alert alert-error">
-							<p><strong>Error!</strong> Invalid username or password.</p>
+							<p><strong>${_('Error!')}</strong> ${_('Invalid username or password.')}</p>
 						</div>
 					%endif
 				</form>
@@ -79,9 +82,8 @@
 		<div class="row">
 			<div class="span6 offset3">
 				<div class="alert alert-block">
-					<p>Since this is your first time logging in,
-				    please pick any username and password. Be sure to remember these, as
-				    <strong>they will become your superuser credentials for Hue</strong>.</p>
+					<p>${_('Since this is your first time logging in, please pick any username and password. Be sure to remember these, as')}
+				     <strong>${_('they will become your superuser credentials for Hue')}</strong>.</p>
 				</div>
 			</div>
 		</div>

+ 4 - 3
desktop/core/src/desktop/templates/logs.mako

@@ -17,15 +17,16 @@
 from desktop.lib.conf import BoundConfig
 from desktop.lib.i18n import smart_unicode
 from desktop.views import commonheader, commonfooter
+from django.utils.translation import ugettext as _
 import re
 %>
 <%namespace name="layout" file="about_layout.mako" />
-${commonheader("About", "about", "100px")}
+${commonheader(_('About'), "about", "100px")}
 ${layout.menubar(section='log_view')}
 	<div class="container-fluid">
-		<h1>Log entries (most recent first)</h1>
+		<h1>${_('Log entries (most recent first)')}</h1>
 
-		<a href="/download_logs">Download entire log as zip</a>
+		<a href="/download_logs">${_('Download entire log as zip')}</a>
 		<hr/>
 		<% log.reverse() %>
 		<pre>

+ 2 - 1
desktop/core/src/desktop/templates/popup_error.mako

@@ -16,6 +16,7 @@
 <%!
 from desktop.views import commonheader, commonfooter
 from desktop.lib.i18n import smart_unicode
+from django.utils.translation import ugettext as _
 %>
 
 ${commonheader(title, "", "60px")}
@@ -31,7 +32,7 @@ ${commonheader(title, "", "60px")}
 
 			<div class="alert-actions">
 				<br/>
-				<a class="btn small" href="javascript:window.history.back(-1)">Go back</a>
+				<a class="btn small" href="javascript:window.history.back(-1)">${_('Go back')}</a>
 			</div>
 		</div>