From bd264faffb32a119ecd2073d40f485aad84d9aa8 Mon Sep 17 00:00:00 2001 From: gfawcett Date: Wed, 4 Mar 2009 01:33:53 +0000 Subject: [PATCH] i18n review -- tagged all the English literals, rebuilt POT There are a couple oddballs that I'm not sure how to handle. For exmaple, how does one internationalize an HTML literal like "This is a subproject of Project Conifer."? I don't see anything in Babel that has the right kind of smarts for this. Must ask an i18n guru. git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@135 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- conifer/babel.cfg | 4 +- conifer/locale/conifer-syrup.pot | 468 ++++++++++++++++++++-- conifer/locale/en_US/LC_MESSAGES/conifer-syrup.po | 467 ++++++++++++++++++++- conifer/locale/fr_CA/LC_MESSAGES/conifer-syrup.po | 467 ++++++++++++++++++++- conifer/syrup/models.py | 39 +- conifer/syrup/views.py | 26 +- conifer/templates/admin/index.xhtml | 2 +- conifer/templates/admin/term.xhtml | 2 +- conifer/templates/auth/login.xhtml | 2 +- conifer/templates/browse_courses.xhtml | 2 +- conifer/templates/components/course.xhtml | 7 +- conifer/templates/generic/delete.xhtml | 2 +- conifer/templates/generic/edit.xhtml | 4 +- conifer/templates/instructors.xhtml | 2 +- conifer/templates/item_add_elec.xhtml | 2 +- conifer/templates/item_add_heading.xhtml | 2 +- conifer/templates/item_add_url.xhtml | 2 +- conifer/templates/master.xhtml | 9 +- conifer/templates/my_courses.xhtml | 2 +- conifer/templates/open_courses.xhtml | 2 +- conifer/templates/search_results.xhtml | 2 +- conifer/templates/tabbar.xhtml | 4 +- conifer/templates/tabbar_anonymous.xhtml | 2 +- conifer/templates/welcome.xhtml | 2 +- 24 files changed, 1401 insertions(+), 122 deletions(-) diff --git a/conifer/babel.cfg b/conifer/babel.cfg index 0415bf9..c27266e 100644 --- a/conifer/babel.cfg +++ b/conifer/babel.cfg @@ -3,5 +3,5 @@ django=babeldjango.extract:extract_django [python: **.py] [genshi: **.xhtml] -ignore_tags= script, style -include_attrs = alt title summary +ignore_tags= script style +include_attrs = alt title summary value diff --git a/conifer/locale/conifer-syrup.pot b/conifer/locale/conifer-syrup.pot index 9ce61c5..2ebc1d9 100644 --- a/conifer/locale/conifer-syrup.pot +++ b/conifer/locale/conifer-syrup.pot @@ -1,14 +1,14 @@ # Translations template for PROJECT. -# Copyright (C) 2008 ORGANIZATION +# Copyright (C) 2009 ORGANIZATION # This file is distributed under the same license as the PROJECT project. -# FIRST AUTHOR , 2008. +# FIRST AUTHOR , 2009. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2008-11-18 21:24-0500\n" +"POT-Creation-Date: 2009-03-03 20:23-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,31 +17,322 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.4\n" -#: templates/master.xhtml:26 +#: syrup/models.py:62 +msgid "custodian" +msgstr "" + +#: syrup/models.py:63 +msgid "staff" +msgstr "" + +#: syrup/models.py:64 +msgid "system administrator" +msgstr "" + +#: syrup/models.py:156 +msgid "This is a moderated (non-public) course" +msgstr "" + +#: syrup/models.py:218 +msgid "Instructor" +msgstr "" + +#: syrup/models.py:219 +msgid "Proxy Instructor" +msgstr "" + +#: syrup/models.py:220 +msgid "Student" +msgstr "" + +#: syrup/models.py:255 +msgid "Attached Electronic Document" +msgstr "" + +#: syrup/models.py:256 +msgid "Physical Book or Document" +msgstr "" + +#: syrup/models.py:257 templates/item_add_url.xhtml:24 +#: templates/item_metadata.xhtml:22 templates/components/course.xhtml:57 +msgid "URL" +msgstr "" + +#: syrup/models.py:258 templates/item_add_heading.xhtml:23 +msgid "Heading" +msgstr "" + +#: syrup/models.py:312 +msgid "In Process" +msgstr "" + +#: syrup/models.py:313 +msgid "Active" +msgstr "" + +#: syrup/models.py:314 +msgid "InActive" +msgstr "" + +#: syrup/models.py:396 +msgid "(Markdown not installed)." +msgstr "" + +#: syrup/models.py:403 +msgid "plain text" +msgstr "" + +#: syrup/models.py:404 +msgid "HTML" +msgstr "" + +#: syrup/models.py:405 +msgid "Markdown" +msgstr "" + +#: syrup/views.py:38 +msgid "Invalid username or password. Please try again." +msgstr "" + +#: syrup/views.py:40 +msgid "Sorry, this account has been disabled." +msgstr "" + +#: syrup/views.py:82 +msgid "Sorry..." +msgstr "" + +#: syrup/views.py:83 +msgid "The Preferences page isn't ready yet." +msgstr "" + +#: syrup/views.py:198 +msgid "not an editor" +msgstr "" + +#: syrup/views.py:201 +msgid "No item_type parameter was provided." +msgstr "" + +#: syrup/views.py:205 +msgid "Sorry, only HEADINGs, URLs and ELECs can be added right now." +msgstr "" + +#: syrup/views.py:296 +msgid "Can only download ELEC documents!" +msgstr "" + +#: syrup/views.py:434 templates/admin/index.xhtml:15 +msgid "Terms" +msgstr "" + +#: syrup/views.py:446 +msgid "start must precede finish" +msgstr "" + +#: syrup/views.py:456 templates/admin/index.xhtml:14 +msgid "Departments" +msgstr "" + +#: syrup/views.py:472 templates/admin/index.xhtml:16 +msgid "News Items" +msgstr "" + +#: templates/browse_courses.xhtml:1 templates/my_courses.xhtml:1 +msgid "Welcome to Syrup E-Reserves!" +msgstr "" + +#: templates/browse_courses.xhtml:12 templates/tabbar.xhtml:11 +#: templates/tabbar_anonymous.xhtml:11 +msgid "Browse" +msgstr "" + +#: templates/browse_courses.xhtml:12 +msgid "" +"(Note: some course materials may require you\n" +" to" +msgstr "" + +#: templates/browse_courses.xhtml:13 +msgid "log in" +msgstr "" + +#: templates/browse_courses.xhtml:14 +msgid "Choose from one of the options below:" +msgstr "" + +#: templates/browse_courses.xhtml:16 +msgid "Browse by Instructor" +msgstr "" + +#: templates/browse_courses.xhtml:17 +msgid "Browse by Department" +msgstr "" + +#: templates/browse_courses.xhtml:18 +msgid "Browse by Course Name" +msgstr "" + +#: templates/course_detail.xhtml:17 +msgid "There are no items associated with this course yet." +msgstr "" + +#: templates/instructors.xhtml:1 +msgid "Instructors" +msgstr "" + +#: templates/instructors.xhtml:12 templates/open_courses.xhtml:12 +#: templates/search_results.xhtml:14 +msgid "$(function() { $('.pagetable').tablesorter(); });" +msgstr "" + +#: templates/instructors.xhtml:19 +msgid "Name" +msgstr "" + +#: templates/item_add_elec.xhtml:1 +msgid "Edit an electronic document" +msgstr "" + +#: templates/item_add_elec.xhtml:1 +msgid "Add a new electronic document" +msgstr "" + +#: templates/item_add_elec.xhtml:13 templates/item_add_heading.xhtml:13 +#: templates/item_add_url.xhtml:13 +msgid "$(function() {$('input[@name=\"title\"]').focus();});" +msgstr "" + +#: templates/item_add_elec.xhtml:25 templates/item_add_elec.xhtml:37 +msgid "Title of document" +msgstr "" + +#: templates/item_add_elec.xhtml:28 templates/item_add_elec.xhtml:45 +msgid "File" +msgstr "" + +#: templates/item_add_elec.xhtml:30 +msgid "Upload file and Create item" +msgstr "" + +#: templates/item_add_elec.xhtml:40 +msgid "Update item" +msgstr "" + +#: templates/item_add_elec.xhtml:42 +msgid "Replace the current file with a new file" +msgstr "" + +#: templates/item_add_elec.xhtml:47 +msgid "Upload new file" +msgstr "" + +#: templates/item_add_heading.xhtml:1 +msgid "Edit a subheading" +msgstr "" + +#: templates/item_add_heading.xhtml:1 +msgid "Add a new subheading" +msgstr "" + +#: templates/item_add_heading.xhtml:29 +msgid "Add heading" +msgstr "" + +#: templates/item_add_heading.xhtml:30 +msgid "Update heading" +msgstr "" + +#: templates/item_add_url.xhtml:1 +msgid "Edit a URL" +msgstr "" + +#: templates/item_add_url.xhtml:1 +msgid "Add a new URL" +msgstr "" + +#: templates/item_add_url.xhtml:23 templates/item_metadata.xhtml:19 +#: templates/open_courses.xhtml:19 templates/search_results.xhtml:70 +msgid "Title" +msgstr "" + +#: templates/item_add_url.xhtml:27 +msgid "Add URL" +msgstr "" + +#: templates/item_add_url.xhtml:28 +msgid "Update URL" +msgstr "" + +#: templates/item_heading_detail.xhtml:20 +msgid "There are no items in this section." +msgstr "" + +#: templates/item_metadata.xhtml:20 +msgid "Type" +msgstr "" + +#: templates/item_metadata.xhtml:21 templates/search_results.xhtml:70 +msgid "Author" +msgstr "" + +#: templates/item_metadata.xhtml:25 +msgid "Download" +msgstr "" + +#: templates/item_metadata.xhtml:27 +msgid "Content type" +msgstr "" + +#: templates/item_metadata.xhtml:28 +msgid "Content length" +msgstr "" + +#: templates/master.xhtml:1 +msgid "Syrup E-Reserve System" +msgstr "" + +#: templates/master.xhtml:1 +msgid "search..." +msgstr "" + +#: templates/master.xhtml:43 msgid "Welcome," msgstr "" -#: templates/master.xhtml:27 +#: templates/master.xhtml:44 msgid "Log Out" msgstr "" -#: templates/master.xhtml:28 templates/tabbar.xhtml:10 +#: templates/master.xhtml:45 msgid "Preferences" msgstr "" -#: templates/master.xhtml:29 +#: templates/master.xhtml:46 msgid "Admin UI" msgstr "" -#: templates/master.xhtml:32 +#: templates/master.xhtml:49 templates/welcome.xhtml:1 msgid "Welcome!" msgstr "" -#: templates/master.xhtml:39 +#: templates/master.xhtml:50 +msgid "Log In" +msgstr "" + +#: templates/master.xhtml:67 +msgid "Start Over" +msgstr "" + +#: templates/master.xhtml:68 +msgid "Syrup is a subproject of" +msgstr "" + +#: templates/master.xhtml:69 msgid "Project Conifer" msgstr "" -#: templates/my_courses.xhtml:12 templates/tabbar.xhtml:7 +#: templates/my_courses.xhtml:12 templates/tabbar.xhtml:12 msgid "My Courses" msgstr "" @@ -49,30 +340,82 @@ msgstr "" msgid "You are not part of any courses at this time." msgstr "" -#: templates/tabbar.xhtml:6 -msgid "Home" +#: templates/open_courses.xhtml:1 +msgid "Open Courses" msgstr "" -#: templates/tabbar.xhtml:8 -msgid "Add a Reserve" +#: templates/open_courses.xhtml:19 +msgid "Term" msgstr "" -#: templates/tabbar.xhtml:9 -msgid "Manage Users" +#: templates/open_courses.xhtml:19 +msgid "Code" msgstr "" -#: templates/welcome.xhtml:13 -msgid "Log in" +#: templates/paginate.xhtml:21 +msgid "Previous" msgstr "" -#: templates/welcome.xhtml:14 -msgid "Search the Reserves" +#: templates/paginate.xhtml:30 +msgid "Next" msgstr "" -#: templates/welcome.xhtml:16 +#: templates/search_results.xhtml:1 +msgid "Search Results" +msgstr "" + +#: templates/search_results.xhtml:21 +msgid "You searched:" +msgstr "" + +#: templates/search_results.xhtml:35 +msgid "Last Name" +msgstr "" + +#: templates/search_results.xhtml:35 +msgid "First Name" +msgstr "" + +#: templates/search_results.xhtml:44 templates/search_results.xhtml:62 +msgid "more...)" +msgstr "" + +#: templates/search_results.xhtml:53 +msgid "Course" +msgstr "" + +#: templates/tabbar.xhtml:10 templates/tabbar_anonymous.xhtml:10 +msgid "Home" +msgstr "" + +#: templates/tabbar.xhtml:13 +msgid "Admin Options" +msgstr "" + +#: templates/welcome.xhtml:12 msgid "News" msgstr "" +#: templates/welcome.xhtml:16 +msgid "posted" +msgstr "" + +#: templates/admin/index.xhtml:1 +msgid "Administrative Options" +msgstr "" + +#: templates/admin/term.xhtml:1 +msgid "Add a new Term" +msgstr "" + +#: templates/admin/term.xhtml:15 +msgid "Save" +msgstr "" + +#: templates/auth/login.xhtml:1 +msgid "Syrup E-Reserves: Please log in" +msgstr "" + #: templates/auth/login.xhtml:10 msgid "$(function() {$('#userid').focus();});" msgstr "" @@ -81,11 +424,90 @@ msgstr "" msgid "Please log in." msgstr "" -#: templates/auth/login.xhtml:20 +#: templates/auth/login.xhtml:21 msgid "User ID:" msgstr "" -#: templates/auth/login.xhtml:24 +#: templates/auth/login.xhtml:25 msgid "Password:" msgstr "" +#: templates/auth/login.xhtml:29 +msgid "Log in" +msgstr "" + +#: templates/components/course.xhtml:1 +msgid "search this course..." +msgstr "" + +#: templates/components/course.xhtml:34 +msgid "about" +msgstr "" + +#: templates/components/course.xhtml:35 +msgid "edit" +msgstr "" + +#: templates/components/course.xhtml:47 +msgid "Top" +msgstr "" + +#: templates/components/course.xhtml:54 +msgid "Add a new item:" +msgstr "" + +#: templates/components/course.xhtml:56 +msgid "Subheading" +msgstr "" + +#: templates/components/course.xhtml:58 +msgid "Electronic Document" +msgstr "" + +#: templates/components/course.xhtml:59 +msgid "Physical Book/Document" +msgstr "" + +#: templates/generic/delete.xhtml:1 +#, python-format +msgid "Delete %s?" +msgstr "" + +#: templates/generic/delete.xhtml:20 +msgid "Delete" +msgstr "" + +#: templates/generic/delete.xhtml:21 +msgid "Cancel" +msgstr "" + +#: templates/generic/edit.xhtml:1 +#, python-format +msgid "Modify %s" +msgstr "" + +#: templates/generic/edit.xhtml:1 +#, python-format +msgid "Add %s" +msgstr "" + +#: templates/generic/edit.xhtml:18 +msgid "Save changes" +msgstr "" + +#: templates/generic/edit.xhtml:19 +msgid "Cancel changes" +msgstr "" + +#: templates/generic/edit.xhtml:20 +msgid "Delete this record" +msgstr "" + +#: templates/generic/index.xhtml:11 +msgid "$(function() { $('table').tablesorter(); });" +msgstr "" + +#: templates/generic/index.xhtml:29 +msgid "Add" +msgstr "" + diff --git a/conifer/locale/en_US/LC_MESSAGES/conifer-syrup.po b/conifer/locale/en_US/LC_MESSAGES/conifer-syrup.po index 786a06d..d3b551b 100644 --- a/conifer/locale/en_US/LC_MESSAGES/conifer-syrup.po +++ b/conifer/locale/en_US/LC_MESSAGES/conifer-syrup.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2008-11-15 20:37+0500\n" -"PO-Revision-Date: 2008-11-18 21:24-0500\n" +"PO-Revision-Date: 2009-03-03 20:23-0500\n" "Last-Translator: FULL NAME \n" "Language-Team: en_US \n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" @@ -17,31 +17,322 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.4\n" -#: templates/master.xhtml:26 +#: syrup/models.py:62 +msgid "custodian" +msgstr "" + +#: syrup/models.py:63 +msgid "staff" +msgstr "" + +#: syrup/models.py:64 +msgid "system administrator" +msgstr "" + +#: syrup/models.py:156 +msgid "This is a moderated (non-public) course" +msgstr "" + +#: syrup/models.py:218 +msgid "Instructor" +msgstr "" + +#: syrup/models.py:219 +msgid "Proxy Instructor" +msgstr "" + +#: syrup/models.py:220 +msgid "Student" +msgstr "" + +#: syrup/models.py:255 +msgid "Attached Electronic Document" +msgstr "" + +#: syrup/models.py:256 +msgid "Physical Book or Document" +msgstr "" + +#: syrup/models.py:257 templates/item_add_url.xhtml:24 +#: templates/item_metadata.xhtml:22 templates/components/course.xhtml:57 +msgid "URL" +msgstr "" + +#: syrup/models.py:258 templates/item_add_heading.xhtml:23 +msgid "Heading" +msgstr "" + +#: syrup/models.py:312 +msgid "In Process" +msgstr "" + +#: syrup/models.py:313 +msgid "Active" +msgstr "" + +#: syrup/models.py:314 +msgid "InActive" +msgstr "" + +#: syrup/models.py:396 +msgid "(Markdown not installed)." +msgstr "" + +#: syrup/models.py:403 +msgid "plain text" +msgstr "" + +#: syrup/models.py:404 +msgid "HTML" +msgstr "" + +#: syrup/models.py:405 +msgid "Markdown" +msgstr "" + +#: syrup/views.py:38 +msgid "Invalid username or password. Please try again." +msgstr "" + +#: syrup/views.py:40 +msgid "Sorry, this account has been disabled." +msgstr "" + +#: syrup/views.py:82 +msgid "Sorry..." +msgstr "" + +#: syrup/views.py:83 +msgid "The Preferences page isn't ready yet." +msgstr "" + +#: syrup/views.py:198 +msgid "not an editor" +msgstr "" + +#: syrup/views.py:201 +msgid "No item_type parameter was provided." +msgstr "" + +#: syrup/views.py:205 +msgid "Sorry, only HEADINGs, URLs and ELECs can be added right now." +msgstr "" + +#: syrup/views.py:296 +msgid "Can only download ELEC documents!" +msgstr "" + +#: syrup/views.py:434 templates/admin/index.xhtml:15 +msgid "Terms" +msgstr "" + +#: syrup/views.py:446 +msgid "start must precede finish" +msgstr "" + +#: syrup/views.py:456 templates/admin/index.xhtml:14 +msgid "Departments" +msgstr "" + +#: syrup/views.py:472 templates/admin/index.xhtml:16 +msgid "News Items" +msgstr "" + +#: templates/browse_courses.xhtml:1 templates/my_courses.xhtml:1 +msgid "Welcome to Syrup E-Reserves!" +msgstr "" + +#: templates/browse_courses.xhtml:12 templates/tabbar.xhtml:11 +#: templates/tabbar_anonymous.xhtml:11 +msgid "Browse" +msgstr "" + +#: templates/browse_courses.xhtml:12 +msgid "" +"(Note: some course materials may require you\n" +" to" +msgstr "" + +#: templates/browse_courses.xhtml:13 +msgid "log in" +msgstr "" + +#: templates/browse_courses.xhtml:14 +msgid "Choose from one of the options below:" +msgstr "" + +#: templates/browse_courses.xhtml:16 +msgid "Browse by Instructor" +msgstr "" + +#: templates/browse_courses.xhtml:17 +msgid "Browse by Department" +msgstr "" + +#: templates/browse_courses.xhtml:18 +msgid "Browse by Course Name" +msgstr "" + +#: templates/course_detail.xhtml:17 +msgid "There are no items associated with this course yet." +msgstr "" + +#: templates/instructors.xhtml:1 +msgid "Instructors" +msgstr "" + +#: templates/instructors.xhtml:12 templates/open_courses.xhtml:12 +#: templates/search_results.xhtml:14 +msgid "$(function() { $('.pagetable').tablesorter(); });" +msgstr "" + +#: templates/instructors.xhtml:19 +msgid "Name" +msgstr "" + +#: templates/item_add_elec.xhtml:1 +msgid "Edit an electronic document" +msgstr "" + +#: templates/item_add_elec.xhtml:1 +msgid "Add a new electronic document" +msgstr "" + +#: templates/item_add_elec.xhtml:13 templates/item_add_heading.xhtml:13 +#: templates/item_add_url.xhtml:13 +msgid "$(function() {$('input[@name=\"title\"]').focus();});" +msgstr "" + +#: templates/item_add_elec.xhtml:25 templates/item_add_elec.xhtml:37 +msgid "Title of document" +msgstr "" + +#: templates/item_add_elec.xhtml:28 templates/item_add_elec.xhtml:45 +msgid "File" +msgstr "" + +#: templates/item_add_elec.xhtml:30 +msgid "Upload file and Create item" +msgstr "" + +#: templates/item_add_elec.xhtml:40 +msgid "Update item" +msgstr "" + +#: templates/item_add_elec.xhtml:42 +msgid "Replace the current file with a new file" +msgstr "" + +#: templates/item_add_elec.xhtml:47 +msgid "Upload new file" +msgstr "" + +#: templates/item_add_heading.xhtml:1 +msgid "Edit a subheading" +msgstr "" + +#: templates/item_add_heading.xhtml:1 +msgid "Add a new subheading" +msgstr "" + +#: templates/item_add_heading.xhtml:29 +msgid "Add heading" +msgstr "" + +#: templates/item_add_heading.xhtml:30 +msgid "Update heading" +msgstr "" + +#: templates/item_add_url.xhtml:1 +msgid "Edit a URL" +msgstr "" + +#: templates/item_add_url.xhtml:1 +msgid "Add a new URL" +msgstr "" + +#: templates/item_add_url.xhtml:23 templates/item_metadata.xhtml:19 +#: templates/open_courses.xhtml:19 templates/search_results.xhtml:70 +msgid "Title" +msgstr "" + +#: templates/item_add_url.xhtml:27 +msgid "Add URL" +msgstr "" + +#: templates/item_add_url.xhtml:28 +msgid "Update URL" +msgstr "" + +#: templates/item_heading_detail.xhtml:20 +msgid "There are no items in this section." +msgstr "" + +#: templates/item_metadata.xhtml:20 +msgid "Type" +msgstr "" + +#: templates/item_metadata.xhtml:21 templates/search_results.xhtml:70 +msgid "Author" +msgstr "" + +#: templates/item_metadata.xhtml:25 +msgid "Download" +msgstr "" + +#: templates/item_metadata.xhtml:27 +msgid "Content type" +msgstr "" + +#: templates/item_metadata.xhtml:28 +msgid "Content length" +msgstr "" + +#: templates/master.xhtml:1 +msgid "Syrup E-Reserve System" +msgstr "" + +#: templates/master.xhtml:1 +msgid "search..." +msgstr "" + +#: templates/master.xhtml:43 msgid "Welcome," msgstr "" -#: templates/master.xhtml:27 +#: templates/master.xhtml:44 msgid "Log Out" msgstr "" -#: templates/master.xhtml:28 templates/tabbar.xhtml:10 +#: templates/master.xhtml:45 msgid "Preferences" msgstr "" -#: templates/master.xhtml:29 +#: templates/master.xhtml:46 msgid "Admin UI" msgstr "" -#: templates/master.xhtml:32 +#: templates/master.xhtml:49 templates/welcome.xhtml:1 msgid "Welcome!" msgstr "" -#: templates/master.xhtml:39 +#: templates/master.xhtml:50 +msgid "Log In" +msgstr "" + +#: templates/master.xhtml:67 +msgid "Start Over" +msgstr "" + +#: templates/master.xhtml:68 +msgid "Syrup is a subproject of" +msgstr "" + +#: templates/master.xhtml:69 msgid "Project Conifer" msgstr "" -#: templates/my_courses.xhtml:12 templates/tabbar.xhtml:7 +#: templates/my_courses.xhtml:12 templates/tabbar.xhtml:12 msgid "My Courses" msgstr "" @@ -49,30 +340,82 @@ msgstr "" msgid "You are not part of any courses at this time." msgstr "" -#: templates/tabbar.xhtml:6 -msgid "Home" +#: templates/open_courses.xhtml:1 +msgid "Open Courses" msgstr "" -#: templates/tabbar.xhtml:8 -msgid "Add a Reserve" +#: templates/open_courses.xhtml:19 +msgid "Term" msgstr "" -#: templates/tabbar.xhtml:9 -msgid "Manage Users" +#: templates/open_courses.xhtml:19 +msgid "Code" msgstr "" -#: templates/welcome.xhtml:13 -msgid "Log in" +#: templates/paginate.xhtml:21 +msgid "Previous" msgstr "" -#: templates/welcome.xhtml:14 -msgid "Search the Reserves" +#: templates/paginate.xhtml:30 +msgid "Next" msgstr "" -#: templates/welcome.xhtml:16 +#: templates/search_results.xhtml:1 +msgid "Search Results" +msgstr "" + +#: templates/search_results.xhtml:21 +msgid "You searched:" +msgstr "" + +#: templates/search_results.xhtml:35 +msgid "Last Name" +msgstr "" + +#: templates/search_results.xhtml:35 +msgid "First Name" +msgstr "" + +#: templates/search_results.xhtml:44 templates/search_results.xhtml:62 +msgid "more...)" +msgstr "" + +#: templates/search_results.xhtml:53 +msgid "Course" +msgstr "" + +#: templates/tabbar.xhtml:10 templates/tabbar_anonymous.xhtml:10 +msgid "Home" +msgstr "" + +#: templates/tabbar.xhtml:13 +msgid "Admin Options" +msgstr "" + +#: templates/welcome.xhtml:12 msgid "News" msgstr "" +#: templates/welcome.xhtml:16 +msgid "posted" +msgstr "" + +#: templates/admin/index.xhtml:1 +msgid "Administrative Options" +msgstr "" + +#: templates/admin/term.xhtml:1 +msgid "Add a new Term" +msgstr "" + +#: templates/admin/term.xhtml:15 +msgid "Save" +msgstr "" + +#: templates/auth/login.xhtml:1 +msgid "Syrup E-Reserves: Please log in" +msgstr "" + #: templates/auth/login.xhtml:10 msgid "$(function() {$('#userid').focus();});" msgstr "" @@ -81,11 +424,93 @@ msgstr "" msgid "Please log in." msgstr "" -#: templates/auth/login.xhtml:20 +#: templates/auth/login.xhtml:21 msgid "User ID:" msgstr "" -#: templates/auth/login.xhtml:24 +#: templates/auth/login.xhtml:25 msgid "Password:" msgstr "" +#: templates/auth/login.xhtml:29 +msgid "Log in" +msgstr "" + +#: templates/components/course.xhtml:1 +msgid "search this course..." +msgstr "" + +#: templates/components/course.xhtml:34 +msgid "about" +msgstr "" + +#: templates/components/course.xhtml:35 +msgid "edit" +msgstr "" + +#: templates/components/course.xhtml:47 +msgid "Top" +msgstr "" + +#: templates/components/course.xhtml:54 +msgid "Add a new item:" +msgstr "" + +#: templates/components/course.xhtml:56 +msgid "Subheading" +msgstr "" + +#: templates/components/course.xhtml:58 +msgid "Electronic Document" +msgstr "" + +#: templates/components/course.xhtml:59 +msgid "Physical Book/Document" +msgstr "" + +#: templates/generic/delete.xhtml:1 +#, python-format +msgid "Delete %s?" +msgstr "" + +#: templates/generic/delete.xhtml:20 +msgid "Delete" +msgstr "" + +#: templates/generic/delete.xhtml:21 +msgid "Cancel" +msgstr "" + +#: templates/generic/edit.xhtml:1 +#, python-format +msgid "Modify %s" +msgstr "" + +#: templates/generic/edit.xhtml:1 +#, python-format +msgid "Add %s" +msgstr "" + +#: templates/generic/edit.xhtml:18 +msgid "Save changes" +msgstr "" + +#: templates/generic/edit.xhtml:19 +msgid "Cancel changes" +msgstr "" + +#: templates/generic/edit.xhtml:20 +msgid "Delete this record" +msgstr "" + +#: templates/generic/index.xhtml:11 +msgid "$(function() { $('table').tablesorter(); });" +msgstr "" + +#: templates/generic/index.xhtml:29 +msgid "Add" +msgstr "" + +#~ msgid "published !!!" +#~ msgstr "" + diff --git a/conifer/locale/fr_CA/LC_MESSAGES/conifer-syrup.po b/conifer/locale/fr_CA/LC_MESSAGES/conifer-syrup.po index b7cf5c8..694a593 100644 --- a/conifer/locale/fr_CA/LC_MESSAGES/conifer-syrup.po +++ b/conifer/locale/fr_CA/LC_MESSAGES/conifer-syrup.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2008-11-15 20:37+0500\n" -"PO-Revision-Date: 2008-11-18 21:24-0500\n" +"PO-Revision-Date: 2009-03-03 20:23-0500\n" "Last-Translator: FULL NAME \n" "Language-Team: fr_CA \n" "Plural-Forms: nplurals=2; plural=(n > 1)\n" @@ -18,31 +18,322 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.4\n" -#: templates/master.xhtml:26 +#: syrup/models.py:62 +msgid "custodian" +msgstr "" + +#: syrup/models.py:63 +msgid "staff" +msgstr "" + +#: syrup/models.py:64 +msgid "system administrator" +msgstr "" + +#: syrup/models.py:156 +msgid "This is a moderated (non-public) course" +msgstr "" + +#: syrup/models.py:218 +msgid "Instructor" +msgstr "" + +#: syrup/models.py:219 +msgid "Proxy Instructor" +msgstr "" + +#: syrup/models.py:220 +msgid "Student" +msgstr "" + +#: syrup/models.py:255 +msgid "Attached Electronic Document" +msgstr "" + +#: syrup/models.py:256 +msgid "Physical Book or Document" +msgstr "" + +#: syrup/models.py:257 templates/item_add_url.xhtml:24 +#: templates/item_metadata.xhtml:22 templates/components/course.xhtml:57 +msgid "URL" +msgstr "" + +#: syrup/models.py:258 templates/item_add_heading.xhtml:23 +msgid "Heading" +msgstr "" + +#: syrup/models.py:312 +msgid "In Process" +msgstr "" + +#: syrup/models.py:313 +msgid "Active" +msgstr "" + +#: syrup/models.py:314 +msgid "InActive" +msgstr "" + +#: syrup/models.py:396 +msgid "(Markdown not installed)." +msgstr "" + +#: syrup/models.py:403 +msgid "plain text" +msgstr "" + +#: syrup/models.py:404 +msgid "HTML" +msgstr "" + +#: syrup/models.py:405 +msgid "Markdown" +msgstr "" + +#: syrup/views.py:38 +msgid "Invalid username or password. Please try again." +msgstr "" + +#: syrup/views.py:40 +msgid "Sorry, this account has been disabled." +msgstr "" + +#: syrup/views.py:82 +msgid "Sorry..." +msgstr "" + +#: syrup/views.py:83 +msgid "The Preferences page isn't ready yet." +msgstr "" + +#: syrup/views.py:198 +msgid "not an editor" +msgstr "" + +#: syrup/views.py:201 +msgid "No item_type parameter was provided." +msgstr "" + +#: syrup/views.py:205 +msgid "Sorry, only HEADINGs, URLs and ELECs can be added right now." +msgstr "" + +#: syrup/views.py:296 +msgid "Can only download ELEC documents!" +msgstr "" + +#: syrup/views.py:434 templates/admin/index.xhtml:15 +msgid "Terms" +msgstr "" + +#: syrup/views.py:446 +msgid "start must precede finish" +msgstr "" + +#: syrup/views.py:456 templates/admin/index.xhtml:14 +msgid "Departments" +msgstr "" + +#: syrup/views.py:472 templates/admin/index.xhtml:16 +msgid "News Items" +msgstr "" + +#: templates/browse_courses.xhtml:1 templates/my_courses.xhtml:1 +msgid "Welcome to Syrup E-Reserves!" +msgstr "" + +#: templates/browse_courses.xhtml:12 templates/tabbar.xhtml:11 +#: templates/tabbar_anonymous.xhtml:11 +msgid "Browse" +msgstr "" + +#: templates/browse_courses.xhtml:12 +msgid "" +"(Note: some course materials may require you\n" +" to" +msgstr "" + +#: templates/browse_courses.xhtml:13 +msgid "log in" +msgstr "" + +#: templates/browse_courses.xhtml:14 +msgid "Choose from one of the options below:" +msgstr "" + +#: templates/browse_courses.xhtml:16 +msgid "Browse by Instructor" +msgstr "" + +#: templates/browse_courses.xhtml:17 +msgid "Browse by Department" +msgstr "" + +#: templates/browse_courses.xhtml:18 +msgid "Browse by Course Name" +msgstr "" + +#: templates/course_detail.xhtml:17 +msgid "There are no items associated with this course yet." +msgstr "" + +#: templates/instructors.xhtml:1 +msgid "Instructors" +msgstr "" + +#: templates/instructors.xhtml:12 templates/open_courses.xhtml:12 +#: templates/search_results.xhtml:14 +msgid "$(function() { $('.pagetable').tablesorter(); });" +msgstr "" + +#: templates/instructors.xhtml:19 +msgid "Name" +msgstr "" + +#: templates/item_add_elec.xhtml:1 +msgid "Edit an electronic document" +msgstr "" + +#: templates/item_add_elec.xhtml:1 +msgid "Add a new electronic document" +msgstr "" + +#: templates/item_add_elec.xhtml:13 templates/item_add_heading.xhtml:13 +#: templates/item_add_url.xhtml:13 +msgid "$(function() {$('input[@name=\"title\"]').focus();});" +msgstr "" + +#: templates/item_add_elec.xhtml:25 templates/item_add_elec.xhtml:37 +msgid "Title of document" +msgstr "" + +#: templates/item_add_elec.xhtml:28 templates/item_add_elec.xhtml:45 +msgid "File" +msgstr "" + +#: templates/item_add_elec.xhtml:30 +msgid "Upload file and Create item" +msgstr "" + +#: templates/item_add_elec.xhtml:40 +msgid "Update item" +msgstr "" + +#: templates/item_add_elec.xhtml:42 +msgid "Replace the current file with a new file" +msgstr "" + +#: templates/item_add_elec.xhtml:47 +msgid "Upload new file" +msgstr "" + +#: templates/item_add_heading.xhtml:1 +msgid "Edit a subheading" +msgstr "" + +#: templates/item_add_heading.xhtml:1 +msgid "Add a new subheading" +msgstr "" + +#: templates/item_add_heading.xhtml:29 +msgid "Add heading" +msgstr "" + +#: templates/item_add_heading.xhtml:30 +msgid "Update heading" +msgstr "" + +#: templates/item_add_url.xhtml:1 +msgid "Edit a URL" +msgstr "" + +#: templates/item_add_url.xhtml:1 +msgid "Add a new URL" +msgstr "" + +#: templates/item_add_url.xhtml:23 templates/item_metadata.xhtml:19 +#: templates/open_courses.xhtml:19 templates/search_results.xhtml:70 +msgid "Title" +msgstr "" + +#: templates/item_add_url.xhtml:27 +msgid "Add URL" +msgstr "" + +#: templates/item_add_url.xhtml:28 +msgid "Update URL" +msgstr "" + +#: templates/item_heading_detail.xhtml:20 +msgid "There are no items in this section." +msgstr "" + +#: templates/item_metadata.xhtml:20 +msgid "Type" +msgstr "" + +#: templates/item_metadata.xhtml:21 templates/search_results.xhtml:70 +msgid "Author" +msgstr "" + +#: templates/item_metadata.xhtml:25 +msgid "Download" +msgstr "" + +#: templates/item_metadata.xhtml:27 +msgid "Content type" +msgstr "" + +#: templates/item_metadata.xhtml:28 +msgid "Content length" +msgstr "" + +#: templates/master.xhtml:1 +msgid "Syrup E-Reserve System" +msgstr "" + +#: templates/master.xhtml:1 +msgid "search..." +msgstr "" + +#: templates/master.xhtml:43 msgid "Welcome," msgstr "" -#: templates/master.xhtml:27 +#: templates/master.xhtml:44 msgid "Log Out" msgstr "" -#: templates/master.xhtml:28 templates/tabbar.xhtml:10 +#: templates/master.xhtml:45 msgid "Preferences" msgstr "" -#: templates/master.xhtml:29 +#: templates/master.xhtml:46 msgid "Admin UI" msgstr "" -#: templates/master.xhtml:32 +#: templates/master.xhtml:49 templates/welcome.xhtml:1 msgid "Welcome!" msgstr "" -#: templates/master.xhtml:39 +#: templates/master.xhtml:50 +msgid "Log In" +msgstr "" + +#: templates/master.xhtml:67 +msgid "Start Over" +msgstr "" + +#: templates/master.xhtml:68 +msgid "Syrup is a subproject of" +msgstr "" + +#: templates/master.xhtml:69 msgid "Project Conifer" msgstr "" -#: templates/my_courses.xhtml:12 templates/tabbar.xhtml:7 +#: templates/my_courses.xhtml:12 templates/tabbar.xhtml:12 msgid "My Courses" msgstr "" @@ -50,30 +341,82 @@ msgstr "" msgid "You are not part of any courses at this time." msgstr "" -#: templates/tabbar.xhtml:6 -msgid "Home" +#: templates/open_courses.xhtml:1 +msgid "Open Courses" msgstr "" -#: templates/tabbar.xhtml:8 -msgid "Add a Reserve" +#: templates/open_courses.xhtml:19 +msgid "Term" msgstr "" -#: templates/tabbar.xhtml:9 -msgid "Manage Users" +#: templates/open_courses.xhtml:19 +msgid "Code" msgstr "" -#: templates/welcome.xhtml:13 -msgid "Log in" +#: templates/paginate.xhtml:21 +msgid "Previous" msgstr "" -#: templates/welcome.xhtml:14 -msgid "Search the Reserves" +#: templates/paginate.xhtml:30 +msgid "Next" msgstr "" -#: templates/welcome.xhtml:16 +#: templates/search_results.xhtml:1 +msgid "Search Results" +msgstr "" + +#: templates/search_results.xhtml:21 +msgid "You searched:" +msgstr "" + +#: templates/search_results.xhtml:35 +msgid "Last Name" +msgstr "" + +#: templates/search_results.xhtml:35 +msgid "First Name" +msgstr "" + +#: templates/search_results.xhtml:44 templates/search_results.xhtml:62 +msgid "more...)" +msgstr "" + +#: templates/search_results.xhtml:53 +msgid "Course" +msgstr "" + +#: templates/tabbar.xhtml:10 templates/tabbar_anonymous.xhtml:10 +msgid "Home" +msgstr "" + +#: templates/tabbar.xhtml:13 +msgid "Admin Options" +msgstr "" + +#: templates/welcome.xhtml:12 msgid "News" msgstr "" +#: templates/welcome.xhtml:16 +msgid "posted" +msgstr "" + +#: templates/admin/index.xhtml:1 +msgid "Administrative Options" +msgstr "" + +#: templates/admin/term.xhtml:1 +msgid "Add a new Term" +msgstr "" + +#: templates/admin/term.xhtml:15 +msgid "Save" +msgstr "" + +#: templates/auth/login.xhtml:1 +msgid "Syrup E-Reserves: Please log in" +msgstr "" + #: templates/auth/login.xhtml:10 msgid "$(function() {$('#userid').focus();});" msgstr "" @@ -82,11 +425,93 @@ msgstr "" msgid "Please log in." msgstr "" -#: templates/auth/login.xhtml:20 +#: templates/auth/login.xhtml:21 msgid "User ID:" msgstr "" -#: templates/auth/login.xhtml:24 +#: templates/auth/login.xhtml:25 msgid "Password:" msgstr "" +#: templates/auth/login.xhtml:29 +msgid "Log in" +msgstr "" + +#: templates/components/course.xhtml:1 +msgid "search this course..." +msgstr "" + +#: templates/components/course.xhtml:34 +msgid "about" +msgstr "" + +#: templates/components/course.xhtml:35 +msgid "edit" +msgstr "" + +#: templates/components/course.xhtml:47 +msgid "Top" +msgstr "" + +#: templates/components/course.xhtml:54 +msgid "Add a new item:" +msgstr "" + +#: templates/components/course.xhtml:56 +msgid "Subheading" +msgstr "" + +#: templates/components/course.xhtml:58 +msgid "Electronic Document" +msgstr "" + +#: templates/components/course.xhtml:59 +msgid "Physical Book/Document" +msgstr "" + +#: templates/generic/delete.xhtml:1 +#, python-format +msgid "Delete %s?" +msgstr "" + +#: templates/generic/delete.xhtml:20 +msgid "Delete" +msgstr "" + +#: templates/generic/delete.xhtml:21 +msgid "Cancel" +msgstr "" + +#: templates/generic/edit.xhtml:1 +#, python-format +msgid "Modify %s" +msgstr "" + +#: templates/generic/edit.xhtml:1 +#, python-format +msgid "Add %s" +msgstr "" + +#: templates/generic/edit.xhtml:18 +msgid "Save changes" +msgstr "" + +#: templates/generic/edit.xhtml:19 +msgid "Cancel changes" +msgstr "" + +#: templates/generic/edit.xhtml:20 +msgid "Delete this record" +msgstr "" + +#: templates/generic/index.xhtml:11 +msgid "$(function() { $('table').tablesorter(); });" +msgstr "" + +#: templates/generic/index.xhtml:29 +msgid "Add" +msgstr "" + +#~ msgid "published !!!" +#~ msgstr "" + diff --git a/conifer/syrup/models.py b/conifer/syrup/models.py index db829c4..5e795c0 100644 --- a/conifer/syrup/models.py +++ b/conifer/syrup/models.py @@ -4,6 +4,8 @@ from django.contrib.auth.models import AnonymousUser from django.contrib.auth import get_backends from datetime import datetime from genshi import Markup +from gettext import gettext as _ # fixme, is this the right function to import? + import re def highlight(text, phrase, @@ -57,9 +59,9 @@ class UserProfile(m.Model): max_length=50, blank=True) access_level = m.CharField(max_length=5, blank=True, null=True, default=None, - choices=(('CUST', 'custodian'), - ('STAFF', 'staff'), - ('ADMIN', 'system administrator'))) + choices=(('CUST', _('custodian')), + ('STAFF', _('staff')), + ('ADMIN', _('system administrator')))) instructor = m.BooleanField(default=False) proxy = m.BooleanField(default=False) # n.b. Django's User has an active flag, maybe we should use that? @@ -151,10 +153,11 @@ class Course(m.Model): term = m.ForeignKey(Term) title = m.CharField(max_length=1024) active = m.BooleanField(default=True) - moderated = m.BooleanField('This is a moderated (non-public) course', + moderated = m.BooleanField(_('This is a moderated (non-public) course'), default=False) # Enrol-codes are used for SIS integration (graham's idea-in-progress) + # don't i18nize, I'm probably dropping this. vvvvv enrol_codes = m.CharField('Registrar keys for class lists, pipe-separated', max_length=4098, blank=True, null=True) @@ -212,9 +215,9 @@ class Member(m.Model): user = m.ForeignKey(User) role = m.CharField( choices = ( - ('INSTR', 'Instructor'), - ('PROXY', 'Proxy Instructor'), - ('STUDT', 'Student')), + ('INSTR', _('Instructor')), + ('PROXY', _('Proxy Instructor')), + ('STUDT', _('Student'))), default = 'STUDT', max_length = 5) @@ -249,10 +252,10 @@ class Item(m.Model): course = m.ForeignKey(Course) ITEM_TYPE_CHOICES = ( - ('ELEC', 'Attached Electronic Document'), # PDF, Doc, etc. - ('PHYS', 'Physical Book or Document'), - ('URL', 'URL'), - ('HEADING', 'Heading')) + ('ELEC', _('Attached Electronic Document')), # PDF, Doc, etc. + ('PHYS', _('Physical Book or Document')), + ('URL', _('URL')), + ('HEADING', _('Heading'))) item_type = m.CharField(max_length=7, choices=ITEM_TYPE_CHOICES) sort_order = m.IntegerField(default=0) # parent must be a heading. could use ForeignKey.limit_choices_to, @@ -306,9 +309,9 @@ class Item(m.Model): # # who is the owner? # owner_user_id = m.IntegerField(null=True,blank=True) - STATUS_CHOICE = (('INPROCESS', 'In Process'), # physical, pending - ('ACTIVE', 'Active'), # available - ('INACTIVE', 'InActive')) # no longer on rsrv. + STATUS_CHOICE = (('INPROCESS', _('In Process')), # physical, pending + ('ACTIVE', _('Active')), # available + ('INACTIVE', _('InActive'))) # no longer on rsrv. phys_status = m.CharField(max_length=9, null=True, blank=True, choices=STATUS_CHOICE, @@ -390,16 +393,16 @@ try: return markdown.markdown(txt) except ImportError: def do_markdown(txt): - return '(Markdown not installed).' + return _('(Markdown not installed).') class NewsItem(m.Model): subject = m.CharField(max_length=200) body = m.TextField() published = m.DateTimeField(default=datetime.now, blank=True, null=True) encoding = m.CharField(max_length=10, - choices = (('plain', 'plain'), - ('html', 'html'), - ('markdown', 'markdown')), + choices = (('plain', _('plain text')), + ('html', _('HTML')), + ('markdown', _('Markdown'))), default = 'html') def generated_body(self): diff --git a/conifer/syrup/views.py b/conifer/syrup/views.py index ddfd243..4399379 100644 --- a/conifer/syrup/views.py +++ b/conifer/syrup/views.py @@ -11,6 +11,7 @@ from django.contrib.auth.models import User from django.db.models import Q from datetime import datetime from generics import * +from gettext import gettext as _ # fixme, is this the right function to import? #------------------------------------------------------------ # Authentication @@ -34,9 +35,9 @@ def auth_handler(request, path): next = request.POST['next'] user = authenticate(username=userid, password=password) if user is None: - return g.render('auth/login.xhtml', err='Invalid username or password. Please try again.', next=next) + return g.render('auth/login.xhtml', err=_('Invalid username or password. Please try again.'), next=next) elif not user.is_active: - return g.render('auth/login.xhtml', err='Sorry, this account has been disabled.', next=next) + return g.render('auth/login.xhtml', err=_('Sorry, this account has been disabled.'), next=next) else: login(request, user) return HttpResponseRedirect(request.POST.get('next', '/syrup/')) @@ -78,8 +79,8 @@ def instructors(request): def user_prefs(request): return g.render('simplemessage.xhtml', - title='Sorry...', - content='The Preferences page isn\'t ready yet.') + title=_('Sorry...'), + content=_('The Preferences page isn\'t ready yet.')) def browse_courses(request, browse_option=''): #the defaults should be moved into a config file or something... @@ -194,14 +195,14 @@ def item_add(request, course_id, item_id): course = parent_item.course if not course.can_edit(request.user): - return HttpResponseForbidden('not an editor') # fixme, prettier msg? + return HttpResponseForbidden(_('not an editor')) # fixme, prettier msg? item_type = request.GET.get('item_type') - assert item_type, 'No item_type parameter was provided.' + assert item_type, _('No item_type parameter was provided.') # for the moment, only HEADINGs, URLs and ELECs can be added. assert item_type in ('HEADING', 'URL', 'ELEC'), \ - 'Sorry, only HEADINGs, URLs and ELECs can be added right now.' + _('Sorry, only HEADINGs, URLs and ELECs can be added right now.') if request.method == 'GET': item = models.Item() # dummy object @@ -292,7 +293,7 @@ def item_edit(request, course_id, item_id): def item_download(request, course_id, item_id, filename): course = get_object_or_404(models.Course, pk=course_id) item = get_object_or_404(models.Item, pk=item_id, course__id=course_id) - assert item.item_type == 'ELEC', 'Can only download ELEC documents!' + assert item.item_type == 'ELEC', _('Can only download ELEC documents!') fileiter = item.fileobj.chunks() resp = HttpResponse(fileiter) resp['Content-Type'] = item.fileobj_mimetype or 'application/octet-stream' @@ -430,7 +431,7 @@ class TermForm(ModelForm): model = models.Term class Index: - title = 'Terms' + title = _('Terms') all = models.Term.objects.order_by('start', 'code').all cols = ['code', 'name', 'start', 'finish'] links = [0,1] @@ -442,7 +443,7 @@ class TermForm(ModelForm): cd = self.cleaned_data s, f = cd.get('start'), cd.get('finish') if (s and f) and s >= f: - raise ValidationError, 'start must precede finish' + raise ValidationError, _('start must precede finish') return cd admin_terms = generic_handler(TermForm) @@ -452,7 +453,7 @@ class DeptForm(ModelForm): model = models.Department class Index: - title = 'Departments' + title = _('Departments') all = models.Department.objects.order_by('abbreviation').all cols = ['abbreviation', 'name'] links = [0,1] @@ -468,7 +469,7 @@ class NewsForm(ModelForm): model = models.NewsItem class Index: - title = 'News Items' + title = _('News Items') all = models.NewsItem.objects.order_by('-id').all cols = ['id', 'subject', 'published'] links = [0, 1] @@ -477,4 +478,3 @@ class NewsForm(ModelForm): clean_body = strip_and_nonblank('body') admin_news = generic_handler(NewsForm) - diff --git a/conifer/templates/admin/index.xhtml b/conifer/templates/admin/index.xhtml index 9d2250a..47684f4 100644 --- a/conifer/templates/admin/index.xhtml +++ b/conifer/templates/admin/index.xhtml @@ -1,5 +1,5 @@ + value="${searchtext}" onblur="if(this.value=='') this.value='${searchtext}';" + onfocus="if(this.value=='${searchtext}') this.value='';"/> diff --git a/conifer/templates/generic/delete.xhtml b/conifer/templates/generic/delete.xhtml index 5b72f65..fb681f7 100644 --- a/conifer/templates/generic/delete.xhtml +++ b/conifer/templates/generic/delete.xhtml @@ -1,5 +1,5 @@ + value="${search}" onblur="if(this.value=='') this.value='${search}';" + onfocus="if(this.value=='${search}') this.value='';"/> @@ -57,7 +58,7 @@ app_name = 'Syrup E-Reserve System'