Ver código fonte

[core] Extended _ko to the whole Hue

Enrico Berti 10 anos atrás
pai
commit
ad90949

+ 3 - 3
apps/beeswax/src/beeswax/templates/execute.mako

@@ -15,7 +15,7 @@
 ## limitations under the License.
 <%!
   from desktop.lib.django_util import extract_field_data
-  from desktop.views import commonheader, commonfooter, commonshare
+  from desktop.views import commonheader, commonfooter, commonshare, _ko
   from beeswax import conf as beeswax_conf
   from django.utils.translation import ugettext as _
 
@@ -221,7 +221,7 @@ ${layout.menubar(section='query')}
           % if can_edit_name:
           <h1 class="card-heading simple">
             <a class="share-link" rel="tooltip" data-placement="bottom" style="padding-left:10px; padding-right: 10px" data-bind="click: openShareModal,
-              attr: {'data-original-title': '${ _("Share") } '+name},
+              attr: {'data-original-title': '${ _ko("Share") } '+name},
               css: {'baseShared': true, 'isShared': isShared()}">
               <i class="fa fa-users"></i>
             </a>
@@ -378,7 +378,7 @@ ${layout.menubar(section='query')}
             <table class="table table-striped table-condensed" cellpadding="0" cellspacing="0">
               <tbody data-bind="foreach: $root.design.results.columns">
                 <tr class="columnRow" data-bind="visible: $index() > 0">
-                  <td rel="columntooltip" data-placement="left" data-bind="attr: {title: '${ _("Scroll to the column") }">
+                  <td rel="columntooltip" data-placement="left" data-bind="attr: {title: '${ _ko("Scroll to the column") }">
                     <a href="javascript:void(0)" data-row-selector="true" class="column-selector" data-bind="text: $data.name"></a>
                   </td>
                   <td class="columnType" data-bind="text: $.trim($data.type)"></td>

+ 3 - 3
apps/oozie/src/oozie/templates/dashboard/list_oozie_coordinator.mako

@@ -16,7 +16,7 @@
 ## limitations under the License.
 
 <%!
-  from desktop.views import commonheader, commonfooter
+  from desktop.views import commonheader, commonfooter, _ko
   from django.utils.translation import ugettext as _
   
   from oozie.conf import ENABLE_V2
@@ -244,11 +244,11 @@ ${ layout.menubar(section='coordinators', dashboard=True) }
               <tr data-bind="css: { disabled: url == '' }">
                 <td data-bind="click: handleSelect"><div data-bind="css: { 'fa-check': selected }" class="hueCheckbox fa"></div></td>
                 <td data-bind="css: { disabled: url == '' }">
-                  <a data-bind="attr: {href: url != '' ? url : 'javascript:void(0)', title: url ? '' : '${ _('Workflow not available or instantiated yet') }' }, css: { disabled: url == '' }" data-row-selector="true">
+                  <a data-bind="attr: {href: url != '' ? url : 'javascript:void(0)', title: url ? '' : '${ _ko('Workflow not available or instantiated yet') }' }, css: { disabled: url == '' }" data-row-selector="true">
                     <span data-bind="text: title, attr: {'class': statusClass, 'id': 'date-' + $index()}"></span>
                   </a>
                 </td>
-                <td data-bind="css: { disabled: url == '' }"><em data-bind="visible: (errorMessage == null || errorMessage == '') && (missingDependencies == null || missingDependencies == '') && url == ''">${ _('Workflow not available or instantiated yet') }</em><em data-bind="visible: (errorMessage == null || errorMessage == '') && (missingDependencies == null || missingDependencies == '') && url != ''">${_('-')}</em> <span data-bind="visible: errorMessage != null && errorMessage != '', text: errorMessage"></span> <span data-bind="visible:missingDependencies !='' && missingDependencies != null, text: '${ _('Missing')} ' + missingDependencies"></span></td>
+                <td data-bind="css: { disabled: url == '' }"><em data-bind="visible: (errorMessage == null || errorMessage == '') && (missingDependencies == null || missingDependencies == '') && url == ''">${ _('Workflow not available or instantiated yet') }</em><em data-bind="visible: (errorMessage == null || errorMessage == '') && (missingDependencies == null || missingDependencies == '') && url != ''">${_('-')}</em> <span data-bind="visible: errorMessage != null && errorMessage != '', text: errorMessage"></span> <span data-bind="visible:missingDependencies !='' && missingDependencies != null, text: '${ _ko('Missing')} ' + missingDependencies"></span></td>
               </tr>
             </script>
 

+ 2 - 1
apps/oozie/src/oozie/templates/editor/action_utils.mako

@@ -17,6 +17,7 @@
 <%!
   from django.utils.translation import ugettext as _
   from liboozie.oozie_api import get_oozie
+  from desktop.views import _ko
 %>
 
 <%namespace name="utils" file="../utils.inc.mako" />
@@ -31,7 +32,7 @@
       ${ csrf_token(request) | n,unicode }
       <div class="modal-header">
         <a href="#" class="close">&times;</a>
-        <h3 class="message" data-bind="text: '${_('Edit Node: ')}' + name()"></h3>
+        <h3 class="message" data-bind="text: '${_ko('Edit Node: ')}' + name()"></h3>
       </div>
 
       <div class="modal-content">

+ 4 - 3
apps/oozie/src/oozie/templates/editor/control_utils.mako

@@ -16,6 +16,7 @@
 
 <%!
   from django.utils.translation import ugettext as _
+  from desktop.views import _ko
 %>
 
 <%namespace name="utils" file="../utils.inc.mako" />
@@ -30,7 +31,7 @@
       ${ csrf_token(request) | n,unicode }
       <div class="modal-header">
         <a href="#" class="close" data-dismiss="modal">&times;</a>
-        <h3 class="message" data-bind="text: '${_('Edit Node: ')}' + name()"></h3>
+        <h3 class="message" data-bind="text: '${_ko('Edit Node: ')}' + name()"></h3>
       </div>
 
       <div class="modal-content">
@@ -64,7 +65,7 @@
       ${ csrf_token(request) | n,unicode }
       <div class="modal-header">
         <a href="#" class="close" data-dismiss="modal">&times;</a>
-        <h3 class="message" data-bind="text: '${_('Edit Node: ')}' + name()"></h3>
+        <h3 class="message" data-bind="text: '${_ko('Edit Node: ')}' + name()"></h3>
       </div>
 
       <div class="modal-content">
