Pārlūkot izejas kodu

[core] Fixing extraction of strings

Romain Rigaux 13 gadi atpakaļ
vecāks
revīzija
17ea854efe

+ 3 - 3
apps/beeswax/src/beeswax/forms.py

@@ -125,9 +125,9 @@ FunctionFormSet = simple_formset_factory(FunctionForm)
 class FileResourceForm(forms.Form):
   type = forms.ChoiceField(required=True,
     choices=[
-      ("JAR", "jar"),
-      ("ARCHIVE", "archive"),
-      ("FILE", "file"),
+      ("JAR", _("jar")),
+      ("ARCHIVE", _("archive")),
+      ("FILE", ("file")),
     ], help_text=_t("Resources to upload with your Hive job." +
        "  Use 'jar' for UDFs.  Use 'file' and 'archive' for "
        "files to be copied and made locally available duirng MAP/TRANSFORM. " +

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

@@ -127,7 +127,7 @@ ${layout.menubar(section='query')}
                                     ${comps.label(f['path'])}
                                     ${comps.field(f['path'], attrs=dict(
                                         placeholder="/user/foo/udf.jar",
-                                        klass="input-small file_resourcesField",
+                                        klass="input-small file_resourcesField span8",
                                         data_filters=f['path'].html_name
                                     ))}
                                 </div>
@@ -154,7 +154,7 @@ ${layout.menubar(section='query')}
                                     <div class="control-group">
                                         ${comps.label(f['name'])}
                                         ${comps.field(f['name'], attrs=dict(
-                                            placeholder="myFunction",
+                                            placeholder=_("myFunction"),
                                             klass="span8 functionsField"
                                         ))}
                                     </div>

+ 14 - 1
apps/beeswax/src/beeswax/templates/list_history.mako

@@ -157,7 +157,20 @@ ${layout.menubar(section='history')}
                 null,
                 null,
                 { "bSortable": false }
-            ]
+            ],
+            "oLanguage": {
+                "sEmptyTable":     "${_('No data available in table')}",
+                "sInfo":           "${_('Showing _START_ to _END_ of _TOTAL_ entries')}",
+                "sInfoEmpty":      "${_('Showing 0 to 0 of 0 entries')}",
+                "sInfoFiltered":   "${_('(filtered from _MAX_ total entries)')}",
+                "sZeroRecords":    "${_('No matching records found')}",
+                "oPaginate": {
+                    "sFirst":    "${_('First')}",
+                    "sLast":     "${_('Last')}",
+                    "sNext":     "${_('Next')}",
+                    "sPrevious": "${_('Previous')}"
+                }
+            }
         });
 
         $("a[data-row-selector='true']").jHueRowSelector();

+ 1 - 1
apps/filebrowser/src/filebrowser/templates/fb_components.mako

@@ -30,7 +30,7 @@ from django.utils.translation import ugettext as _
             <a href="#" class="btn upload-link">${_('Upload files')}</a>
             <a href="#" class="btn create-directory-link">${_('New directory')}</a>
             &nbsp;&nbsp;&nbsp;&nbsp;
-            <input type="text" value="${current_filter}" class="input-medium search-query" placeholder="${_('Search for file name')}">
+            <input type="text" value="${current_filter}" class="input-medium search-query span4" placeholder="${_('Search for file name')}">
             <a href="#" class="btn filter">${_('Search')}</a>
         </p>
         % endif

+ 1 - 1
apps/jobbrowser/src/jobbrowser/templates/jobs.mako

@@ -59,7 +59,7 @@ ${commonheader(_('Job Browser'), "jobbrowser")}
         <input type="text" name="text" title="${_('Text Filter')}" value="${text_filter}" placeholder="${_('Text Filter')}" class="submitter input-medium search-query"/>
     </label>
     <label class="pull-right">
