Parcourir la source

HUE-761 [fb] Templates Internationalization

Created message bundles for all the templates
Enrico Berti il y a 13 ans
Parent
commit
bcfec10f2f

+ 2 - 0
apps/filebrowser/babel.cfg

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

+ 366 - 0
apps/filebrowser/src/filebrowser/locale/django.pot

@@ -0,0 +1,366 @@
+# 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-02 23:32+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/filebrowser/templates/chmod.mako:32
+msgid "Change Permissions:"
+msgstr ""
+
+#: src/filebrowser/templates/chmod.mako:40
+#: src/filebrowser/templates/chown.mako:71
+#: src/filebrowser/templates/display.mako:77
+#: src/filebrowser/templates/listdir_components.mako:63
+msgid "User"
+msgstr ""
+
+#: src/filebrowser/templates/chmod.mako:41
+#: src/filebrowser/templates/chown.mako:79
+#: src/filebrowser/templates/display.mako:79
+#: src/filebrowser/templates/listdir_components.mako:64
+msgid "Group"
+msgstr ""
+
+#: src/filebrowser/templates/chmod.mako:42
+msgid "Other"
+msgstr ""
+
+#: src/filebrowser/templates/chmod.mako:48
+msgid "Read"
+msgstr ""
+
+#: src/filebrowser/templates/chmod.mako:55
+msgid "Write"
+msgstr ""
+
+#: src/filebrowser/templates/chmod.mako:62
+msgid "Execute"
+msgstr ""
+
+#: src/filebrowser/templates/chmod.mako:72
+#: src/filebrowser/templates/chown.mako:94
+#: src/filebrowser/templates/listdir_components.mako:168
+#: src/filebrowser/templates/listdir_components.mako:209
+#: src/filebrowser/templates/move.mako:40
+msgid "Submit"
+msgstr ""
+
+#: src/filebrowser/templates/chmod.mako:73
+#: src/filebrowser/templates/chown.mako:95
+#: src/filebrowser/templates/edit.mako:82
+#: src/filebrowser/templates/listdir_components.mako:169
+#: src/filebrowser/templates/listdir_components.mako:210
+#: src/filebrowser/templates/listdir_components.mako:298
+#: src/filebrowser/templates/move.mako:41
+#: src/filebrowser/templates/upload.mako:54
+msgid "Cancel"
+msgstr ""
+
+#: src/filebrowser/templates/chown.mako:64
+msgid "Change Owner / Group:"
+msgstr ""
+
+#: src/filebrowser/templates/chown.mako:67
+#, python-format
+msgid ""
+"Note: Only the Hadoop superuser, on this FS \"%(superuser)s\", may change"
+" the owner of a file."
+msgstr ""
+
+#: src/filebrowser/templates/chown.mako:92
+#: src/filebrowser/templates/edit.mako:77
+#: src/filebrowser/templates/listdir_components.mako:164
+#: src/filebrowser/templates/move.mako:38
+msgid "Sorry, name is required."
+msgstr ""
+
+#: src/filebrowser/templates/chown.mako:120
+msgid "Sorry, user is required."
+msgstr ""
+
+#: src/filebrowser/templates/chown.mako:125
+msgid "Sorry, group is required."
+msgstr ""
+
+#: src/filebrowser/templates/chown.mako:131
+msgid "Sorry, you need to specify another group."
+msgstr ""
+
+#: src/filebrowser/templates/chown.mako:137
+msgid "Sorry, you need to specify another user."
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:31
+#: src/filebrowser/templates/edit.mako:29
+#, python-format
+msgid "%(filename)s - File Viewer"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:46
+msgid "Actions"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:48
+msgid "View As Text"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:51
+msgid "View As Binary"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:55
+msgid "Preview As Gzip"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:59
+msgid "Preview As Avro"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:63
+msgid "Stop preview"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:67
+#: src/filebrowser/templates/listdir_components.mako:118
+msgid "Edit File"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:69
+msgid "Download"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:70
+msgid "View File Location"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:71
+msgid "Refresh"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:72
+msgid "Info"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:75
+msgid "Last Modified"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:81
+#: src/filebrowser/templates/listdir_components.mako:62
+msgid "Size"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:83
+msgid "Mode"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:119
+#: src/filebrowser/templates/display.mako:199
+msgid "First Block"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:120
+#: src/filebrowser/templates/display.mako:200
+msgid "Previous Block"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:121
+#: src/filebrowser/templates/display.mako:201
+msgid "Next Block"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:122
+#: src/filebrowser/templates/display.mako:202
+msgid "Last Block"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:126
+msgid "Viewing Bytes:"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:131
+#, python-format
+msgid "(%(length)s B block size)"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:142
+msgid "Warning: some binary data has been masked out with '&#xfffd'."
+msgstr ""
+
+#: src/filebrowser/templates/edit.mako:41
+msgid "View Location"
+msgstr ""
+
+#: src/filebrowser/templates/edit.mako:59
+#: src/filebrowser/templates/edit.mako:81
+msgid "Save"
+msgstr ""
+
+#: src/filebrowser/templates/edit.mako:60
+#: src/filebrowser/templates/edit.mako:69
+msgid "Save As"
+msgstr ""
+
+#: src/filebrowser/templates/edit.mako:73
+msgid "Please enter the location where you'd like to save the file."
+msgstr ""
+
+#: src/filebrowser/templates/fb_components.mako:24
+msgid "Home"
+msgstr ""
+
+#: src/filebrowser/templates/fileop.mako:25
+msgid "File Operation"
+msgstr ""
+
+#: src/filebrowser/templates/listdir.mako:26
+#: src/filebrowser/templates/listdir.mako:28
+msgid "File Browser"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:46
+msgid "Upload files"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:47
+msgid "New directory"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:50
+msgid "Filter: "
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:50
+msgid "Search for file name"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:58
+msgid "Name"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:60
+msgid "Path"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:65
+msgid "Permissions"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:66
+msgid "Date"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:108
+msgid "Options"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:113
+#: src/filebrowser/templates/listdir_components.mako:116
+msgid "Delete"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:114
+msgid "Delete Recursively"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:117
+msgid "View File"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:119
+msgid "Download File"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:121
+msgid "Rename"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:122
+msgid "Change Owner / Group"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:123
+msgid "Change Permissions"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:124
+msgid "Move"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:138
+msgid "Please Confirm"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:141
+msgid "Are you sure you want to delete this file?"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:145
+msgid "Yes"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:146
+msgid "No"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:157
+msgid "Renaming:"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:160
+msgid "New name"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:179
+msgid "Uploading to:"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:185
+msgid "Please enable JavaScript to use file uploader."
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:199
+msgid "Create Directory"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:202
+msgid "Directory Name"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:207
+msgid "Sorry, directory name is required."
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:290
+#: src/filebrowser/templates/upload.mako:46
+msgid "Drop files here to upload"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:291
+#: src/filebrowser/templates/upload.mako:47
+msgid "Upload a file"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:299
+#: src/filebrowser/templates/upload.mako:55
+msgid "Failed"
+msgstr ""
+
+#: src/filebrowser/templates/move.mako:24
+msgid "Move:"
+msgstr ""
+