@@ -104,7 +105,7 @@
       ${ csrf_token(request) | n,unicode }
       <div class="modal-header">
         <a href="#" class="close" data-dismiss="modal">&times;</a>
-        <h3 class="message" data-bind="text: '${_('Edit Node: ')}' + name()"></h3>
+        <h3 class="message" data-bind="text: '${_ko('Edit Node: ')}' + name()"></h3>
       </div>
 
       <div class="modal-content">

+ 3 - 3
apps/oozie/src/oozie/templates/editor2/bundle_editor.mako

@@ -14,7 +14,7 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 <%!
-from desktop.views import commonheader, commonfooter, commonshare
+from desktop.views import commonheader, commonfooter, commonshare, _ko
 from django.utils.translation import ugettext as _
 %>
 
@@ -56,7 +56,7 @@ ${ commonheader(_("Bundle Editor"), "Oozie", user) | n,unicode }
     </a>
 
     <a class="share-link btn" rel="tooltip" data-placement="bottom" data-bind="click: openShareModal,
-        attr: {'data-original-title': '${ _("Share") } ' + name},
+        attr: {'data-original-title': '${ _ko("Share") } ' + name},
         css: {'isShared': isShared(), 'btn': true},
         visible: bundle.id() != null && canEdit()">
       <i class="fa fa-users"></i>
@@ -89,7 +89,7 @@ ${ layout.menubar(section='bundles', is_editor=True, pullright=buttons) }
       <div class="card card-home" style="padding-bottom: 10px">
         <h1 class="card-heading simple" style="border-bottom: none"><span data-bind="editable: $root.bundle.name, editableOptions: {enabled: $root.isEditing(), placement: 'right'}"></span></h1>
         <div class="card-body muted" style="margin-top: 2px" data-bind="visible: $root.isEditing() || (! $root.isEditing() && $root.bundle.properties.description)">
-          <span data-bind="editable: $root.bundle.properties.description, editableOptions: {enabled: $root.isEditing(), placement: 'right', emptytext: '${_('Add a description...')}'}"></span>
+          <span data-bind="editable: $root.bundle.properties.description, editableOptions: {enabled: $root.isEditing(), placement: 'right', emptytext: '${_ko('Add a description...')}'}"></span>
         </div>
       </div>
 

+ 14 - 13
apps/oozie/src/oozie/templates/editor2/common_workflow.mako

@@ -23,6 +23,7 @@
 
 <%!
   from django.utils.translation import ugettext as _
+  from desktop.views import _ko
 %>
 <%namespace name="utils" file="../utils.inc.mako" />
 
@@ -493,7 +494,7 @@
   </h6>
   <ul class="unstyled" data-bind="foreach: properties.parameters">
     <li style="margin-bottom: 3px">
-      <input type="text" class="filechooser-input seventy" data-bind="value: value, filechooser: value, filechooserOptions: globalFilechooserOptions, filechooserPrefixSeparator: '=', hdfsAutocomplete: value, attr: { placeholder: ' ${ _("Fill me up!") }' }, typeahead: { target: value, source: $parent.actionParametersUI, sourceSuffix: '=', triggerOnFocus: true }"  validate="nonempty"/>
+      <input type="text" class="filechooser-input seventy" data-bind="value: value, filechooser: value, filechooserOptions: globalFilechooserOptions, filechooserPrefixSeparator: '=', hdfsAutocomplete: value, attr: { placeholder: ' ${ _ko("Fill me up!") }' }, typeahead: { target: value, source: $parent.actionParametersUI, sourceSuffix: '=', triggerOnFocus: true }"  validate="nonempty"/>
       <span data-bind='template: { name: "param-fs-link", data: {path: value()} }'></span>
       <a href="#" data-bind="click: function(){ $parent.properties.parameters.remove(this); $(document).trigger('drawArrows') }">
         <i class="fa fa-minus"></i>
@@ -549,7 +550,7 @@
 <script type="text/html" id="common-fs-link">
 <!-- ko if: $data.path.length > 0 -->
   <!-- ko if: with_label -->
-    <a data-bind="attr: {href: '/filebrowser/view=' + ($data.path[0] != '/' ? $root.workflow.properties.deployment_dir() + '/' : '') + $data.path , title: '${ _('Open') } '+ $data.path }" target="_blank">
+    <a data-bind="attr: {href: '/filebrowser/view=' + ($data.path[0] != '/' ? $root.workflow.properties.deployment_dir() + '/' : '') + $data.path , title: '${ _ko('Open') } '+ $data.path }" target="_blank">
       <span data-bind="text: $data.path.lastIndexOf('/') == $data.path.length - 1 ? $data.path : $data.path.split('/').pop()"></span>
     </a>
   <!-- /ko -->
@@ -1287,14 +1288,14 @@
 
     <div data-bind="visible: ! $root.isEditing()">
       <span data-bind="template: { name: 'logs-icon' }"></span>
-      <span data-bind="text: '${ _("Delete") }', visible: properties.deletes().length > 0"></span>
+      <span data-bind="text: '${ _ko("Delete") }', visible: properties.deletes().length > 0"></span>
       <ul data-bind="foreach: properties.deletes" class="unstyled">
         <li>
           <span data-bind='template: { name: "common-fs-link", data: {path: value(), with_label: true} }, visible: value().length > 0'></span>
         </li>
       </ul>
 
-      <span data-bind="text: '${ _("Create") }', visible: properties.mkdirs().length > 0 || properties.touchzs().length > 0"></span>
+      <span data-bind="text: '${ _ko("Create") }', visible: properties.mkdirs().length > 0 || properties.touchzs().length > 0"></span>
       <ul data-bind="foreach: properties.mkdirs" class="unstyled">
         <li>
           <span data-bind='template: { name: "common-fs-link", data: {path: value(), with_label: true} }, visible: value().length > 0'></span>
@@ -1306,7 +1307,7 @@
         </li>
       </ul>
 
-      <span data-bind="text: '${ _("Move") }', visible: properties.moves().length > 0"></span>
+      <span data-bind="text: '${ _ko("Move") }', visible: properties.moves().length > 0"></span>
       <ul data-bind="foreach: properties.moves" class="unstyled">
         <li>
           <span data-bind='template: { name: "common-fs-link", data: {path: source(), with_label: true} }, visible: source().length > 0'></span>
@@ -1315,27 +1316,27 @@
         </li>
       </ul>
 