-        ${_('User Name:')}
+        ${_('Username:')}
         <input type="text" name="user" title="${_('User Name Filter')}" value="${user_filter}" placeholder="${_('User Name Filter')}" class="submitter input-medium search-query" />
     </label>
 

+ 28 - 2
apps/oozie/src/oozie/templates/dashboard/list_oozie_coordinators.mako

@@ -168,7 +168,20 @@ ${layout.menubar(section='dashboard')}
         null,
         { "bSortable": false }
       ],
-      "aaSorting": [[ 0, "desc" ]]
+      "aaSorting": [[ 0, "desc" ]],
+      "oLanguage": {
+            "sEmptyTable":     "${_('No data available in table')}",
+            "sInfo":           "${_('Showing _START_ to _END_ of _TOTAL_ entries')}",
+            "sInfoEmpty":      "${_('Showing 0 to 0 of 0 entries')}",
+            "sInfoFiltered":   "${_('(filtered from _MAX_ total entries)')}",
+            "sZeroRecords":    "${_('No matching records found')}",
+            "oPaginate": {
+                "sFirst":    "${_('First')}",
+                "sLast":     "${_('Last')}",
+                "sNext":     "${_('Next')}",
+                "sPrevious": "${_('Previous')}"
+            }
+      }
     });
 
     var completedTable = $('#completed-table').dataTable( {
@@ -184,7 +197,20 @@ ${layout.menubar(section='dashboard')}
         null,
         null
       ],
-      "aaSorting": [[ 0, "desc" ]]
+      "aaSorting": [[ 0, "desc" ]],
+      "oLanguage": {
+            "sEmptyTable":     "${_('No data available in table')}",
+            "sInfo":           "${_('Showing _START_ to _END_ of _TOTAL_ entries')}",
+            "sInfoEmpty":      "${_('Showing 0 to 0 of 0 entries')}",
+            "sInfoFiltered":   "${_('(filtered from _MAX_ total entries)')}",
+            "sZeroRecords":    "${_('No matching records found')}",
+            "oPaginate": {
+                "sFirst":    "${_('First')}",
+                "sLast":     "${_('Last')}",
+                "sNext":     "${_('Next')}",
+                "sPrevious": "${_('Previous')}"
+            }
+      }
     });
 
     $('#filterInput').keydown(function(e) {

+ 28 - 2
apps/oozie/src/oozie/templates/dashboard/list_oozie_workflows.mako

@@ -169,7 +169,20 @@ ${ layout.menubar(section='dashboard') }
             null,
             { "bSortable": false }
         ],
-        "aaSorting": [[ 0, "desc" ]]
+        "aaSorting": [[ 0, "desc" ]],
+        "oLanguage": {
+            "sEmptyTable":     "${_('No data available in table')}",
+            "sInfo":           "${_('Showing _START_ to _END_ of _TOTAL_ entries')}",
+            "sInfoEmpty":      "${_('Showing 0 to 0 of 0 entries')}",
+            "sInfoFiltered":   "${_('(filtered from _MAX_ total entries)')}",
+            "sZeroRecords":    "${_('No matching records found')}",
+            "oPaginate": {
+                "sFirst":    "${_('First')}",
+                "sLast":     "${_('Last')}",
+                "sNext":     "${_('Next')}",
+                "sPrevious": "${_('Previous')}"
+            }
+        }
     });
 
     var completedTable = $('#completed-table').dataTable( {
@@ -185,7 +198,20 @@ ${ layout.menubar(section='dashboard') }
             null,
             null
         ],
-        "aaSorting": [[ 0, "desc" ]]
+        "aaSorting": [[ 0, "desc" ]],
+        "oLanguage": {
+            "sEmptyTable":     "${_('No data available in table')}",
+            "sInfo":           "${_('Showing _START_ to _END_ of _TOTAL_ entries')}",
+            "sInfoEmpty":      "${_('Showing 0 to 0 of 0 entries')}",
+            "sInfoFiltered":   "${_('(filtered from _MAX_ total entries)')}",
+            "sZeroRecords":    "${_('No matching records found')}",
+            "oPaginate": {
+                "sFirst":    "${_('First')}",
+                "sLast":     "${_('Last')}",
+                "sNext":     "${_('Next')}",
+                "sPrevious": "${_('Previous')}"
+            }
+        }
     });
 
     $('#filterInput').keydown(function(e) {

+ 14 - 1
apps/oozie/src/oozie/templates/editor/list_coordinators.mako

@@ -219,7 +219,20 @@ ${ layout.menubar(section='coordinators') }
         { "sType": "date" },
         null
       ],
-      "aaSorting": [[ 4, "desc" ]]
+      "aaSorting": [[ 4, "desc" ]],
+      "oLanguage": {
+            "sEmptyTable":     "${_('No data available in table')}",
+            "sInfo":           "${_('Showing _START_ to _END_ of _TOTAL_ entries')}",
+            "sInfoEmpty":      "${_('Showing 0 to 0 of 0 entries')}",
+            "sInfoFiltered":   "${_('(filtered from _MAX_ total entries)')}",
+            "sZeroRecords":    "${_('No matching records found')}",
+            "oPaginate": {
+                "sFirst":    "${_('First')}",
+                "sLast":     "${_('Last')}",
+                "sNext":     "${_('Next')}",
+                "sPrevious": "${_('Previous')}"
+            }
+        }
     });
 
     $('#filterInput').keydown(function(e) {

+ 18 - 5
apps/oozie/src/oozie/templates/editor/list_history.mako

@@ -78,12 +78,25 @@ ${ layout.menubar(section='history') }
         null,
         null
       ],
-      "aaSorting": [[ 0, "desc" ]]
-        });
+      "aaSorting": [[ 0, "desc" ]],
+      "oLanguage": {
+            "sEmptyTable":     "${_('No data available in table')}",
+            "sInfo":           "${_('Showing _START_ to _END_ of _TOTAL_ entries')}",
+            "sInfoEmpty":      "${_('Showing 0 to 0 of 0 entries')}",
+            "sInfoFiltered":   "${_('(filtered from _MAX_ total entries)')}",
+            "sZeroRecords":    "${_('No matching records found')}",
+            "oPaginate": {
+                "sFirst":    "${_('First')}",
+                "sLast":     "${_('Last')}",
+                "sNext":     "${_('Next')}",
+                "sPrevious": "${_('Previous')}"
+            }
+         }
+      });
 