+ 366 - 0
apps/filebrowser/src/filebrowser/locale/en_US/LC_MESSAGES/django.po

@@ -0,0 +1,366 @@
+# 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-02 23:32+0200\n"
+"PO-Revision-Date: 2012-07-02 23:32+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/filebrowser/templates/chmod.mako:32
+msgid "Change Permissions:"
+msgstr ""
+
+#: src/filebrowser/templates/chmod.mako:40
+#: src/filebrowser/templates/chown.mako:71
+#: src/filebrowser/templates/display.mako:77
+#: src/filebrowser/templates/listdir_components.mako:63
+msgid "User"
+msgstr ""
+
+#: src/filebrowser/templates/chmod.mako:41
+#: src/filebrowser/templates/chown.mako:79
+#: src/filebrowser/templates/display.mako:79
+#: src/filebrowser/templates/listdir_components.mako:64
+msgid "Group"
+msgstr ""
+
+#: src/filebrowser/templates/chmod.mako:42
+msgid "Other"
+msgstr ""
+
+#: src/filebrowser/templates/chmod.mako:48
+msgid "Read"
+msgstr ""
+
+#: src/filebrowser/templates/chmod.mako:55
+msgid "Write"
+msgstr ""
+
+#: src/filebrowser/templates/chmod.mako:62
+msgid "Execute"
+msgstr ""
+
+#: src/filebrowser/templates/chmod.mako:72
+#: src/filebrowser/templates/chown.mako:94
+#: src/filebrowser/templates/listdir_components.mako:168
+#: src/filebrowser/templates/listdir_components.mako:209
+#: src/filebrowser/templates/move.mako:40
+msgid "Submit"
+msgstr ""
+
+#: src/filebrowser/templates/chmod.mako:73
+#: src/filebrowser/templates/chown.mako:95
+#: src/filebrowser/templates/edit.mako:82
+#: src/filebrowser/templates/listdir_components.mako:169
+#: src/filebrowser/templates/listdir_components.mako:210
+#: src/filebrowser/templates/listdir_components.mako:298
+#: src/filebrowser/templates/move.mako:41
+#: src/filebrowser/templates/upload.mako:54
+msgid "Cancel"
+msgstr ""
+
+#: src/filebrowser/templates/chown.mako:64
+msgid "Change Owner / Group:"
+msgstr ""
+
+#: src/filebrowser/templates/chown.mako:67
+#, python-format
+msgid ""
+"Note: Only the Hadoop superuser, on this FS \"%(superuser)s\", may change"
+" the owner of a file."
+msgstr ""
+
+#: src/filebrowser/templates/chown.mako:92
+#: src/filebrowser/templates/edit.mako:77
+#: src/filebrowser/templates/listdir_components.mako:164
+#: src/filebrowser/templates/move.mako:38
+msgid "Sorry, name is required."
+msgstr ""
+
+#: src/filebrowser/templates/chown.mako:120
+msgid "Sorry, user is required."
+msgstr ""
+
+#: src/filebrowser/templates/chown.mako:125
+msgid "Sorry, group is required."
+msgstr ""
+
+#: src/filebrowser/templates/chown.mako:131
+msgid "Sorry, you need to specify another group."
+msgstr ""
+
+#: src/filebrowser/templates/chown.mako:137
+msgid "Sorry, you need to specify another user."
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:31
+#: src/filebrowser/templates/edit.mako:29
+#, python-format
+msgid "%(filename)s - File Viewer"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:46
+msgid "Actions"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:48
+msgid "View As Text"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:51
+msgid "View As Binary"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:55
+msgid "Preview As Gzip"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:59
+msgid "Preview As Avro"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:63
+msgid "Stop preview"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:67
+#: src/filebrowser/templates/listdir_components.mako:118
+msgid "Edit File"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:69
+msgid "Download"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:70
+msgid "View File Location"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:71
+msgid "Refresh"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:72
+msgid "Info"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:75
+msgid "Last Modified"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:81
+#: src/filebrowser/templates/listdir_components.mako:62
+msgid "Size"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:83
+msgid "Mode"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:119
+#: src/filebrowser/templates/display.mako:199
+msgid "First Block"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:120
+#: src/filebrowser/templates/display.mako:200
+msgid "Previous Block"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:121
+#: src/filebrowser/templates/display.mako:201
+msgid "Next Block"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:122
+#: src/filebrowser/templates/display.mako:202
+msgid "Last Block"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:126
+msgid "Viewing Bytes:"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:131
+#, python-format
+msgid "(%(length)s B block size)"
+msgstr ""
+
+#: src/filebrowser/templates/display.mako:142
+msgid "Warning: some binary data has been masked out with '&#xfffd'."
+msgstr ""
+
+#: src/filebrowser/templates/edit.mako:41
+msgid "View Location"
+msgstr ""
+
+#: src/filebrowser/templates/edit.mako:59
+#: src/filebrowser/templates/edit.mako:81
+msgid "Save"
+msgstr ""
+
+#: src/filebrowser/templates/edit.mako:60
+#: src/filebrowser/templates/edit.mako:69
+msgid "Save As"
+msgstr ""
+
+#: src/filebrowser/templates/edit.mako:73
+msgid "Please enter the location where you'd like to save the file."
+msgstr ""
+
+#: src/filebrowser/templates/fb_components.mako:24
+msgid "Home"
+msgstr ""
+
+#: src/filebrowser/templates/fileop.mako:25
+msgid "File Operation"
+msgstr ""
+
+#: src/filebrowser/templates/listdir.mako:26
+#: src/filebrowser/templates/listdir.mako:28
+msgid "File Browser"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:46
+msgid "Upload files"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:47
+msgid "New directory"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:50
+msgid "Filter: "
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:50
+msgid "Search for file name"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:58
+msgid "Name"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:60
+msgid "Path"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:65
+msgid "Permissions"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:66
+msgid "Date"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:108
+msgid "Options"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:113
+#: src/filebrowser/templates/listdir_components.mako:116
+msgid "Delete"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:114
+msgid "Delete Recursively"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:117
+msgid "View File"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:119
+msgid "Download File"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:121
+msgid "Rename"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:122
+msgid "Change Owner / Group"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:123
+msgid "Change Permissions"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:124
+msgid "Move"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:138
+msgid "Please Confirm"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:141
+msgid "Are you sure you want to delete this file?"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:145
+msgid "Yes"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:146
+msgid "No"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:157
+msgid "Renaming:"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:160
+msgid "New name"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:179
+msgid "Uploading to:"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:185
+msgid "Please enable JavaScript to use file uploader."
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:199
+msgid "Create Directory"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:202
+msgid "Directory Name"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:207
+msgid "Sorry, directory name is required."
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:290
+#: src/filebrowser/templates/upload.mako:46
+msgid "Drop files here to upload"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:291
+#: src/filebrowser/templates/upload.mako:47
+msgid "Upload a file"
+msgstr ""
+
+#: src/filebrowser/templates/listdir_components.mako:299
+#: src/filebrowser/templates/upload.mako:55
+msgid "Failed"
+msgstr ""
+
+#: src/filebrowser/templates/move.mako:24
+msgid "Move:"
+msgstr ""
+