-      <span data-bind="text: '${ _("Change permissions") }', visible: properties.chmods().length > 0"></span>
+      <span data-bind="text: '${ _ko("Change permissions") }', visible: properties.chmods().length > 0"></span>
       <ul data-bind="foreach: properties.chmods" class="unstyled">
         <li>
           <span data-bind='template: { name: "common-fs-link", data: {path: value(), with_label: true} }, visible: value().length > 0'></span>
           ${ _('to') }
           <span data-bind="text: permissions"/>
-          <span data-bind="visible: ! dir_files(), text: '${ _('for directories') }'"/>
-          <span data-bind="visible: dir_files(), text: '${ _('for directories and files') }'"/>
-          <span data-bind="visible: recursive, text: '${ _('recursivelt') }'"/>
+          <span data-bind="visible: ! dir_files(), text: '${ _ko('for directories') }'"/>
+          <span data-bind="visible: dir_files(), text: '${ _ko('for directories and files') }'"/>
+          <span data-bind="visible: recursive, text: '${ _ko('recursively') }'"/>
         </li>
       </ul>
 
-      <span data-bind="text: '${ _("Change groups") }', visible: properties.chgrps().length > 0"></span>
+      <span data-bind="text: '${ _ko("Change groups") }', visible: properties.chgrps().length > 0"></span>
       <ul data-bind="foreach: properties.chgrps" class="unstyled">
         <li>
           <span data-bind='template: { name: "common-fs-link", data: {path: value(), with_label: true} }, visible: value().length > 0'></span>
           ${ _('to') }
           <span data-bind="text: group"/>
-          <span data-bind="visible: ! dir_files(), text: '${ _('for directories') }'"/>
-          <span data-bind="visible: dir_files(), text: '${ _('for directories and files') }'"/>
-          <span data-bind="visible: recursive, text: '${ _('recursively') }'"/>
+          <span data-bind="visible: ! dir_files(), text: '${ _ko('for directories') }'"/>
+          <span data-bind="visible: dir_files(), text: '${ _ko('for directories and files') }'"/>
+          <span data-bind="visible: recursive, text: '${ _ko('recursively') }'"/>
         </li>
       </ul>
     </div>

+ 3 - 3
apps/oozie/src/oozie/templates/editor2/coordinator_editor.mako

@@ -58,7 +58,7 @@ ${ commonheader(_("Coordinator Editor"), "Oozie", user) | n,unicode }
     </a>
 
     <a class="share-link btn" rel="tooltip" data-placement="bottom" data-bind="click: openShareModal,
-        attr: {'data-original-title': '${ _("Share") } ' + name},
+        attr: {'data-original-title': '${ _ko("Share") } ' + name},
         css: {'isShared': isShared(), 'btn': true},
         visible: coordinator.id() != null && canEdit()">
       <i class="fa fa-users"></i>
@@ -469,7 +469,7 @@ ${ layout.menubar(section='coordinators', is_editor=True, pullright=buttons) }
       <input data-bind="value: coordinator.properties.timeout" type="number"/>
 
       <h4>${ _('Concurrency') }</h4>
-      <select data-bind="options: availableSettings, optionsCaption: '${ _("Default") }', value: coordinator.properties.concurrency"></select>
+      <select data-bind="options: availableSettings, optionsCaption: '${ _ko("Default") }', value: coordinator.properties.concurrency"></select>
 
       <h4>${ _('Execution') }</h4>
       <select data-bind="value: coordinator.properties.execution">
@@ -479,7 +479,7 @@ ${ layout.menubar(section='coordinators', is_editor=True, pullright=buttons) }
       </select>
 
       <h4>${ _('Throttle') }</h4>
-      <select data-bind="options: availableSettings, optionsCaption: '${ _("Default") }', value: coordinator.properties.throttle"></select>
+      <select data-bind="options: availableSettings, optionsCaption: '${ _ko("Default") }', value: coordinator.properties.throttle"></select>
 
       <h4>${ _('SLA Configuration') }</h4>
       <div class="sla-form" data-bind="with: $root.coordinator.properties">

+ 2 - 2
apps/oozie/src/oozie/templates/editor2/list_editor_bundles.mako

@@ -15,7 +15,7 @@
 ## limitations under the License.
 
 <%!
-  from desktop.views import commonheader, commonfooter, commonshare, commonimportexport
+  from desktop.views import commonheader, commonfooter, commonshare, commonimportexport, _ko
   from django.utils.translation import ugettext as _
 %>
 <%namespace name="actionbar" file="../actionbar.mako" />
@@ -45,7 +45,7 @@ ${ layout.menubar(section='bundles', is_editor=True) }
         <span style="padding-right:40px"></span>
 
         <a class="share-link btn" rel="tooltip" data-placement="bottom" data-bind="click: function(e){ oneSelected() ? prepareShareModal(e) : void(0) },
-          attr: {'data-original-title': '${ _("Share") } ' + name},
+          attr: {'data-original-title': '${ _ko("Share") } ' + name},
           css: {'disabled': ! oneSelected(), 'btn': true}">
           <i class="fa fa-users"></i> ${ _('Share') }
         </a>

+ 2 - 2
apps/oozie/src/oozie/templates/editor2/list_editor_coordinators.mako

@@ -15,7 +15,7 @@
 ## limitations under the License.
 
 <%!
-  from desktop.views import commonheader, commonfooter, commonshare, commonimportexport
+  from desktop.views import commonheader, commonfooter, commonshare, commonimportexport, _ko
   from django.utils.translation import ugettext as _
 %>
 <%namespace name="actionbar" file="../actionbar.mako" />
@@ -45,7 +45,7 @@ ${ layout.menubar(section='coordinators', is_editor=True) }
         <span style="padding-right:40px"></span>
 
         <a class="share-link btn" rel="tooltip" data-placement="bottom" data-bind="click: function(e){ oneSelected() ? prepareShareModal(e) : void(0) },
-          attr: {'data-original-title': '${ _("Share") } ' + name},
+          attr: {'data-original-title': '${ _ko("Share") } ' + name},
           css: {'disabled': ! oneSelected(), 'btn': true}">
           <i class="fa fa-users"></i> ${ _('Share') }
         </a>

+ 2 - 2
apps/oozie/src/oozie/templates/editor2/list_editor_workflows.mako

@@ -15,7 +15,7 @@
 ## limitations under the License.
 
 <%!
-  from desktop.views import commonheader, commonfooter, commonshare, commonimportexport
+  from desktop.views import commonheader, commonfooter, commonshare, commonimportexport, _ko
   from django.utils.translation import ugettext as _
 %>
 <%namespace name="actionbar" file="../actionbar.mako" />