-        $("#filterInput").keyup(function() {
-            oTable.fnFilter($(this).val());
-        });
+      $("#filterInput").keyup(function() {
+         oTable.fnFilter($(this).val());
+      });
     });
 
   $("a[data-row-selector='true']").jHueRowSelector();

+ 14 - 1
apps/oozie/src/oozie/templates/editor/list_workflows.mako

@@ -229,7 +229,20 @@ ${ layout.menubar(section='workflows') }
         null,
         null
       ],
-      "aaSorting": [[3, 'desc'], [ 1, "asc" ]]
+      "aaSorting": [[3, 'desc'], [ 1, "asc" ]],
+      "oLanguage": {
+        "sEmptyTable":     "${_('No data available in table')}",
+        "sInfo":           "${_('Showing _START_ to _END_ of _TOTAL_ entries')}",
+        "sInfoEmpty":      "${_('Showing 0 to 0 of 0 entries')}",
+        "sInfoFiltered":   "${_('(filtered from _MAX_ total entries)')}",
+        "sZeroRecords":    "${_('No matching records found')}",
+        "oPaginate": {
+            "sFirst":    "${_('First')}",
+            "sLast":     "${_('Last')}",
+            "sNext":     "${_('Next')}",
+            "sPrevious": "${_('Previous')}"
+          }
+      }
     });
 
     $('#filterInput').keydown(function(e) {