+ 13 - 9
apps/filebrowser/src/filebrowser/templates/chmod.mako

@@ -13,6 +13,10 @@
 ## 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 _
+%>
+
 <%namespace name="edit" file="editor_components.mako" />
 <style>
 .table-margin {
@@ -25,7 +29,7 @@
       class="form-inline form-padding-fix">
     <div class="modal-header">
         <a href="#" class="close" data-dismiss="modal">&times;</a>
-        <h3>Change Permissions: ${path}</h3>
+        <h3>${_('Change Permissions:')} ${path}</h3>
     </div>
     <div class="table-margin">
         ${edit.render_field(form["path"], hidden=True)}
@@ -33,29 +37,29 @@
             <thead>
             <tr>
                 <th>&nbsp;</th>
-                <th class="center">User</th>
-                <th class="center">Group</th>
-                <th class="center">Other</th>
+                <th class="center">${_('User')}</th>
+                <th class="center">${_('Group')}</th>
+                <th class="center">${_('Other')}</th>
 				<th width="120">&nbsp</th>
             </tr>
             </thead>
             <tbody>
             <tr>
-                <td><strong>Read</strong></td>
+                <td><strong>${_('Read')}</strong></td>
                 <td class="center">${edit.render_field(form["user_read"], tag="checkbox", button_text=" ", nolabel=True)}</td>
                 <td class="center">${edit.render_field(form["group_read"], tag="checkbox", button_text=" ", nolabel=True)}</td>
                 <td class="center">${edit.render_field(form["other_read"], tag="checkbox", button_text=" ", nolabel=True)}</td>
 				<td>&nbsp;</td>
             </tr>
             <tr>
-                <td><strong>Write</strong></td>
+                <td><strong>${_('Write')}</strong></td>
                 <td class="center">${edit.render_field(form["user_write"], tag="checkbox", button_text=" ", nolabel=True)}</td>
                 <td class="center">${edit.render_field(form["group_write"], tag="checkbox", button_text=" ", nolabel=True)}</td>
                 <td class="center">${edit.render_field(form["other_write"], tag="checkbox", button_text=" ", nolabel=True)}</td>
 				<td>&nbsp;</td>
             </tr>
             <tr>
-                <td><strong>Execute</strong></td>
+                <td><strong>${_('Execute')}</strong></td>
                 <td class="center">${edit.render_field(form["user_execute"], tag="checkbox", button_text=" ", nolabel=True)}</td>
                 <td class="center">${edit.render_field(form["group_execute"], tag="checkbox", button_text=" ", nolabel=True)}</td>
                 <td class="center">${edit.render_field(form["other_execute"], tag="checkbox", button_text=" ", nolabel=True)}</td>
@@ -65,7 +69,7 @@
         </table>
     </div>
     <div class="modal-footer" style="padding-top: 10px;">
-        <input class="btn primary" type="submit" value="Submit"/>
-        <a class="btn" onclick="$('#changePermissionModal').modal('hide');">Cancel</a>
+        <input class="btn primary" type="submit" value="${_('Submit')}"/>
+        <a class="btn" onclick="$('#changePermissionModal').modal('hide');">${_('Cancel')}</a>
     </div>
 </form>

+ 15 - 11
apps/filebrowser/src/filebrowser/templates/chown.mako

@@ -13,6 +13,10 @@
 ## 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 _
+%>
+
 <%namespace name="edit" file="editor_components.mako" />
 <%! from desktop.lib.django_util import extract_field_data %>
 
@@ -57,14 +61,14 @@
 <form id="chownForm" action="/filebrowser/chown?next=${next|u}" method="POST" enctype="multipart/form-data" class="form-stacked form-padding-fix">
     <div class="modal-header">
         <a href="#" class="close" data-dismiss="modal">&times;</a>
-        <h3>Change Owner / Group: ${path}</h3>
+        <h3>${_('Change Owner / Group:')} ${path}</h3>
     </div>
     <div class="modal-body change-owner-modal-body clearfix" >
-        <div class="alert alert-message block-message info">Note: Only the Hadoop superuser, on this FS "${extra_params['superuser']}", may change the owner of a file.</div>
+        <div class="alert alert-message block-message info">${_('Note: Only the Hadoop superuser, on this FS "%(superuser)s", may change the owner of a file.') % dict(superuser=extra_params['superuser'])}"</div>
         <div style="padding-left: 15px; padding-bottom: 10px;">
             ${edit.render_field(form["path"], hidden=True)}
 
-            <label>User</label>
+            <label>${_('User')}</label>
 
             % if is_superuser:
             ${ selection("user", form.all_users, extract_field_data(form["user"]), "user_other") }
@@ -72,7 +76,7 @@
             ${ selection("user", [extract_field_data(form['user'])], extract_field_data(form["user"])) }
             % endif
 
-            <label>Group</label>
+            <label>${_('Group')}</label>
 
             % if is_superuser:
             ${ selection("group", form.all_groups, extract_field_data(form["group"]), "group_other") }
@@ -85,10 +89,10 @@
     </div>
     <div class="modal-footer" style="padding-top: 10px;">
         <div id="chownRequired" class="hide" style="position: absolute; left: 10;">
-            <span class="label label-important">Sorry, name is required.</span>
+            <span class="label label-important">${_('Sorry, name is required.')}</span>
         </div>
-        <input class="btn primary" type="submit" value="Submit" />
-        <a class="btn" onclick="$('#changeOwnerModal').modal('hide');">Cancel</a>
+        <input class="btn primary" type="submit" value="${_('Submit')}" />
+        <a class="btn" onclick="$('#changeOwnerModal').modal('hide');">${_('Cancel')}</a>
     </div>
 </form>
 
@@ -113,24 +117,24 @@
 
         $("#chownForm").submit(function(){
             if ($("select[name='user']").val() == null){
-                $("#chownRequired").find(".label").text("Sorry, user is required.");
+                $("#chownRequired").find(".label").text("${_('Sorry, user is required.')}");
                 $("#chownRequired").show();
                 return false;
             }
             else if ($("select[name='group']").val() == null){
-                $("#chownRequired").find(".label").text("Sorry, group is required.");
+                $("#chownRequired").find(".label").text("${_('Sorry, group is required.')}");
                 $("#chownRequired").show();
                 return false;
             }
             else {
                 if ($("select[name='group']").val() == "__other__" && $("input[name='group_other']").val() == ""){
-                    $("#chownRequired").find(".label").text("Sorry, you need to specify another group.");
+                    $("#chownRequired").find(".label").text("${_('Sorry, you need to specify another group.')}");
                     $("input[name='group_other']").addClass("fieldError");
                     $("#chownRequired").show();
                     return false;
                 }
                 if ($("select[name='user']").val() == "__other__" && $("input[name='user_other']").val() == ""){
-                    $("#chownRequired").find(".label").text("Sorry, you need to specify another user.");
+                    $("#chownRequired").find(".label").text("${_('Sorry, you need to specify another user.')}");
                     $("input[name='user_other']").addClass("fieldError");
                     $("#chownRequired").show();
                     return false;

+ 29 - 28
apps/filebrowser/src/filebrowser/templates/display.mako

@@ -19,6 +19,7 @@
   from django.template.defaultfilters import urlencode, stringformat, date, filesizeformat, time
   from filebrowser.views import truncate
   from desktop.views import commonheader, commonfooter
+  from django.utils.translation import ugettext as _
 %>
 <%
   path_enc = urlencode(path)
@@ -27,7 +28,7 @@
 %>
 <%namespace name="fb_components" file="fb_components.mako" />
 
-${commonheader(truncate(filename)+' :: File Viewer', 'filebrowser')}
+${commonheader(_('%(filename)s - File Viewer') % dict(filename=truncate(filename)), 'filebrowser')}
 
 
 
@@ -42,44 +43,44 @@ ${commonheader(truncate(filename)+' :: File Viewer', 'filebrowser')}
 		<div class="span2">
 			<div class="well sidebar-nav">
 				<ul class="nav nav-list">
-					<li class="nav-header">Actions</li>
+					<li class="nav-header">${_('Actions')}</li>
 					% if view['mode'] == "binary":
-				        <li><a href="${base_url}?offset=${view['offset']}&length=${view['length']}&mode=text&compression=${view['compression']}">View As Text</a></li>
+				        <li><a href="${base_url}?offset=${view['offset']}&length=${view['length']}&mode=text&compression=${view['compression']}">${_('View As Text')}</a></li>
 				      % endif
 					  % if view['mode'] == "text":
-				        <li><a href="${base_url}?offset=${view['offset']}&length=${view['length']}&mode=binary&compression=${view['compression']}">View As Binary</a></li>
+				        <li><a href="${base_url}?offset=${view['offset']}&length=${view['length']}&mode=binary&compression=${view['compression']}">${_('View As Binary')}</a></li>
 				      % endif
 
 				      % if view['compression'] != "gzip" and path.endswith('.gz'):
-				        <li><a href="${base_url}?offset=0&length=2000&mode=${view['mode']}&compression=gzip">Preview As Gzip</a></li>
+				        <li><a href="${base_url}?offset=0&length=2000&mode=${view['mode']}&compression=gzip">${_('Preview As Gzip')}</a></li>
 				      % endif
 
 				      % if view['compression'] != "avro" and path.endswith('.avro'):
-				        <li><a href="${base_url}?offset=0&length=2000&mode=${view['mode']}&compression=avro">Preview As Avro</a></li>
+				        <li><a href="${base_url}?offset=0&length=2000&mode=${view['mode']}&compression=avro">${_('Preview As Avro')}</a></li>
 				      % endif
 
 				      % if view['compression'] and view['compression'] != "none":
-				        <li><a href="${base_url}?offset=0&length=2000&mode=${view['mode']}&compression=none">Stop preview</a></li>
+				        <li><a href="${base_url}?offset=0&length=2000&mode=${view['mode']}&compression=none">${_('Stop preview')}</a></li>
 				      % endif
 
 				      % if editable and view['compression'] == "none":
-				        <li><a href="${url('filebrowser.views.edit', path=path_enc)}">Edit File</a></li>
+				        <li><a href="${url('filebrowser.views.edit', path=path_enc)}">${_('Edit File')}</a></li>
 				      % endif
-				       <li><a href="${url('filebrowser.views.download', path=path_enc)}">Download</a></li>
-				       <li><a href="${url('filebrowser.views.view', path=dirname_enc)}">View File Location</a></li>
-				       <li><a id="refreshBtn">Refresh</a></li>
-					<li class="nav-header">Info</li>
+				       <li><a href="${url('filebrowser.views.download', path=path_enc)}">${_('Download')}</a></li>
+				       <li><a href="${url('filebrowser.views.view', path=dirname_enc)}">${_('View File Location')}</a></li>
+				       <li><a id="refreshBtn">${_('Refresh')}</a></li>
+					<li class="nav-header">${_('Info')}</li>
 					<li>
 						<dl>
-							<dt>Last Modified</dt>
+							<dt>${_('Last Modified')}</dt>
 				        	<dd>${date(datetime.datetime.fromtimestamp(stats['mtime']))} ${time(datetime.datetime.fromtimestamp(stats['mtime']))}</dd>
-				        	<dt>User</dt>
+				        	<dt>${_('User')}</dt>
 				        	<dd>${stats['user']}</dd>
-				        	<dt>Group</dt>
+				        	<dt>${_('Group')}</dt>
 				        	<dd>${stats['group']}</dd>
-				        	<dt>Size</dt>
+				        	<dt>${_('Size')}</dt>
 				        	<dd>${stats['size']|filesizeformat}</dd>
-				        	<dt>Mode</dt>
+				        	<dt>${_('Mode')}</dt>
 				        	<dd>${stringformat(stats['mode'], "o")}</dd>
 						</dl>
 					</li>
@@ -115,19 +116,19 @@ ${commonheader(truncate(filename)+' :: File Viewer', 'filebrowser')}
 			        %>
 			        ###DEFINE REL
 			        <ul>
-			            <li class="${first_class}"><a ${first_href}>First Block</a></li>
-			            <li class="${prev_class}"><a ${prev_href}>Previous Block</a></li>
-			            <li class="${next_class}"><a ${next_href}>Next Block</a></li>
-			            <li class="${last_class}"><a ${last_href}>Last Block</a></li>
+			            <li class="${first_class}"><a ${first_href}>${_('First Block')}</a></li>
+			            <li class="${prev_class}"><a ${prev_href}>${_('Previous Block')}</a></li>
+			            <li class="${next_class}"><a ${next_href}>${_('Next Block')}</a></li>
+			            <li class="${last_class}"><a ${last_href}>${_('Last Block')}</a></li>
 			        </ul>
 
 					<form action="${url('filebrowser.views.view', path=path_enc)}" method="GET" class="form-inline pull-right">
-						<span>Viewing Bytes:</span>
+						<span>${_('Viewing Bytes:')}</span>
 						<input type="text" name="begin" value="${view['offset'] + 1}" class="input-mini" />
 						-
 						<input type="text" value="${view['end']}" name="end" class="input-mini" /> of
 						<span>${stats['size']}</span>
-						<span>(${view['length']} B block size)</span>
+						<span>${_('(%(length)s B block size)' % dict(length=view['length']))}</span>
 						% if view['mode']:
 							<input type="hidden" name="mode" value="${view['mode']}"/>
 						% endif
@@ -138,7 +139,7 @@ ${commonheader(truncate(filename)+' :: File Viewer', 'filebrowser')}
 			    % endif
 			%if 'contents' in view:
 		      % if view['masked_binary_data']:
-		      <div class="alert-message warning">Warning: some binary data has been masked out with '&#xfffd'.</div>
+		      <div class="alert-message warning">${_("Warning: some binary data has been masked out with '&#xfffd'.")}</div>
 		      % endif
 		    % endif
 		      <div>
@@ -195,10 +196,10 @@ ${commonheader(truncate(filename)+' :: File Viewer', 'filebrowser')}
 			        %>
 			        ###DEFINE REL
 			        <ul>
-			            <li class="${first_class}"><a ${first_href}>First Block</a></li>
-			            <li class="${prev_class}"><a ${prev_href}>Previous Block</a></li>
-			            <li class="${next_class}"><a ${next_href}>Next Block</a></li>
-			            <li class="${last_class}"><a ${last_href}>Last Block</a></li>
+			            <li class="${first_class}"><a ${first_href}>${_('First Block')}</a></li>
+			            <li class="${prev_class}"><a ${prev_href}>${_('Previous Block')}</a></li>
+			            <li class="${next_class}"><a ${next_href}>${_('Next Block')}</a></li>
+			            <li class="${last_class}"><a ${last_href}>${_('Last Block')}</a></li>
 			        </ul>
 			      </div>
 			    % endif

+ 11 - 10
apps/filebrowser/src/filebrowser/templates/edit.mako

@@ -18,6 +18,7 @@
   from django.template.defaultfilters import urlencode
   from filebrowser.views import truncate
   from desktop.views import commonheader, commonfooter
+  from django.utils.translation import ugettext as _
 %>
 <%
   path_enc = urlencode(path)
@@ -25,7 +26,7 @@
 %>
 <%namespace name="fb_components" file="fb_components.mako" />
 
-${commonheader(truncate(filename)+':: File Viewer', 'filebrowser')}
+${commonheader(_('%(filename)s - File Viewer') % dict(filename=truncate(filename)), 'filebrowser')}
 
 <div class="container-fluid">
 	% if breadcrumbs:
@@ -37,7 +38,7 @@ ${commonheader(truncate(filename)+':: File Viewer', 'filebrowser')}
 <div class="well" >
     <form class="form-stacked" method="post" action="${url('filebrowser.views.save_file')}">
     <div class="toolbar">
-		<a class="btn" href="${url('filebrowser.views.view', path=dirname_enc)}">View Location</a>
+		<a class="btn" href="${url('filebrowser.views.view', path=dirname_enc)}">${_('View Location')}</a>
 	</div>
 	<br/>
 
@@ -55,8 +56,8 @@ ${commonheader(truncate(filename)+':: File Viewer', 'filebrowser')}
 
         <div style="width: 100%; height: 100%;">${edit.render_field(form["contents"], tag="textarea", notitle=True, attrs=dict(
           style="width:100%; height:400px;")) | n}</div>
-        <input class="btn primary" type="submit" name="save" value="Save">
-        <a id="saveAsBtn" class="btn">Save As</a>
+        <input class="btn primary" type="submit" name="save" value="${_('Save')}">
+        <a id="saveAsBtn" class="btn">${_('Save As')}</a>
     </form>
 </div>
 
@@ -64,21 +65,21 @@ ${commonheader(truncate(filename)+':: File Viewer', 'filebrowser')}
 <div id="saveAsModal" class="modal hide fade">
     <form id="saveAsForm" action="${url('filebrowser.views.save_file')}" method="POST" class="form-stacked form-padding-fix">
     <div class="modal-header">
-        <a href="#" class="close">&times;</a>
-        <h3>Save As</h3>
+        <a href="#" class="close" data-dismiss="modal">&times;</a>
+        <h3>${_('Save As')}</h3>
     </div>
     <div class="modal-body">
 		${edit.render_field(form["path"], notitle=True, klass="xlarge")}
-		<span class="help-block">Please enter the location where you'd like to save the file.</span>
+		<span class="help-block">${_("Please enter the location where you'd like to save the file.")}</span>
     </div>
     <div class="modal-footer">
         <div id="saveAsNameRequiredAlert" class="alert-message error hide" style="position: absolute; left: 10;">
-            <p><strong>Sorry, name is required.</strong>
+            <p><strong>${_('Sorry, name is required.')}</strong>
         </div>
 		${edit.render_field(form["contents"], hidden=True)}
 		${edit.render_field(form["encoding"], hidden=True)}
-        <input type="submit" value="Save" class="btn primary" />
-        <a id="cancelSaveAsBtn" class="btn">Cancel</a>
+        <input type="submit" value="${_('Save')}" class="btn primary" />
+        <a id="cancelSaveAsBtn" class="btn">${_('Cancel')}</a>
     </div>
     </form>
 </div>

+ 2 - 14
apps/filebrowser/src/filebrowser/templates/fb_components.mako

@@ -15,25 +15,13 @@
 ## limitations under the License.
 <%!
 from django.template.defaultfilters import urlencode
+from django.utils.translation import ugettext as _
 %>
 
-<%def name="footer()">
-      <div class="fb-uploader hide">
-        <a class="fb-cancel-upload">Close</a>
-        <ul class="fb-upload-list"></ul>
-
-        <div class="fb-noflash">If you are experiencing flash errors due to uploading,
-          you can <a target="hue_upload" href="${ url('filebrowser.views.upload') }">upload without flash</a>.
-        </div>
-      </div>
-    </body>
-  </html>
-</%def>
-
 <%def name="breadcrumbs(path, breadcrumbs)">
     <div class="subnav">
         <ul class="nav nav-pills">
-          <li><a href="${url('filebrowser.views.view', path=urlencode(path))}?default_to_home"><i class="icon-home"></i>Home</a></li>
+          <li><a href="${url('filebrowser.views.view', path=urlencode(path))}?default_to_home"><i class="icon-home"></i>${_('Home')}</a></li>
           <li>
             <ul class="hueBreadcrumb">
                 % for breadcrumb_item in breadcrumbs:

+ 4 - 3
apps/filebrowser/src/filebrowser/templates/fileop.mako

@@ -17,11 +17,12 @@
 import datetime
 from django.template.defaultfilters import urlencode, escape, stringformat, date, filesizeformat, time
 from desktop.views import commonheader, commonfooter
+from django.utils.translation import ugettext as _
 %>
 
 
 
-${commonheader('File Operation', 'filebrowser')}
+${commonheader(_('File Operation'), 'filebrowser')}
 
 ## Not sure if enctype breaks anything if used for things other than file upload.
 
@@ -31,8 +32,8 @@ ${commonheader('File Operation', 'filebrowser')}
 <h1>${form.op}</h1>
 ${form.as_p()|n}
 <div>
-<input type="submit" value="Submit" class="btn primary" />
-<a href="${urlencode(next)}" class="btn">Cancel</a>
+<input type="submit" value="${('Submit')}" class="btn primary" />
+<a href="${urlencode(next)}" class="btn">${('Cancel')}</a>
 </div>
 </form>
 </div>

+ 3 - 2
apps/filebrowser/src/filebrowser/templates/listdir.mako

@@ -17,14 +17,15 @@
 import datetime
 from django.template.defaultfilters import urlencode, stringformat, filesizeformat, date, time, escape
 from desktop.views import commonheader, commonfooter
+from django.utils.translation import ugettext as _
 %>
 
 <%namespace name="dir" file="listdir_components.mako" />
 <%namespace name="fb_components" file="fb_components.mako" />
 
-${commonheader('File Browser', 'filebrowser')}
+${commonheader(_('File Browser'), 'filebrowser')}
 <div class="container-fluid">
-	<h1>File Browser</h1>
+	<h1>${_('File Browser')}</h1>
 	% if breadcrumbs:
         ${fb_components.breadcrumbs(path, breadcrumbs)}
 	%endif

+ 50 - 37
apps/filebrowser/src/filebrowser/templates/listdir_components.mako

@@ -19,6 +19,7 @@ import md5
 from django.template.defaultfilters import urlencode, stringformat, filesizeformat, date, time, escape
 from desktop.lib.django_util import reverse_with_get
 from django.utils.encoding import smart_str
+from django.utils.translation import ugettext as _
 %>
 
 
@@ -42,11 +43,11 @@ from django.utils.encoding import smart_str
     </style>
     <div class="well hueWell">
         <p class="pull-right">
-            <a href="#" class="btn upload-link">Upload files</a>
-            <a href="#" class="btn create-directory-link">New directory</a>
+            <a href="#" class="btn upload-link">${_('Upload files')}</a>
+            <a href="#" class="btn create-directory-link">${_('New directory')}</a>
         </p>
         <form class="form-search">
-            Filter: <input id="filterInput" class="input-xlarge search-query" placeholder="Search for file name">
+            ${_('Filter: ')}<input id="filterInput" class="input-xlarge search-query" placeholder="${_('Search for file name')}">
         </form>
     </div>
 
@@ -54,15 +55,15 @@ from django.utils.encoding import smart_str
         <thead>
             <tr>
             % if cwd_set:
-                <th>Name</th>
+                <th>${_('Name')}</th>
             % else:
-                <th>Path</th>
+                <th>${_('Path')}</th>
             % endif
-                <th>Size</th>
-                <th>User</th>
-                <th>Group</th>
-                <th>Permissions</th>
-                <th>Date</th>
+                <th>${_('Size')}</th>
+                <th>${_('User')}</th>
+                <th>${_('Group')}</th>
+                <th>${_('Permissions')}</th>
+                <th>${_('Date')}</th>
                 <th>&nbsp;</th>
             </tr>
         </thead>
@@ -104,23 +105,23 @@ from django.utils.encoding import smart_str
                     %>
                     <div class="btn-group">
                         <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
-                            Options
+                            ${_('Options')}
                             <span class="caret"></span>
                         </a>
                         <ul class="dropdown-menu">
                             % if "dir" == file['type']:
-                            <li><a class="delete" delete-type="rmdir" file-to-delete="${path}" data-backdrop="static" data-keyboard="true">Delete</a></li>
-                            <li><a class="delete" delete-type="rmtree" file-to-delete="${path}" data-backdrop="static" data-keyboard="true">Delete Recursively</a></li>
+                            <li><a class="delete" delete-type="rmdir" file-to-delete="${path}" data-backdrop="static" data-keyboard="true">${_('Delete')}</a></li>
+                            <li><a class="delete" delete-type="rmtree" file-to-delete="${path}" data-backdrop="static" data-keyboard="true">${_('Delete Recursively')}</a></li>
                             % else:
-                            <li><a class="delete" delete-type="remove" file-to-delete="${path}" data-backdrop="static" data-keyboard="true">Delete</a></li>
-                            <li><a href="${url('filebrowser.views.view', path=urlencode(path))}">View File</a></li>
-                            <li><a href="${url('filebrowser.views.edit', path=urlencode(path))}">Edit File</a></li>
-                            <li><a href="${url('filebrowser.views.download', path=urlencode(path))}" target="_blank">Download File</a></li>
+                            <li><a class="delete" delete-type="remove" file-to-delete="${path}" data-backdrop="static" data-keyboard="true">${_('Delete')}</a></li>
+                            <li><a href="${url('filebrowser.views.view', path=urlencode(path))}">${_('View File')}</a></li>
+                            <li><a href="${url('filebrowser.views.edit', path=urlencode(path))}">${_('Edit File')}</a></li>
+                            <li><a href="${url('filebrowser.views.download', path=urlencode(path))}" target="_blank">${_('Download File')}</a></li>
                             % endif
-                            <li><a class="rename" file-to-rename="${path}">Rename</a></li>
-                            <li><a onclick="openChownWindow('${path}','${file['stats']['user']}','${file['stats']['group']}','${current_request_path}')">Change Owner / Group</a></li>
-                            <li><a onclick="openChmodWindow('${path}','${stringformat(file['stats']['mode'], "o")}','${current_request_path}')">Change Permissions</a></li>
-                            <li><a onclick="openMoveModal('${path}','${stringformat(file['stats']['mode'], "o")}', '${current_request_path}')">Move</a></li>
+                            <li><a class="rename" file-to-rename="${path}">${_('Rename')}</a></li>
+                            <li><a onclick="openChownWindow('${path}','${file['stats']['user']}','${file['stats']['group']}','${current_request_path}')">${_('Change Owner / Group')}</a></li>
+                            <li><a onclick="openChmodWindow('${path}','${stringformat(file['stats']['mode'], "o")}','${current_request_path}')">${_('Change Permissions')}</a></li>
+                            <li><a onclick="openMoveModal('${path}','${stringformat(file['stats']['mode'], "o")}', '${current_request_path}')">${_('Move')}</a></li>
                         </ul>
                     </div>
                     % endif
@@ -134,15 +135,15 @@ from django.utils.encoding import smart_str
 <div id="deleteModal" class="modal hide fade">
     <div class="modal-header">
         <a href="#" class="close" data-dismiss="modal">&times;</a>
-        <h3>Please Confirm</h3>
+        <h3>${_('Please Confirm')}</h3>
     </div>
     <div class="modal-body">
-        <p>Are you sure you want to delete this file?</p>
+        <p>${_('Are you sure you want to delete this file?')}</p>
     </div>
     <div class="modal-footer">
         <form id="deleteForm" action="" method="POST" enctype="multipart/form-data" class="form-stacked">
-            <input type="submit" value="Yes" class="btn primary" />
-            <a id="cancelDeleteBtn" class="btn">No</a>
+            <input type="submit" value="${_('Yes')}" class="btn primary" />
+            <a id="cancelDeleteBtn" class="btn">${_('No')}</a>
             <input id="fileToDeleteInput" type="hidden" name="path" />
         </form>
     </div>
@@ -153,19 +154,19 @@ from django.utils.encoding import smart_str
     <form id="renameForm" action="/filebrowser/rename?next=${current_request_path}" method="POST" enctype="multipart/form-data" class="form-inline form-padding-fix">
     <div class="modal-header">
         <a href="#" class="close" data-dismiss="modal">&times;</a>
-        <h3>Renaming: <span id="renameFileName">file name</span></h3>
+        <h3>${_('Renaming:')} <span id="renameFileName">file name</span></h3>
     </div>
     <div class="modal-body">
-        <label>New name <input id="newNameInput" name="dest_path" value="" type="text" class="input-xlarge"/></label>
+        <label>${_('New name')} <input id="newNameInput" name="dest_path" value="" type="text" class="input-xlarge"/></label>
     </div>
     <div class="modal-footer">
         <div id="renameNameRequiredAlert" class="hide" style="position: absolute; left: 10;">
-            <span class="label label-important">Sorry, name is required.</span>
+            <span class="label label-important">${_('Sorry, name is required.')}</span>
         </div>
 
         <input id="renameSrcPath" type="hidden" name="src_path" type="text">
-        <input type="submit" value="Submit" class="btn primary" />
-        <a id="cancelRenameBtn" class="btn">Cancel</a>
+        <input type="submit" value="${_('Submit')}" class="btn primary" />
+        <a id="cancelRenameBtn" class="btn">${_('Cancel')}</a>
     </div>
     </form>
 </div>
@@ -175,13 +176,13 @@ from django.utils.encoding import smart_str
     <form id="uploadForm" action="/filebrowser/rename?next=${current_request_path}" method="POST" enctype="multipart/form-data" class="form-stacked form-padding-fix">
     <div class="modal-header">
         <a href="#" class="close" data-dismiss="modal">&times;</a>
-        <h3>Uploading to: <span id="uploadDirName">${current_dir_path}</span></h3>
+        <h3>${_('Uploading to:')} <span id="uploadDirName">${current_dir_path}</span></h3>
     </div>
     <div class="modal-body">
         <form action="/filebrowser/upload?next=${current_dir_path}" method="POST" enctype="multipart/form-data" class="form-stacked">
             <div id="fileUploader">
             <noscript>
-                <p>Please enable JavaScript to use file uploader.</p>
+                <p>${_('Please enable JavaScript to use file uploader.')}</p>
             </noscript>
             </div>
         </form>
@@ -195,18 +196,18 @@ from django.utils.encoding import smart_str
     <form id="createDirectoryForm" action="/filebrowser/mkdir?next=${current_request_path}" method="POST" enctype="multipart/form-data" class="form-inline form-padding-fix">
     <div class="modal-header">
         <a href="#" class="close" data-dismiss="modal">&times;</a>
-        <h3>Create Directory</h3>
+        <h3>${_('Create Directory')}</h3>
     </div>
     <div class="modal-body">
-        <label>Directory Name <input id="newDirectoryNameInput" name="name" value="" type="text" class="input-xlarge"/></label>
+        <label>${_('Directory Name')} <input id="newDirectoryNameInput" name="name" value="" type="text" class="input-xlarge"/></label>
         <input type="hidden" name="path" type="text" value="${current_dir_path}"/>
     </div>
     <div class="modal-footer">
          <div id="directoryNameRequiredAlert" class="alert-message error hide" style="position: absolute; left: 10;">
-            <p><strong>Sorry, directory name is required.</strong>
+            <p><strong>${_('Sorry, directory name is required.')}</strong>
         </div>
-        <input class="btn primary" type="submit" value="Submit" />
-        <a id="cancelCreateDirectoryBtn" class="btn" href="#">Cancel</a>
+        <input class="btn primary" type="submit" value="${_('Submit')}" />
+        <a id="cancelCreateDirectoryBtn" class="btn" href="#">${_('Cancel')}</a>
     </div>
     </form>
 </div>
@@ -285,6 +286,18 @@ from django.utils.encoding import smart_str
         var uploader = new qq.FileUploader({
             element: document.getElementById("fileUploader"),
             action: "/filebrowser/upload",
+            template: '<div class="qq-uploader">' +
+                    '<div class="qq-upload-drop-area"><span>${_('Drop files here to upload')}</span></div>' +
+                    '<div class="qq-upload-button">${_('Upload a file')}</div>' +
+                    '<ul class="qq-upload-list"></ul>' +
+                    '</div>',
+            fileTemplate: '<li>' +
+                    '<span class="qq-upload-file"></span>' +
+                    '<span class="qq-upload-spinner"></span>' +
+                    '<span class="qq-upload-size"></span>' +
+                    '<a class="qq-upload-cancel" href="#">${_('Cancel')}</a>' +
+                    '<span class="qq-upload-failed-text">${_('Failed')}</span>' +
+                    '</li>',
             params:{
                 dest: "${current_dir_path}",
                 fileFieldLabel: "hdfs_file"

+ 7 - 4
apps/filebrowser/src/filebrowser/templates/move.mako

@@ -13,12 +13,15 @@
 ## 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 _
+%>
 <%namespace name="edit" file="editor_components.mako" />
 
 <form id="moveForm" action="/filebrowser/move?next=${next|u}" method="POST" enctype="multipart/form-data" class="form-inline form-padding-fix">
     <div class="modal-header">
         <a href="#" class="close" data-dismiss="modal">&times;</a>
-        <h3>Move: ${src_path}</h3>
+        <h3>${_('Move:')} ${src_path}</h3>
     </div>
     <div class="modal-body">
         <div style="padding-left: 15px;">
@@ -32,10 +35,10 @@
     </div>
     <div class="modal-footer">
         <div id="moveNameRequiredAlert" class="hide" style="position: absolute; left: 10;">
-            <span class="label label-important">Sorry, name is required.</span>
+            <span class="label label-important">${_('Sorry, name is required.')}</span>
         </div>
-        <input class="btn primary" type="submit" value="Submit"/>
-        <a class="btn" onclick="$('#moveModal').modal('hide');">Cancel</a>
+        <input class="btn primary" type="submit" value="${_('Submit')}"/>
+        <a class="btn" onclick="$('#moveModal').modal('hide');">${_('Cancel')}</a>
     </div>
 </form>
 

+ 49 - 34
apps/filebrowser/src/filebrowser/templates/upload.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 _
+%>
 <%namespace name="edit" file="editor_components.mako" />
 
 
@@ -20,38 +23,50 @@
 <link rel="stylesheet" href="/static/ext/css/fileuploader.css" type="text/css" media="screen" title="no title" charset="utf-8" />
 
 
-      <div class="well">
-          <form action="/filebrowser/upload?next=${next|u}" method="POST" enctype="multipart/form-data" class="form-stacked">
-          <h1>Upload Files</h1>
-         <div id="file-uploader">
-		<noscript>
-			<p>Please enable JavaScript to use file uploader.</p>
-			<!-- or put a simple form for upload here -->
-		</noscript>
-	</div>
-        </form>
-      </div>
-
-    <!--<span class="alert-message block-message info">Go back to where you were: <a href="/filebrowser/view${next}">${next}</a>.</span>-->
-
- <script>
-        function createUploader(){
-            var uploader = new qq.FileUploader({
-                element: document.getElementById('file-uploader'),
-                action: '/filebrowser/upload',
-                params:{
-                    dest: '${next}',
-                    fileFieldLabel: 'hdfs_file'
-                },
-                onComplete:function(id, fileName, responseJSON){
-                    window.location = "/filebrowser/view${next}";
-                },
-                debug: true
-            });
-        }
-
-        // in your app create uploader as soon as the DOM is ready
-        // don't wait for the window to load
-        window.onload = createUploader;
-    </script>
+<div class="well">
+    <form action="/filebrowser/upload?next=${next|u}" method="POST" enctype="multipart/form-data" class="form-stacked">
+        <h1>${_('Upload Files')}</h1>
+        <div id="file-uploader">
+            <noscript>
+                <p>${_('Please enable JavaScript to use file uploader.')}</p>
+                <!-- or put a simple form for upload here -->
+            </noscript>
+        </div>
+    </form>
+</div>
+
+<!--<span class="alert-message block-message info">Go back to where you were: <a href="/filebrowser/view${next}">${next}</a>.</span>-->
+
+<script>
+    function createUploader(){
+        var uploader = new qq.FileUploader({
+            element: document.getElementById('file-uploader'),
+            action: '/filebrowser/upload',
+            template: '<div class="qq-uploader">' +
+                    '<div class="qq-upload-drop-area"><span>${_('Drop files here to upload')}</span></div>' +
+                    '<div class="qq-upload-button">${_('Upload a file')}</div>' +
+                    '<ul class="qq-upload-list"></ul>' +
+                    '</div>',
+            fileTemplate: '<li>' +
+                    '<span class="qq-upload-file"></span>' +
+                    '<span class="qq-upload-spinner"></span>' +
+                    '<span class="qq-upload-size"></span>' +
+                    '<a class="qq-upload-cancel" href="#">${_('Cancel')}</a>' +
+                    '<span class="qq-upload-failed-text">${_('Failed')}</span>' +
+                    '</li>',
+            params:{
+                dest: '${next}',
+                fileFieldLabel: 'hdfs_file'
+            },
+            onComplete:function(id, fileName, responseJSON){
+                window.location = "/filebrowser/view${next}";
+            },
+            debug: true
+        });
+    }
+
+    // in your app create uploader as soon as the DOM is ready
+    // don't wait for the window to load
+    window.onload = createUploader;
+</script>
 

+ 3 - 2
apps/filebrowser/src/filebrowser/templates/upload_done.mako

@@ -16,8 +16,9 @@
 <%!
 import datetime
 from django.template.defaultfilters import urlencode
+from django.utils.translation import ugettext as _
 %>
 <% path_enc = urlencode(path) %>
-View uploaded file: <a href="${url('filebrowser.views.view', path=path_enc)}">${path}</a>.<br>
-Go back to where you were: <a href="${next|urlencode}">${next}</a>.
+${_('View uploaded file:')} <a href="${url('filebrowser.views.view', path=path_enc)}">${path}</a>.<br>
+${_('Go back to where you were:')} <a href="${next|urlencode}">${next}</a>.