@@ -46,7 +46,7 @@ ${ layout.menubar(section='workflows', is_editor=True) }
         <span style="padding-right:40px"></span>
 
         <a class="share-link btn" rel="tooltip" data-placement="bottom" data-bind="click: function(e){ oneSelected() ? prepareShareModal(e) : void(0) },
-          attr: {'data-original-title': '${ _("Share") } ' + name},
+          attr: {'data-original-title': '${ _ko("Share") } ' + name},
           css: {'disabled': ! oneSelected(), 'btn': true}">
           <i class="fa fa-users"></i> ${ _('Share') }
         </a>

+ 3 - 3
apps/oozie/src/oozie/templates/editor2/workflow_editor.mako

@@ -14,7 +14,7 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 <%!
-from desktop.views import commonheader, commonfooter, commonshare
+from desktop.views import commonheader, commonfooter, commonshare, _ko
 from desktop import conf
 from django.utils.translation import ugettext as _
 %>
@@ -66,7 +66,7 @@ ${ commonheader(_("Workflow Editor"), "Oozie", user, "40px") | n,unicode }
     </a>
 
     <a class="share-link btn" rel="tooltip" data-placement="bottom" data-bind="click: openShareModal,
-        attr: {'data-original-title': '${ _("Share") } ' + name},
+        attr: {'data-original-title': '${ _ko("Share") } ' + name},
         css: {'isShared': isShared(), 'btn': true},
         visible: workflow.id() != null && canEdit()">
       <i class="fa fa-users"></i>
@@ -218,7 +218,7 @@ ${ layout.menubar(section='workflows', is_editor=True, pullright=buttons) }
       <span data-bind="editable: $root.workflow.name, editableOptions: {enabled: $root.isEditing(), placement: 'right'}"></span>
     </div>
     <div class="object-description" style="text-align: center; margin-top: 10px">
-      <span data-bind="editable: $root.workflow.properties.description, editableOptions: {enabled: $root.isEditing(), placement: 'right', emptytext: '${_('Add a description...')}'}"></span>
+      <span data-bind="editable: $root.workflow.properties.description, editableOptions: {enabled: $root.isEditing(), placement: 'right', emptytext: '${_ko('Add a description...')}'}"></span>
     </div>
     </div>
   </div>

+ 2 - 2
apps/rdbms/src/rdbms/templates/execute.mako

@@ -14,7 +14,7 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 <%!
-  from desktop.views import commonheader, commonfooter, commonshare
+  from desktop.views import commonheader, commonfooter, commonshare, _ko
   from django.utils.translation import ugettext as _
 %>
 
@@ -76,7 +76,7 @@ ${ commonheader(_('Query'), app_name, user) | n,unicode }
                 % if can_edit_name:
 
                   <a class="share-link" rel="tooltip" data-placement="bottom" style="padding-left:10px; padding-right: 10px" data-bind="click: openShareModal,
-                    attr: {'data-original-title': '${ _("Share") } '+name},
+                    attr: {'data-original-title': '${ _ko("Share") } '+name},
                     css: {'baseShared': true, 'isShared': isShared()}">
                     <i class="fa fa-users"></i>
                   </a>

+ 2 - 2
apps/search/src/search/templates/admin_collections.mako

@@ -15,7 +15,7 @@
 ## limitations under the License.
 
 <%!
-  from desktop.views import commonheader, commonfooter, commonshare, commonimportexport
+  from desktop.views import commonheader, commonfooter, commonshare, commonimportexport, _ko
   from django.utils.translation import ugettext as _
 %>
 
@@ -57,7 +57,7 @@ ${ commonheader(_('Search'), "search", user, "29px") | n,unicode }
         </a>
 
         <a class="share-link btn" rel="tooltip" data-placement="bottom" style="margin-left:20px" data-bind="click: function(e){ $root.oneSelected() ? prepareShareModal(e) : void(0) },
-          attr: {'data-original-title': '${ _("Share") } ' + name},
+          attr: {'data-original-title': '${ _ko("Share") } ' + name},
           css: {'disabled': ! $root.oneSelected(), 'btn': true}">
           <i class="fa fa-users"></i> ${ _('Share') }
         </a>

+ 13 - 13
apps/search/src/search/templates/search.mako

@@ -15,7 +15,7 @@
 ## limitations under the License.
 
 <%!
-from desktop.views import commonheader, commonfooter
+from desktop.views import commonheader, commonfooter, _ko
 from desktop import conf
 from django.utils.translation import ugettext as _
 %>
@@ -388,7 +388,7 @@ ${ dashboard.layout_skeleton() }
             <span class="facet-field-label facet-field-label-fixed-width">
               ${ _('Field') }
             </span>
-            <select data-bind="options: $root.collection.template.fieldsNames, value: properties.facets_form.field, optionsCaption: '${ _('Choose...') }'"></select>
+            <select data-bind="options: $root.collection.template.fieldsNames, value: properties.facets_form.field, optionsCaption: '${ _ko('Choose...') }'"></select>
           </span>
         </div>
 
@@ -560,7 +560,7 @@ ${ dashboard.layout_skeleton() }
         </div>
         <div class="fields-list" data-bind="foreach: $root.collection.template.filteredAttributeFields">
           <div style="margin-bottom: 3px; white-space: nowrap">
-            <i class="fa fa-question-circle pull-right muted pointer analysis" data-bind="click: function() { $root.fieldAnalysesName(name()); $root.showFieldAnalysis(); }, attr:{'title': '${ _('Click to analyze field') } ' + name()}"></i>
+            <i class="fa fa-question-circle pull-right muted pointer analysis" data-bind="click: function() { $root.fieldAnalysesName(name()); $root.showFieldAnalysis(); }, attr:{'title': '${ _ko('Click to analyze field') } ' + name()}"></i>
             <input type="checkbox" data-bind="checkedValue: name, checked: $root.collection.template.fieldsSelected" style="margin: 0" />
             <div data-bind="text: name, css:{'field-selector': true, 'hoverable': $root.collection.template.fieldsSelected.indexOf(name()) > -1}, click: highlightColumn" style="margin-right: 10px"></div>
           </div>
@@ -1024,7 +1024,7 @@ ${ dashboard.layout_skeleton() }
           <a data-bind="visible: ko.toJSON(properties.facets_form.field) != '', click: $root.collection.addPivotFacetValue" class="pull-right" href="javascript:void(0)">
             <i class="fa fa-plus"></i> ${ _('Add') }
           </a>
-          <select data-bind="options: $root.collection.template.fieldsNames, value: properties.facets_form.field, optionsCaption: '${ _('Field...') }'" class="hit-options" style="margin-bottom: 0; height: 20px"></select>
+          <select data-bind="options: $root.collection.template.fieldsNames, value: properties.facets_form.field, optionsCaption: '${ _ko('Field...') }'" class="hit-options" style="margin-bottom: 0; height: 20px"></select>
           <div class="clearfix"></div>
         </div>
         <div class="content" style="border: 1px dashed #d8d8d8; border-top: none">
@@ -1268,7 +1268,7 @@ ${ dashboard.layout_skeleton() }
       <!-- ko if: properties.scope() == 'tree' -->
         <div data-bind="partitionChart: {datum: {counts: $parent.counts(), widget_id: $parent.id(), label: $parent.label()},
           fqs: $root.query.fqs,
-          tooltip: '${ _('Click to zoom, double click to select') }',
+          tooltip: '${ _ko('Click to zoom, double click to select') }',
           transformer: partitionChartDataTransformer,
           onStateChange: function(state){ },
           onClick: function(d) {
@@ -1457,13 +1457,13 @@ ${ dashboard.layout_skeleton() }
         <strong>${_('selected')}</strong>
         <span class="label label-info">
           [
-          <span class="label label-info" style="margin-left: 4px" data-bind="text: $data.properties.lat_sw, attr: {'title': '${ _('Latitude South West') }'"></span>
-          <span class="label label-info" style="margin-left: 4px" data-bind="text: $data.properties.lon_sw, attr: {'title': '${ _('Longitude South West') }'"></span>
+          <span class="label label-info" style="margin-left: 4px" data-bind="text: $data.properties.lat_sw, attr: {'title': '${ _ko('Latitude South West') }'"></span>
+          <span class="label label-info" style="margin-left: 4px" data-bind="text: $data.properties.lon_sw, attr: {'title': '${ _ko('Longitude South West') }'"></span>
           ]
           ${ _("TO") }
           [
-          <span class="label label-info" style="margin-left: 4px" data-bind="text: $data.properties.lat_ne, attr: {'title': '${ _('Latitude North East') }'"></span>
-          <span class="label label-info" style="margin-left: 4px" data-bind="text: $data.properties.lon_ne, attr: {'title': '${ _('Longitude North East') }'"></span>
+          <span class="label label-info" style="margin-left: 4px" data-bind="text: $data.properties.lat_ne, attr: {'title': '${ _ko('Latitude North East') }'"></span>
+          <span class="label label-info" style="margin-left: 4px" data-bind="text: $data.properties.lon_ne, attr: {'title': '${ _ko('Longitude North East') }'"></span>
           ]
         </span>
       </div>
@@ -1557,18 +1557,18 @@ ${ dashboard.layout_skeleton() }
   <div class="row-fluid">
     <div data-bind="visible: $root.isEditing" style="margin-top: 10px; margin-bottom: 20px;" class="leaflet-align">
       <span class="facet-field-label">${_('Latitude')}</span><div class="break-on-small-column"></div>
-      <select data-bind="options: $root.collection.template.sortedGeogFieldsNames, value: $root.collection.template.leafletmap.latitudeField, optionsCaption: '${ _('Choose...') }'"></select>
+      <select data-bind="options: $root.collection.template.sortedGeogFieldsNames, value: $root.collection.template.leafletmap.latitudeField, optionsCaption: '${ _ko('Choose...') }'"></select>
       &nbsp;&nbsp;
       <div class="break-on-small-column"></div>
       <span class="facet-field-label">${_('Longitude')}</span><div class="break-on-small-column"></div>
-      <select data-bind="options: $root.collection.template.sortedGeogFieldsNames, value: $root.collection.template.leafletmap.longitudeField, optionsCaption: '${ _('Choose...') }'"></select>
+      <select data-bind="options: $root.collection.template.sortedGeogFieldsNames, value: $root.collection.template.leafletmap.longitudeField, optionsCaption: '${ _ko('Choose...') }'"></select>
       &nbsp;&nbsp;
       <div class="break-on-small-column"></div>
       <span class="facet-field-label">${_('Label')}</span><div class="break-on-small-column"></div>
-      <select data-bind="options: $root.collection.template.fieldsNames, value: $root.collection.template.leafletmap.labelField, optionsCaption: '${ _('Choose...') }'"></select>
+      <select data-bind="options: $root.collection.template.fieldsNames, value: $root.collection.template.leafletmap.labelField, optionsCaption: '${ _ko('Choose...') }'"></select>
     </div>
 
-    <div data-bind="leafletMapChart: {showMoveCheckbox: true, moveCheckboxLabel: '${ _('Search as I move the map') }', visible: $root.hasRetrievedResults() && $root.collection.template.leafletmapOn(), isLoading: isLoading(), datum: {counts: $root.response()},
+    <div data-bind="leafletMapChart: {showMoveCheckbox: true, moveCheckboxLabel: '${ _ko('Search as I move the map') }', visible: $root.hasRetrievedResults() && $root.collection.template.leafletmapOn(), isLoading: isLoading(), datum: {counts: $root.response()},
       transformer: leafletMapChartDataTransformer,
       onRegionChange: function(bounds){ $root.query.selectMapRegionFacet({widget_id: id(), 'bounds': ko.toJS(bounds, null, 2), lat: $root.collection.template.leafletmap.latitudeField(), lon: $root.collection.template.leafletmap.longitudeField()}); },
       onComplete: function(){ var widget = viewModel.getWidgetById(id()); if (widget != null) { widget.isLoading(false)}; } }">

+ 4 - 4
apps/security/src/security/templates/hdfs.mako

@@ -15,7 +15,7 @@
 ## limitations under the License.
 
 <%!
-from desktop.views import commonheader, commonfooter
+from desktop.views import commonheader, commonfooter, _ko
 from django.utils.translation import ugettext as _
 %>
 
@@ -53,11 +53,11 @@ ${ layout.menubar(section='hdfs') }
     </label>
     <div style="margin-left: 6px">
       <div data-bind="visible: type() == 'user'">
-        <select class="user-list-acl" data-bind="options: $root.selectableHadoopUsers, select2: { placeholder: '${ _("Select a user") }', update: name, type: 'user'}" style="width: 200px"></select>
+        <select class="user-list-acl" data-bind="options: $root.selectableHadoopUsers, select2: { placeholder: '${ _ko("Select a user") }', update: name, type: 'user'}" style="width: 200px"></select>
       </div>
 
       <div data-bind="visible: type() == 'group'">
-        <select class="group-list-acl" data-bind="options: $root.selectableHadoopGroups, select2: { placeholder: '${ _("Select a group") }', update: name, type: 'group'}" style="width: 200px"></select>
+        <select class="group-list-acl" data-bind="options: $root.selectableHadoopGroups, select2: { placeholder: '${ _ko("Select a group") }', update: name, type: 'group'}" style="width: 200px"></select>
       </div>
 
       <input type="text" data-bind="value: name, valueUpdate: 'afterkeydown', visible: type() == 'mask' || type() == 'other'" placeholder="${ _('name ...') }" style="width: 180px; margin-bottom: 0px; height: 26px; min-height: 26px"/>
@@ -112,7 +112,7 @@ ${ layout.menubar(section='hdfs') }
                         <li data-bind="visible: $root.assist.isDiffMode(), click: function() { $root.assist.isDiffMode(false); }"><a tabindex="-1" href="#">${ _('Impersonate the user') }</a></li>
                       </ul>
                     </div>
-                    <select class="user-list" data-bind="options: $root.selectableHadoopUsers, select2: { placeholder: '${ _("Select a user") }', update: $root.doAs, type: 'user'}" style="width: 120px"></select>
+                    <select class="user-list" data-bind="options: $root.selectableHadoopUsers, select2: { placeholder: '${ _ko("Select a user") }', update: $root.doAs, type: 'user'}" style="width: 120px"></select>
                     % endif
                   </div>
                   <div>

+ 4 - 4
apps/security/src/security/templates/hive.mako

@@ -15,7 +15,7 @@
 ## limitations under the License.
 
 <%!
-from desktop.views import commonheader, commonfooter
+from desktop.views import commonheader, commonfooter, _ko
 from django.utils.translation import ugettext as _
 %>
 
@@ -189,7 +189,7 @@ ${ layout.menubar(section='hive') }
                         </li>
                       </ul>
                     </div>
-                    <select class="user-list" data-bind="options: $root.selectableHadoopUsers, select2: { placeholder: '${ _("Select a user") }', update: $root.doAs, type: 'user'}" style="width: 120px"></select>
+                    <select class="user-list" data-bind="options: $root.selectableHadoopUsers, select2: { placeholder: '${ _ko("Select a user") }', update: $root.doAs, type: 'user'}" style="width: 120px"></select>
                     % endif
                   </div>
                   <div>
@@ -377,7 +377,7 @@ ${ layout.menubar(section='hive') }
       </div>
       <div class="span6">
         <h4>${ _('Groups') }</h4>
-        <select data-bind="options: $root.selectableHadoopGroups, selectedOptions: groups, select2: { update: groups, type: 'group', placeholder: '${ _("Optional") }' }" size="5" multiple="true" style="width: 360px"></select>
+        <select data-bind="options: $root.selectableHadoopGroups, selectedOptions: groups, select2: { update: groups, type: 'group', placeholder: '${ _ko("Optional") }' }" size="5" multiple="true" style="width: 360px"></select>
       </div>
     </div>
 
@@ -408,7 +408,7 @@ ${ layout.menubar(section='hive') }
 
     <br/>
     <span>${ _('To role') }&nbsp;&nbsp;</span>
-    <select data-bind="options: $root.selectableRoles(), value: $root.grantToPrivilegeRole, select2: { update: $root.grantToPrivilegeRole, placeholder: '${ _("Select a role") }', type: 'role' }" style="width: 360px"></select>
+    <select data-bind="options: $root.selectableRoles(), value: $root.grantToPrivilegeRole, select2: { update: $root.grantToPrivilegeRole, placeholder: '${ _ko("Select a role") }', type: 'role' }" style="width: 360px"></select>
     <br/>
 
   </div>

+ 9 - 8
apps/spark/src/spark/templates/editor_components.mako

@@ -18,6 +18,7 @@
 from desktop import conf
 from desktop.lib.i18n import smart_unicode
 from django.utils.translation import ugettext as _
+from desktop.views import _ko
 %>
 
 <%def name="includes()">
@@ -179,7 +180,7 @@ from django.utils.translation import ugettext as _
   <div class="pull-left" style="padding: 9px">
     <!-- ko foreach: notebooks -->
       <!-- ko if: $root.isEditing() -->
-        <span data-bind="editable: description, editableOptions: {enabled: $root.isEditing(), placement: 'right', emptytext: '${_('Add a description...')}'}" class="muted"></span>
+        <span data-bind="editable: description, editableOptions: {enabled: $root.isEditing(), placement: 'right', emptytext: '${_ko('Add a description...')}'}" class="muted"></span>
       <!-- /ko  -->
       <!-- ko ifnot: $root.isEditing() -->
         <span data-bind="text: description" class="muted"></span>
@@ -443,7 +444,7 @@ from django.utils.translation import ugettext as _
           extraCompleters: completers,
           errors: errors,
           autocompleter: aceAutocomplete,
-          openIt: '${ _("Double click to open it") }',
+          openIt: '${ _ko("Double click to open it") }',
           placeholder: $root.snippetPlaceholders[type()] }"></div>
       </div>
     <div class="clearfix"></div>
@@ -528,7 +529,7 @@ from django.utils.translation import ugettext as _
           <li data-bind="visible: chartType() == ko.HUE_CHARTS.TYPES.PIECHART" class="nav-header">${_('legend')}</li>
         </ul>
         <div data-bind="visible: chartType() != ''">
-          <select data-bind="options: (chartType() == ko.HUE_CHARTS.TYPES.BARCHART || chartType() == ko.HUE_CHARTS.TYPES.PIECHART || chartType() == ko.HUE_CHARTS.TYPES.GRADIENTMAP) ? result.cleanedMeta : result.cleanedNumericMeta, value: chartX, optionsText: 'name', optionsValue: 'name', optionsCaption: '${_('Choose a column...')}', select2: { width: '100%', placeholder: '${ _("Choose a column...") }', update: chartX}" class="input-medium"></select>
+          <select data-bind="options: (chartType() == ko.HUE_CHARTS.TYPES.BARCHART || chartType() == ko.HUE_CHARTS.TYPES.PIECHART || chartType() == ko.HUE_CHARTS.TYPES.GRADIENTMAP) ? result.cleanedMeta : result.cleanedNumericMeta, value: chartX, optionsText: 'name', optionsValue: 'name', optionsCaption: '${_ko('Choose a column...')}', select2: { width: '100%', placeholder: '${ _ko("Choose a column...") }', update: chartX}" class="input-medium"></select>
         </div>
 
         <ul class="nav nav-list" style="border: none; background-color: #FFF" data-bind="visible: chartType() != ''">
@@ -544,28 +545,28 @@ from django.utils.translation import ugettext as _
           </ul>
         </div>
         <div data-bind="visible: chartType() == ko.HUE_CHARTS.TYPES.PIECHART || chartType() == ko.HUE_CHARTS.TYPES.MAP || chartType() == ko.HUE_CHARTS.TYPES.GRADIENTMAP || chartType() == ko.HUE_CHARTS.TYPES.SCATTERCHART">
-          <select data-bind="options: chartType() == ko.HUE_CHARTS.TYPES.GRADIENTMAP ? result.cleanedMeta : result.cleanedNumericMeta, value: chartYSingle, optionsText: 'name', optionsValue: 'name', optionsCaption: '${_('Choose a column...')}', select2: { width: '100%', placeholder: '${ _("Choose a column...") }', update: chartYSingle}" class="input-medium"></select>
+          <select data-bind="options: chartType() == ko.HUE_CHARTS.TYPES.GRADIENTMAP ? result.cleanedMeta : result.cleanedNumericMeta, value: chartYSingle, optionsText: 'name', optionsValue: 'name', optionsCaption: '${_ko('Choose a column...')}', select2: { width: '100%', placeholder: '${ _ko("Choose a column...") }', update: chartYSingle}" class="input-medium"></select>
         </div>
 
         <ul class="nav nav-list" style="border: none; background-color: #FFF" data-bind="visible: chartType() != '' && chartType() == ko.HUE_CHARTS.TYPES.MAP">
           <li class="nav-header">${_('label')}</li>
         </ul>
         <div data-bind="visible: chartType() == ko.HUE_CHARTS.TYPES.MAP">
-          <select data-bind="options: result.cleanedMeta, value: chartMapLabel, optionsText: 'name', optionsValue: 'name', optionsCaption: '${_('Choose a column...')}', select2: { width: '100%', placeholder: '${ _("Choose a column...") }', update: chartMapLabel}" class="input-medium"></select>
+          <select data-bind="options: result.cleanedMeta, value: chartMapLabel, optionsText: 'name', optionsValue: 'name', optionsCaption: '${_ko('Choose a column...')}', select2: { width: '100%', placeholder: '${ _ko("Choose a column...") }', update: chartMapLabel}" class="input-medium"></select>
         </div>
 
         <ul class="nav nav-list" style="border: none; background-color: #FFF" data-bind="visible: chartType() != '' && chartType() == ko.HUE_CHARTS.TYPES.SCATTERCHART">
           <li class="nav-header">${_('scatter group')}</li>
         </ul>
         <div data-bind="visible: chartType() != '' && chartType() == ko.HUE_CHARTS.TYPES.SCATTERCHART">
-          <select data-bind="options: result.cleanedMeta, value: chartScatterGroup, optionsText: 'name', optionsValue: 'name', optionsCaption: '${_('Choose a column...')}', select2: { width: '100%', placeholder: '${ _("Choose a column...") }', update: chartScatterGroup}" class="input-medium"></select>
+          <select data-bind="options: result.cleanedMeta, value: chartScatterGroup, optionsText: 'name', optionsValue: 'name', optionsCaption: '${_ko('Choose a column...')}', select2: { width: '100%', placeholder: '${ _ko("Choose a column...") }', update: chartScatterGroup}" class="input-medium"></select>
         </div>
 
         <ul class="nav nav-list" style="border: none; background-color: #FFF" data-bind="visible: chartType() == ko.HUE_CHARTS.TYPES.SCATTERCHART">
           <li class="nav-header">${_('scatter size')}</li>
         </ul>
         <div data-bind="visible: chartType() == ko.HUE_CHARTS.TYPES.SCATTERCHART">
-          <select data-bind="options: result.cleanedMeta, value: chartScatterSize, optionsText: 'name', optionsValue: 'name', optionsCaption: '${_('Choose a column...')}', select2: { width: '100%', placeholder: '${ _("Choose a column...") }', update: chartScatterSize}" class="input-medium"></select>
+          <select data-bind="options: result.cleanedMeta, value: chartScatterSize, optionsText: 'name', optionsValue: 'name', optionsCaption: '${_ko('Choose a column...')}', select2: { width: '100%', placeholder: '${ _ko("Choose a column...") }', update: chartScatterSize}" class="input-medium"></select>
         </div>
 
         <ul class="nav nav-list" style="border: none; background-color: #FFF" data-bind="visible: chartType() != '' && chartType() != ko.HUE_CHARTS.TYPES.MAP && chartType() != ko.HUE_CHARTS.TYPES.GRADIENTMAP && chartType() != ko.HUE_CHARTS.TYPES.SCATTERCHART">
@@ -827,7 +828,7 @@ from django.utils.translation import ugettext as _
                          optionsText: 'nice_name',
                          optionsValue: 'name',
                          value: selectedSessionProperty,
-                         optionsCaption: '${ _('Choose a property...') }'"></select>
+                         optionsCaption: '${ _ko('Choose a property...') }'"></select>
                 <a class="pointer" style="padding:5px;" data-bind="click: selectedSessionProperty() && function() {
                     properties.push(ko.mapping.fromJS({'name': selectedSessionProperty(), 'value': ''}));
                     selectedSessionProperty('');

+ 2 - 2
apps/spark/src/spark/templates/notebooks.mako

@@ -15,7 +15,7 @@
 ## limitations under the License.
 
 <%!
-  from desktop.views import commonheader, commonfooter, commonshare, commonimportexport
+  from desktop.views import commonheader, commonfooter, commonshare, commonimportexport, _ko
   from django.utils.translation import ugettext as _
 %>
 <%namespace name="actionbar" file="actionbar.mako" />
@@ -44,7 +44,7 @@ ${ commonheader(_("Notebooks"), "spark", user, "60px") | n,unicode }
         </a>
 
         <a class="share-link btn" rel="tooltip" data-placement="bottom" style="margin-left:20px" data-bind="click: function(e){ oneSelected() ? prepareShareModal(e) : void(0) },
-          attr: {'data-original-title': '${ _("Share") } ' + name},
+          attr: {'data-original-title': '${ _ko("Share") } ' + name},
           css: {'disabled': ! oneSelected(), 'btn': true}">
           <i class="fa fa-users"></i> ${ _('Share') }
         </a>

+ 5 - 5
apps/sqoop/src/sqoop/templates/app.mako

@@ -14,7 +14,7 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 <%!
-  from desktop.views import commonheader, commonfooter
+  from desktop.views import commonheader, commonfooter, _ko
   from desktop import conf
   from django.utils.translation import ugettext as _
   from django.core.urlresolvers import reverse
@@ -92,13 +92,13 @@ ${ commonheader(None, "sqoop", user) | n,unicode }
           <li data-bind="routie: 'job/edit/' + id()" title="${ _('Click to edit') }">
             <div class="pull-right">
               <span class="label label-success" data-bind="visible: hasSucceeded">
-                <span data-bind="text: ('${_('Last run: ')}' + submission().createdFormatted())"></span>
+                <span data-bind="text: ('${_ko('Last run: ')}' + submission().createdFormatted())"></span>
               </span>
               <span class="label label-warning" data-bind="visible: isRunning">
                 <span data-bind="text: submission().status"></span>
               </span>
               <span class="label label-error" style="display: inline-block" data-bind="visible: hasFailed">
-                <span data-bind="text: ('${_('Last run: ')}' + submission().createdFormatted())"></span>
+                <span data-bind="text: ('${_ko('Last run: ')}' + submission().createdFormatted())"></span>
               </span>
             </div>
             <div class="main" data-bind="template: {name: 'job-list-item'}"></div>
@@ -532,7 +532,7 @@ ${ commonheader(None, "sqoop", user) | n,unicode }
 <div data-bind="css:{'control-group': id() != null, warning: name() in $root.warnings(), error: name() in $root.errors()}">
   <label class="control-label" data-bind="text: $root.label('driver', name())"></label>
   <div class="controls">
-    <select class="input-xlarge" data-bind="'options': values, 'value': value, 'optionsCaption': '${ _('Choose...') }', 'attr': { 'name': name, 'title': $root.help('driver', name())}" rel="tooltip">
+    <select class="input-xlarge" data-bind="'options': values, 'value': value, 'optionsCaption': '${ _ko('Choose...') }', 'attr': { 'name': name, 'title': $root.help('driver', name())}" rel="tooltip">
     </select>
     <span data-bind="template: {'name': 'job-editor-form-field-error'}" class="help-inline"></span>
   </div>
@@ -629,7 +629,7 @@ ${ commonheader(None, "sqoop", user) | n,unicode }
                 }" class="control-group">
   <label class="control-label" data-bind="text: $root.label('connector', name())" rel="tooltip"></label>
   <div class="controls">
-    <select class="input-xlarge" data-bind="'options': values, 'value': value, 'optionsCaption': '${ _('Choose...') }', attr: { 'name': name, 'title': $root.help('connector', name()) }" rel="tooltip">
+    <select class="input-xlarge" data-bind="'options': values, 'value': value, 'optionsCaption': '${ _ko('Choose...') }', attr: { 'name': name, 'title': $root.help('connector', name()) }" rel="tooltip">
     </select>
     <span data-bind="template: { 'name': 'job-editor-form-field-error' }" class="help-inline"></span>
   </div>

+ 3 - 3
desktop/core/src/desktop/templates/home.mako

@@ -14,7 +14,7 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 <%!
-  from desktop.views import commonheader, commonfooter, commonshare
+  from desktop.views import commonheader, commonfooter, commonshare, _ko
   from django.utils.translation import ugettext as _
 %>
 
@@ -265,7 +265,7 @@ ${ commonheader(_('Welcome Home'), "home", user) | n,unicode }
     <td data-bind="html: description"></td>
     <td data-bind="text: lastModified"></td>
     <td style="text-align: center; white-space: nowrap">
-      <a href="javascript:void(0)" rel="tooltip" data-placement="left" data-bind="click: moveDoc, attr: {'data-original-title': '${ _("Change project for") } '+name}" style="padding-left:8px; padding-right: 8px">
+      <a href="javascript:void(0)" rel="tooltip" data-placement="left" data-bind="click: moveDoc, attr: {'data-original-title': '${ _ko("Change project for") } '+name}" style="padding-left:8px; padding-right: 8px">
         <span data-bind="foreach: tags">
           <!-- ko if: name != 'trash'-->
           <span class="badge" data-bind="html: name"></span>
@@ -274,7 +274,7 @@ ${ commonheader(_('Welcome Home'), "home", user) | n,unicode }
       </a>
     </td>
     <td style="width: 40px; text-align: center">
-      <a class="share-link" rel="tooltip" data-placement="left" style="padding-left:10px; padding-right: 10px" data-bind="click: shareDoc, attr: {'data-original-title': '${ _("Share") } '+name}, visible: isMine , css: {'baseShared': true, 'isShared': perms.read.users.length + perms.read.groups.length + perms.write.users.length + perms.write.groups.length > 0}">
+      <a class="share-link" rel="tooltip" data-placement="left" style="padding-left:10px; padding-right: 10px" data-bind="click: shareDoc, attr: {'data-original-title': '${ _ko("Share") } '+name}, visible: isMine , css: {'baseShared': true, 'isShared': perms.read.users.length + perms.read.groups.length + perms.write.users.length + perms.write.groups.length > 0}">
         <i class="fa fa-users"></i>
       </a>
       <i class="fa fa-ban" style="padding-left:8px; padding-right: 8px" data-bind="visible: !isMine"></i>

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

@@ -18,6 +18,7 @@
 from desktop import conf
 from desktop.lib.i18n import smart_unicode
 from django.utils.translation import ugettext as _
+from desktop.views import _ko
 %>
 
 <%def name="assistPanel()">
@@ -132,7 +133,7 @@ from django.utils.translation import ugettext as _
         </li>
         <!-- ko if: assist.mainObjects().length > 0 -->
         <li>
-          <select data-bind="options: assist.mainObjects, select2: { width: '100%', placeholder: '${ _("Choose a database...") }', update: assist.selectedMainObject}" class="input-medium" data-placeholder="${_('Choose a database...')}"></select>
+          <select data-bind="options: assist.mainObjects, select2: { width: '100%', placeholder: '${ _ko("Choose a database...") }', update: assist.selectedMainObject}" class="input-medium" data-placeholder="${_('Choose a database...')}"></select>
           <div data-bind="visible: Object.keys(assist.firstLevelObjects()).length == 0">${_('The selected database has no tables.')}</div>
         </li>
         <li class="nav-header" style="margin-top:10px;">${_('tables')}