[open-ils-commits] r1293 - in servres/branches/i18n/conifer: . integration integration/linktool libsystems/evergreen locale locale/en_CA/LC_MESSAGES locale/eo/LC_MESSAGES locale/fr_CA/LC_MESSAGES syrup syrup/views (gfawcett)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Mar 28 23:10:32 EDT 2011
Author: gfawcett
Date: 2011-03-28 23:10:29 -0400 (Mon, 28 Mar 2011)
New Revision: 1293
Modified:
servres/branches/i18n/conifer/integration/linktool/app.py
servres/branches/i18n/conifer/integration/uwindsor.py
servres/branches/i18n/conifer/libsystems/evergreen/item_status.py
servres/branches/i18n/conifer/libsystems/evergreen/startup.py
servres/branches/i18n/conifer/locale/django.pot
servres/branches/i18n/conifer/locale/en_CA/LC_MESSAGES/django.po
servres/branches/i18n/conifer/locale/eo/LC_MESSAGES/django.po
servres/branches/i18n/conifer/locale/fr_CA/LC_MESSAGES/django.po
servres/branches/i18n/conifer/pybabel-extract
servres/branches/i18n/conifer/syrup/models.py
servres/branches/i18n/conifer/syrup/views/_generics.py
servres/branches/i18n/conifer/syrup/views/admin.py
servres/branches/i18n/conifer/syrup/views/items.py
servres/branches/i18n/conifer/syrup/views/sites.py
Log:
Marked a bunch more texts for translation. (Needs testing.)
Props to Emacs' po-mode, it made finding the texts really easy!
http://www.gnu.org/software/hello/manual/gettext/Marking.html#Marking
Modified: servres/branches/i18n/conifer/integration/linktool/app.py
===================================================================
--- servres/branches/i18n/conifer/integration/linktool/app.py 2011-03-29 01:53:37 UTC (rev 1292)
+++ servres/branches/i18n/conifer/integration/linktool/app.py 2011-03-29 03:10:29 UTC (rev 1293)
@@ -17,7 +17,7 @@
def linktool_welcome(request):
user = authenticate(request=request)
if user is None:
- return HttpResponseForbidden('You are not allowed here.')
+ return HttpResponseForbidden(_('You are not allowed here.'))
else:
login(request, user)
_role = request.GET['role']
@@ -78,7 +78,7 @@
extrole = request.session['clew-role']
assert extrole == 'INSTR'
assert request.user.can_create_sites(), \
- 'Sorry, but you are not allowed to create sites.'
+ _('Sorry, but you are not allowed to create sites.')
extsite = ExternalSiteInfo(request)
extgroups = callhook('external_memberships', request.user.username)
desk = models.ServiceDesk.default()
@@ -100,17 +100,17 @@
def linktool_associate(request):
site = models.Site.objects.get(pk=request.GET['site'])
assert site in request.user.sites(role='INSTR'), \
- 'Not an instructor on this site! Cannot copy.'
+ _('You are not an instructor on this site; you cannot copy it.')
assert request.user.can_create_sites(), \
- 'Sorry, but you are not allowed to create sites.'
+ _('Sorry, but you are not allowed to create sites.')
today = date.today()
assert site.term.midpoint() >= today, \
- 'Sorry, but you cannot associate to such an old site.'
+ _('Sorry, but you cannot make an association to such an old site.')
extsite = request.session['clew-site']
extrole = request.session['clew-role']
assert extrole == 'INSTR', \
- 'Sorry, you are not an instructor on this Sakai site.'
+ _('Sorry, you are not an instructor on this Sakai site.')
group = models.Group.objects.create(
site = site,
external_id = extsite)
@@ -123,14 +123,14 @@
def linktool_copy_old(request):
oldsite = models.Site.objects.get(pk=request.GET['site'])
assert oldsite in request.user.sites(role='INSTR'), \
- 'Not an instructor on this site! Cannot copy.'
+ _('You are not an instructor on this site; you cannot copy it.')
assert request.user.can_create_sites(), \
- 'Sorry, but you are not allowed to create sites.'
+ _('Sorry, but you are not allowed to create sites.')
extsite = request.session['clew-site']
extrole = request.session['clew-role']
assert extrole == 'INSTR', \
- 'Sorry, you are not an instructor on this Sakai site.'
+ _('Sorry, you are not an instructor on this Sakai site.')
extgroups = callhook('external_memberships', request.user.username)
extsite = [d for d in extgroups if d['group'] == extsite][0]
Modified: servres/branches/i18n/conifer/integration/uwindsor.py
===================================================================
--- servres/branches/i18n/conifer/integration/uwindsor.py 2011-03-29 01:53:37 UTC (rev 1292)
+++ servres/branches/i18n/conifer/integration/uwindsor.py 2011-03-29 03:10:29 UTC (rev 1293)
@@ -211,10 +211,11 @@
dueinfo = time.strftime(settings.DUE_FORMAT,earliestdue)
callno = callnum
- alldisplay = callnum + ' (Available)'
+ alldisplay = callnum + _(' (Available)')
if circs and isinstance(circs, list):
- alldisplay = '%s (DUE: %s)' % (callnum, time.strftime(settings.DUE_FORMAT,duetime))
+ _duetime = time.strftime(settings.DUE_FORMAT,duetime)
+ alldisplay = _('%(callnum)s (DUE: %(_duetime)s)') % locals()
alldues.append(alldisplay)
Modified: servres/branches/i18n/conifer/libsystems/evergreen/item_status.py
===================================================================
--- servres/branches/i18n/conifer/libsystems/evergreen/item_status.py 2011-03-29 01:53:37 UTC (rev 1292)
+++ servres/branches/i18n/conifer/libsystems/evergreen/item_status.py 2011-03-29 03:10:29 UTC (rev 1293)
@@ -16,7 +16,7 @@
def url_to_marcxml(url):
# this is a hack. Given a opac Title Details url, return marcxml.
- assert support.BASE, 'no EG BASE. Did you call support.initialize()?'
+ assert support.BASE, _('no EG BASE. Did you call support.initialize()?')
if url.startswith(support.BASE):
if 'feed/bookbag' in url:
#eg http://concat.ca/opac/extras/feed/bookbag/marcxml-full/60
Modified: servres/branches/i18n/conifer/libsystems/evergreen/startup.py
===================================================================
--- servres/branches/i18n/conifer/libsystems/evergreen/startup.py 2011-03-29 01:53:37 UTC (rev 1292)
+++ servres/branches/i18n/conifer/libsystems/evergreen/startup.py 2011-03-29 03:10:29 UTC (rev 1293)
@@ -36,10 +36,10 @@
#no pass on these, updates are too critical to ever be out of sync
except urllib2.URLError, exc:
- print("Could not open URL to read IDL: %s", exc.code)
+ print(_("Could not open URL to read IDL: %s"), exc.code)
except IOError, exc:
- print("Could not write IDL to file: %s", exc.code)
+ print(_("Could not write IDL to file: %s"), exc.code)
# parse the IDL
parser.set_IDL(idlfile)
Modified: servres/branches/i18n/conifer/locale/django.pot
===================================================================
--- servres/branches/i18n/conifer/locale/django.pot 2011-03-29 01:53:37 UTC (rev 1292)
+++ servres/branches/i18n/conifer/locale/django.pot 2011-03-29 03:10:29 UTC (rev 1293)
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: Syrup Reserves 0.1\n"
"Report-Msgid-Bugs-To: Graham Fawcett <graham.fawcett at gmail.com>\n"
-"POT-Creation-Date: 2011-03-28 21:49-0400\n"
+"POT-Creation-Date: 2011-03-28 23:08-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -15,6 +15,36 @@
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: 0.9.4\n"
+#: integration/uwindsor.py:214
+msgid " (Available)"
+msgstr ""
+
+#: integration/uwindsor.py:218
+#, python-format
+msgid "%(callnum)s (DUE: %(_duetime)s)"
+msgstr ""
+
+#: integration/linktool/app.py:20
+msgid "You are not allowed here."
+msgstr ""
+
+#: integration/linktool/app.py:81 integration/linktool/app.py:105
+#: integration/linktool/app.py:128
+msgid "Sorry, but you are not allowed to create sites."
+msgstr ""
+
+#: integration/linktool/app.py:103 integration/linktool/app.py:126
+msgid "You are not an instructor on this site; you cannot copy it."
+msgstr ""
+
+#: integration/linktool/app.py:108
+msgid "Sorry, but you cannot make an association to such an old site."
+msgstr ""
+
+#: integration/linktool/app.py:113 integration/linktool/app.py:133
+msgid "Sorry, you are not an instructor on this Sakai site."
+msgstr ""
+
#: integration/linktool/templates/associate.xhtml:14
msgid "No associated reserves items."
msgstr ""
@@ -88,6 +118,20 @@
"Please choose from the list below:"
msgstr ""
+#: libsystems/evergreen/item_status.py:19
+msgid "no EG BASE. Did you call support.initialize()?"
+msgstr ""
+
+#: libsystems/evergreen/startup.py:39
+#, python-format
+msgid "Could not open URL to read IDL: %s"
+msgstr ""
+
+#: libsystems/evergreen/startup.py:42
+#, python-format
+msgid "Could not write IDL to file: %s"
+msgstr ""
+
#: syrup/models.py:133
msgid "ILS patron ID"
msgstr ""
@@ -178,9 +222,26 @@
msgstr ""
#: syrup/models.py:251
+msgid "CLOSE"
+msgstr ""
+
+#: syrup/models.py:251
msgid "Accessible only to course-site owners"
msgstr ""
+#: syrup/models.py:282
+msgid "The end-term cannot begin before the start-term."
+msgstr ""
+
+#: syrup/models.py:430
+#, python-format
+msgid "Cannot determine access level for user %s in site %s"
+msgstr ""
+
+#: syrup/models.py:507
+msgid "(internal)"
+msgstr ""
+
#: syrup/models.py:518
msgid "Instructor"
msgstr ""
@@ -219,6 +280,26 @@
msgid "MARCXML"
msgstr ""
+#: syrup/models.py:633
+msgid "unknown"
+msgstr ""
+
+#: syrup/models.py:634
+msgid "fair dealing"
+msgstr ""
+
+#: syrup/models.py:635
+msgid "permission granted"
+msgstr ""
+
+#: syrup/models.py:636
+msgid "licensed content"
+msgstr ""
+
+#: syrup/models.py:637
+msgid "available to students"
+msgstr ""
+
#: syrup/models.py:646
msgid "Normal"
msgstr ""
@@ -323,6 +404,10 @@
msgid "The page you requested could not be found"
msgstr ""
+#: syrup/views/_generics.py:53
+msgid "Cannot be blank."
+msgstr ""
+
#: syrup/views/admin.py:17 templates/courses.xhtml:1
#: templates/admin/index.xhtml:24
msgid "Courses"
@@ -337,7 +422,7 @@
msgstr ""
#: syrup/views/admin.py:60
-msgid "start must precede finish"
+msgid "The term's start must precede its finish."
msgstr ""
#: syrup/views/admin.py:87
@@ -348,6 +433,29 @@
msgid "Configs"
msgstr ""
+#. I18N: a 'hook' in this context is a locally-defined function.
+#: syrup/views/admin.py:124 syrup/views/admin.py:141
+#, python-format
+msgid "Sorry, cannot perform this operation at this time: hook %r not found."
+msgstr ""
+
+#: syrup/views/admin.py:134
+msgid "Courses and departments updated."
+msgstr ""
+
+#: syrup/views/admin.py:152
+msgid "Terms updated."
+msgstr ""
+
+#: syrup/views/admin.py:173
+msgid "No user was selected."
+msgstr ""
+
+#: syrup/views/admin.py:176
+#, python-format
+msgid "Staff user added: %s [%s]."
+msgstr ""
+
#: syrup/views/auth.py:24
msgid "Invalid username or password. Please try again."
msgstr ""
@@ -366,6 +474,10 @@
msgid "Courses with Materials in %s"
msgstr ""
+#: syrup/views/items.py:47
+msgid "Items of this type are not downloadable."
+msgstr ""
+
#: syrup/views/items.py:76 syrup/views/items.py:238 syrup/views/items.py:266
msgid "You can only add items to headings!"
msgstr ""
@@ -382,6 +494,14 @@
msgid "Sorry, only HEADINGs, URLs and ELECs can be added right now."
msgstr ""
+#: syrup/views/items.py:165
+msgid "The title and/or URL are missing."
+msgstr ""
+
+#: syrup/views/items.py:316 syrup/views/items.py:329
+msgid "Untitled"
+msgstr ""
+
#: syrup/views/items.py:395
msgid "Unable to update"
msgstr ""
@@ -406,6 +526,10 @@
msgid "You cannot make an item a descendant of itself!"
msgstr ""
+#: syrup/views/sites.py:16
+msgid "The end-term precedes the start-term."
+msgstr ""
+
#: syrup/views/sites.py:34
msgid "You are not allowed to create sites."
msgstr ""
@@ -430,6 +554,34 @@
msgid "Instructors only: this site is closed."
msgstr ""
+#: syrup/views/sites.py:104
+msgid "Changes saved."
+msgstr ""
+
+#: syrup/views/sites.py:110
+#, python-format
+msgid "Security level changed to \"%s\"."
+msgstr ""
+
+#: syrup/views/sites.py:126
+#, python-format
+msgid "%s has been added as a member (role: %s)."
+msgstr ""
+
+#: syrup/views/sites.py:131
+#, python-format
+msgid "%s: role changed to %s."
+msgstr ""
+
+#: syrup/views/sites.py:145
+msgid "No group code or section number provided."
+msgstr ""
+
+#: syrup/views/sites.py:150
+#, python-format
+msgid "Group %s added."
+msgstr ""
+
#: syrup/views/sites.py:202
msgid "You cannot join this site."
msgstr ""
@@ -633,7 +785,7 @@
msgstr ""
#: templates/open_sites.xhtml:19 templates/search_results.xhtml:35
-#: templates/item/item_add_cat_search.xhtml:65
+#: templates/item/item_add_cat_search.xhtml:66
#: templates/item/item_delete_confirm.xhtml:28
#: templates/item/item_metadata.xhtml:46
msgid "Title"
@@ -672,7 +824,7 @@
msgstr[1] ""
#: templates/search_results.xhtml:35
-#: templates/item/item_add_cat_search.xhtml:65
+#: templates/item/item_add_cat_search.xhtml:66
msgid "Author"
msgstr ""
@@ -1039,7 +1191,7 @@
msgstr ""
#: templates/item/common_metadata.xhtml:21
-#: templates/item/item_add_cat_search.xhtml:65
+#: templates/item/item_add_cat_search.xhtml:66
#: templates/item/item_metadata.xhtml:50
msgid "Publisher"
msgstr ""
@@ -1120,33 +1272,33 @@
msgstr[0] ""
msgstr[1] ""
-#: templates/item/item_add_cat_search.xhtml:54
+#: templates/item/item_add_cat_search.xhtml:55
#, python-format
msgid "Previous %(count)s"
msgstr ""
-#: templates/item/item_add_cat_search.xhtml:58
+#: templates/item/item_add_cat_search.xhtml:59
#, python-format
msgid "Next %(count)s"
msgstr ""
-#: templates/item/item_add_cat_search.xhtml:65
+#: templates/item/item_add_cat_search.xhtml:66
msgid "PubDate"
msgstr ""
-#: templates/item/item_add_cat_search.xhtml:73
+#: templates/item/item_add_cat_search.xhtml:74
msgid "details"
msgstr ""
-#: templates/item/item_add_cat_search.xhtml:74
+#: templates/item/item_add_cat_search.xhtml:75
msgid "Electronic resource."
msgstr ""
-#: templates/item/item_add_cat_search.xhtml:75
+#: templates/item/item_add_cat_search.xhtml:76
msgid "view"
msgstr ""
-#: templates/item/item_add_cat_search.xhtml:85
+#: templates/item/item_add_cat_search.xhtml:86
msgid "Pick this item"
msgstr ""
Modified: servres/branches/i18n/conifer/locale/en_CA/LC_MESSAGES/django.po
===================================================================
--- servres/branches/i18n/conifer/locale/en_CA/LC_MESSAGES/django.po 2011-03-29 01:53:37 UTC (rev 1292)
+++ servres/branches/i18n/conifer/locale/en_CA/LC_MESSAGES/django.po 2011-03-29 03:10:29 UTC (rev 1293)
@@ -8,7 +8,7 @@
"Project-Id-Version: Syrup Reserves 0.1\n"
"Report-Msgid-Bugs-To: Graham Fawcett <graham.fawcett at gmail.com>\n"
"POT-Creation-Date: 2011-03-28 20:22+0400\n"
-"PO-Revision-Date: 2011-03-28 21:49-0400\n"
+"PO-Revision-Date: 2011-03-28 23:08-0400\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: en_CA <LL at li.org>\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
@@ -17,6 +17,36 @@
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.4\n"
+#: integration/uwindsor.py:214
+msgid " (Available)"
+msgstr ""
+
+#: integration/uwindsor.py:218
+#, python-format
+msgid "%(callnum)s (DUE: %(_duetime)s)"
+msgstr ""
+
+#: integration/linktool/app.py:20
+msgid "You are not allowed here."
+msgstr ""
+
+#: integration/linktool/app.py:81 integration/linktool/app.py:105
+#: integration/linktool/app.py:128
+msgid "Sorry, but you are not allowed to create sites."
+msgstr ""
+
+#: integration/linktool/app.py:103 integration/linktool/app.py:126
+msgid "You are not an instructor on this site; you cannot copy it."
+msgstr ""
+
+#: integration/linktool/app.py:108
+msgid "Sorry, but you cannot make an association to such an old site."
+msgstr ""
+
+#: integration/linktool/app.py:113 integration/linktool/app.py:133
+msgid "Sorry, you are not an instructor on this Sakai site."
+msgstr ""
+
#: integration/linktool/templates/associate.xhtml:14
msgid "No associated reserves items."
msgstr ""
@@ -90,6 +120,20 @@
"Please choose from the list below:"
msgstr ""
+#: libsystems/evergreen/item_status.py:19
+msgid "no EG BASE. Did you call support.initialize()?"
+msgstr ""
+
+#: libsystems/evergreen/startup.py:39
+#, python-format
+msgid "Could not open URL to read IDL: %s"
+msgstr ""
+
+#: libsystems/evergreen/startup.py:42
+#, python-format
+msgid "Could not write IDL to file: %s"
+msgstr ""
+
#: syrup/models.py:133
msgid "ILS patron ID"
msgstr ""
@@ -180,9 +224,26 @@
msgstr ""
#: syrup/models.py:251
+msgid "CLOSE"
+msgstr ""
+
+#: syrup/models.py:251
msgid "Accessible only to course-site owners"
msgstr ""
+#: syrup/models.py:282
+msgid "The end-term cannot begin before the start-term."
+msgstr ""
+
+#: syrup/models.py:430
+#, python-format
+msgid "Cannot determine access level for user %s in site %s"
+msgstr ""
+
+#: syrup/models.py:507
+msgid "(internal)"
+msgstr ""
+
#: syrup/models.py:518
msgid "Instructor"
msgstr ""
@@ -221,6 +282,26 @@
msgid "MARCXML"
msgstr ""
+#: syrup/models.py:633
+msgid "unknown"
+msgstr ""
+
+#: syrup/models.py:634
+msgid "fair dealing"
+msgstr ""
+
+#: syrup/models.py:635
+msgid "permission granted"
+msgstr ""
+
+#: syrup/models.py:636
+msgid "licensed content"
+msgstr ""
+
+#: syrup/models.py:637
+msgid "available to students"
+msgstr ""
+
#: syrup/models.py:646
msgid "Normal"
msgstr ""
@@ -325,6 +406,10 @@
msgid "The page you requested could not be found"
msgstr ""
+#: syrup/views/_generics.py:53
+msgid "Cannot be blank."
+msgstr ""
+
#: syrup/views/admin.py:17 templates/courses.xhtml:1
#: templates/admin/index.xhtml:24
msgid "Courses"
@@ -339,7 +424,7 @@
msgstr ""
#: syrup/views/admin.py:60
-msgid "start must precede finish"
+msgid "The term's start must precede its finish."
msgstr ""
#: syrup/views/admin.py:87
@@ -350,6 +435,29 @@
msgid "Configs"
msgstr ""
+#. I18N: a 'hook' in this context is a locally-defined function.
+#: syrup/views/admin.py:124 syrup/views/admin.py:141
+#, python-format
+msgid "Sorry, cannot perform this operation at this time: hook %r not found."
+msgstr ""
+
+#: syrup/views/admin.py:134
+msgid "Courses and departments updated."
+msgstr ""
+
+#: syrup/views/admin.py:152
+msgid "Terms updated."
+msgstr ""
+
+#: syrup/views/admin.py:173
+msgid "No user was selected."
+msgstr ""
+
+#: syrup/views/admin.py:176
+#, python-format
+msgid "Staff user added: %s [%s]."
+msgstr ""
+
#: syrup/views/auth.py:24
msgid "Invalid username or password. Please try again."
msgstr ""
@@ -368,6 +476,10 @@
msgid "Courses with Materials in %s"
msgstr ""
+#: syrup/views/items.py:47
+msgid "Items of this type are not downloadable."
+msgstr ""
+
#: syrup/views/items.py:76 syrup/views/items.py:238 syrup/views/items.py:266
msgid "You can only add items to headings!"
msgstr ""
@@ -384,6 +496,14 @@
msgid "Sorry, only HEADINGs, URLs and ELECs can be added right now."
msgstr ""
+#: syrup/views/items.py:165
+msgid "The title and/or URL are missing."
+msgstr ""
+
+#: syrup/views/items.py:316 syrup/views/items.py:329
+msgid "Untitled"
+msgstr ""
+
#: syrup/views/items.py:395
msgid "Unable to update"
msgstr ""
@@ -408,6 +528,10 @@
msgid "You cannot make an item a descendant of itself!"
msgstr ""
+#: syrup/views/sites.py:16
+msgid "The end-term precedes the start-term."
+msgstr ""
+
#: syrup/views/sites.py:34
msgid "You are not allowed to create sites."
msgstr ""
@@ -432,6 +556,34 @@
msgid "Instructors only: this site is closed."
msgstr ""
+#: syrup/views/sites.py:104
+msgid "Changes saved."
+msgstr ""
+
+#: syrup/views/sites.py:110
+#, python-format
+msgid "Security level changed to \"%s\"."
+msgstr ""
+
+#: syrup/views/sites.py:126
+#, python-format
+msgid "%s has been added as a member (role: %s)."
+msgstr ""
+
+#: syrup/views/sites.py:131
+#, python-format
+msgid "%s: role changed to %s."
+msgstr ""
+
+#: syrup/views/sites.py:145
+msgid "No group code or section number provided."
+msgstr ""
+
+#: syrup/views/sites.py:150
+#, python-format
+msgid "Group %s added."
+msgstr ""
+
#: syrup/views/sites.py:202
msgid "You cannot join this site."
msgstr ""
@@ -635,7 +787,7 @@
msgstr ""
#: templates/open_sites.xhtml:19 templates/search_results.xhtml:35
-#: templates/item/item_add_cat_search.xhtml:65
+#: templates/item/item_add_cat_search.xhtml:66
#: templates/item/item_delete_confirm.xhtml:28
#: templates/item/item_metadata.xhtml:46
msgid "Title"
@@ -674,7 +826,7 @@
msgstr[1] ""
#: templates/search_results.xhtml:35
-#: templates/item/item_add_cat_search.xhtml:65
+#: templates/item/item_add_cat_search.xhtml:66
msgid "Author"
msgstr ""
@@ -1041,7 +1193,7 @@
msgstr ""
#: templates/item/common_metadata.xhtml:21
-#: templates/item/item_add_cat_search.xhtml:65
+#: templates/item/item_add_cat_search.xhtml:66
#: templates/item/item_metadata.xhtml:50
msgid "Publisher"
msgstr ""
@@ -1122,33 +1274,33 @@
msgstr[0] ""
msgstr[1] ""
-#: templates/item/item_add_cat_search.xhtml:54
+#: templates/item/item_add_cat_search.xhtml:55
#, python-format
msgid "Previous %(count)s"
msgstr ""
-#: templates/item/item_add_cat_search.xhtml:58
+#: templates/item/item_add_cat_search.xhtml:59
#, python-format
msgid "Next %(count)s"
msgstr ""
-#: templates/item/item_add_cat_search.xhtml:65
+#: templates/item/item_add_cat_search.xhtml:66
msgid "PubDate"
msgstr ""
-#: templates/item/item_add_cat_search.xhtml:73
+#: templates/item/item_add_cat_search.xhtml:74
msgid "details"
msgstr ""
-#: templates/item/item_add_cat_search.xhtml:74
+#: templates/item/item_add_cat_search.xhtml:75
msgid "Electronic resource."
msgstr ""
-#: templates/item/item_add_cat_search.xhtml:75
+#: templates/item/item_add_cat_search.xhtml:76
msgid "view"
msgstr ""
-#: templates/item/item_add_cat_search.xhtml:85
+#: templates/item/item_add_cat_search.xhtml:86
msgid "Pick this item"
msgstr ""
Modified: servres/branches/i18n/conifer/locale/eo/LC_MESSAGES/django.po
===================================================================
--- servres/branches/i18n/conifer/locale/eo/LC_MESSAGES/django.po 2011-03-29 01:53:37 UTC (rev 1292)
+++ servres/branches/i18n/conifer/locale/eo/LC_MESSAGES/django.po 2011-03-29 03:10:29 UTC (rev 1293)
@@ -8,7 +8,7 @@
"Project-Id-Version: Syrup Reserves 0.1\n"
"Report-Msgid-Bugs-To: Graham Fawcett <graham.fawcett at gmail.com>\n"
"POT-Creation-Date: 2011-03-28 20:22+0400\n"
-"PO-Revision-Date: 2011-03-28 21:49-0400\n"
+"PO-Revision-Date: 2011-03-28 23:08-0400\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: eo <LL at li.org>\n"
"MIME-Version: 1.0\n"
@@ -17,6 +17,36 @@
"Generated-By: Babel 0.9.4\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+#: integration/uwindsor.py:214
+msgid " (Available)"
+msgstr " (avAIlAblE)"
+
+#: integration/uwindsor.py:218
+#, python-format
+msgid "%(callnum)s (DUE: %(_duetime)s)"
+msgstr "%(callnum)s (Due: %(_duetime)s)"
+
+#: integration/linktool/app.py:20
+msgid "You are not allowed here."
+msgstr "YOU ArE nOt AllOwEd hErE."
+
+#: integration/linktool/app.py:81 integration/linktool/app.py:105
+#: integration/linktool/app.py:128
+msgid "Sorry, but you are not allowed to create sites."
+msgstr "SOrry, bUt yOU ArE nOt AllOwEd tO crEAtE sItEs."
+
+#: integration/linktool/app.py:103 integration/linktool/app.py:126
+msgid "You are not an instructor on this site; you cannot copy it."
+msgstr "YOU ArE nOt An InstrUctOr On thIs sItE; yOU cAnnOt cOpy It."
+
+#: integration/linktool/app.py:108
+msgid "Sorry, but you cannot make an association to such an old site."
+msgstr "SOrry, bUt yOU cAnnOt mAkE An AssOcIAtIOn tO sUch An Old sItE."
+
+#: integration/linktool/app.py:113 integration/linktool/app.py:133
+msgid "Sorry, you are not an instructor on this Sakai site."
+msgstr "SOrry, yOU ArE nOt An InstrUctOr On thIs SAkAI sItE."
+
#: integration/linktool/templates/associate.xhtml:14
msgid "No associated reserves items."
msgstr "NO AssOcIAtEd rEsErvEs ItEms."
@@ -99,6 +129,20 @@
"ThErE Is mOrE thAn OnE sEt Of rEsErvEs mAtErIAls rElAtEd tO thIs sItE. "
"PlEAsE chOOsE frOm thE lIst bElOw:"
+#: libsystems/evergreen/item_status.py:19
+msgid "no EG BASE. Did you call support.initialize()?"
+msgstr "nO eG BaSe. DId yOU cAll sUppOrt.InItIAlIzE()?"
+
+#: libsystems/evergreen/startup.py:39
+#, python-format
+msgid "Could not open URL to read IDL: %s"
+msgstr "COUld nOt OpEn uRL tO rEAd iDL: %s"
+
+#: libsystems/evergreen/startup.py:42
+#, python-format
+msgid "Could not write IDL to file: %s"
+msgstr "COUld nOt wrItE iDL tO fIlE: %s"
+
#: syrup/models.py:133
msgid "ILS patron ID"
msgstr "iLS pAtrOn iD"
@@ -191,9 +235,26 @@
msgstr "accEssIblE tO cOUrsE-sItE mEmbErs"
#: syrup/models.py:251
+msgid "CLOSE"
+msgstr "CLoSe"
+
+#: syrup/models.py:251
msgid "Accessible only to course-site owners"
msgstr "accEssIblE Only tO cOUrsE-sItE OwnErs"
+#: syrup/models.py:282
+msgid "The end-term cannot begin before the start-term."
+msgstr "ThE End-tErm cAnnOt bEgIn bEfOrE thE stArt-tErm."
+
+#: syrup/models.py:430
+#, python-format
+msgid "Cannot determine access level for user %s in site %s"
+msgstr "CAnnOt dEtErmInE AccEss lEvEl fOr UsEr %s In sItE %s"
+
+#: syrup/models.py:507
+msgid "(internal)"
+msgstr "(IntErnAl)"
+
#: syrup/models.py:518
msgid "Instructor"
msgstr "instrUctOr"
@@ -232,6 +293,26 @@
msgid "MARCXML"
msgstr "MaRCXML"
+#: syrup/models.py:633
+msgid "unknown"
+msgstr "UnknOwn"
+
+#: syrup/models.py:634
+msgid "fair dealing"
+msgstr "fAIr dEAlIng"
+
+#: syrup/models.py:635
+msgid "permission granted"
+msgstr "pErmIssIOn grAntEd"
+
+#: syrup/models.py:636
+msgid "licensed content"
+msgstr "lIcEnsEd cOntEnt"
+
+#: syrup/models.py:637
+msgid "available to students"
+msgstr "AvAIlAblE tO stUdEnts"
+
#: syrup/models.py:646
msgid "Normal"
msgstr "NOrmAl"
@@ -338,6 +419,10 @@
msgid "The page you requested could not be found"
msgstr "ThE pAgE yOU rEqUEstEd cOUld nOt bE fOUnd"
+#: syrup/views/_generics.py:53
+msgid "Cannot be blank."
+msgstr "CAnnOt bE blAnk."
+
#: syrup/views/admin.py:17 templates/courses.xhtml:1
#: templates/admin/index.xhtml:24
msgid "Courses"
@@ -352,8 +437,8 @@
msgstr "TErms"
#: syrup/views/admin.py:60
-msgid "start must precede finish"
-msgstr "stArt mUst prEcEdE fInIsh"
+msgid "The term's start must precede its finish."
+msgstr "ThE tErm's stArt mUst prEcEdE Its fInIsh."
#: syrup/views/admin.py:87
msgid "Targets"
@@ -363,6 +448,29 @@
msgid "Configs"
msgstr "COnfIgs"
+#. I18N: a 'hook' in this context is a locally-defined function.
+#: syrup/views/admin.py:124 syrup/views/admin.py:141
+#, python-format
+msgid "Sorry, cannot perform this operation at this time: hook %r not found."
+msgstr "SOrry, cAnnOt pErfOrm thIs OpErAtIOn At thIs tImE: hOOk %r nOt fOUnd."
+
+#: syrup/views/admin.py:134
+msgid "Courses and departments updated."
+msgstr "COUrsEs And dEpArtmEnts UpdAtEd."
+
+#: syrup/views/admin.py:152
+msgid "Terms updated."
+msgstr "TErms UpdAtEd."
+
+#: syrup/views/admin.py:173
+msgid "No user was selected."
+msgstr "NO UsEr wAs sElEctEd."
+
+#: syrup/views/admin.py:176
+#, python-format
+msgid "Staff user added: %s [%s]."
+msgstr "StAff UsEr AddEd: %s [%s]."
+
#: syrup/views/auth.py:24
msgid "Invalid username or password. Please try again."
msgstr "invAlId UsErnAmE Or pAsswOrd. PlEAsE try AgAIn."
@@ -381,6 +489,10 @@
msgid "Courses with Materials in %s"
msgstr "COUrsEs wIth MAtErIAls In %s"
+#: syrup/views/items.py:47
+msgid "Items of this type are not downloadable."
+msgstr "itEms Of thIs typE ArE nOt dOwnlOAdAblE."
+
#: syrup/views/items.py:76 syrup/views/items.py:238 syrup/views/items.py:266
msgid "You can only add items to headings!"
msgstr "YOU cAn Only Add ItEms tO hEAdIngs!"
@@ -397,6 +509,14 @@
msgid "Sorry, only HEADINGs, URLs and ELECs can be added right now."
msgstr "SOrry, Only HeaDiNGs, uRLs And eLeCs cAn bE AddEd rIght nOw."
+#: syrup/views/items.py:165
+msgid "The title and/or URL are missing."
+msgstr "ThE tItlE And/Or uRL ArE mIssIng."
+
+#: syrup/views/items.py:316 syrup/views/items.py:329
+msgid "Untitled"
+msgstr "untItlEd"
+
#: syrup/views/items.py:395
msgid "Unable to update"
msgstr "unAblE tO UpdAtE"
@@ -421,6 +541,10 @@
msgid "You cannot make an item a descendant of itself!"
msgstr "YOU cAnnOt mAkE An ItEm A dEscEndAnt Of ItsElf!"
+#: syrup/views/sites.py:16
+msgid "The end-term precedes the start-term."
+msgstr "ThE End-tErm prEcEdEs thE stArt-tErm."
+
#: syrup/views/sites.py:34
msgid "You are not allowed to create sites."
msgstr "YOU ArE nOt AllOwEd tO crEAtE sItEs."
@@ -445,6 +569,34 @@
msgid "Instructors only: this site is closed."
msgstr "instrUctOrs Only: thIs sItE Is clOsEd."
+#: syrup/views/sites.py:104
+msgid "Changes saved."
+msgstr "ChAngEs sAvEd."
+
+#: syrup/views/sites.py:110
+#, python-format
+msgid "Security level changed to \"%s\"."
+msgstr "SEcUrIty lEvEl chAngEd tO \"%s\"."
+
+#: syrup/views/sites.py:126
+#, python-format
+msgid "%s has been added as a member (role: %s)."
+msgstr "%s hAs bEEn AddEd As A mEmbEr (rOlE: %s)."
+
+#: syrup/views/sites.py:131
+#, python-format
+msgid "%s: role changed to %s."
+msgstr "%s: rOlE chAngEd tO %s."
+
+#: syrup/views/sites.py:145
+msgid "No group code or section number provided."
+msgstr "NO grOUp cOdE Or sEctIOn nUmbEr prOvIdEd."
+
+#: syrup/views/sites.py:150
+#, python-format
+msgid "Group %s added."
+msgstr "GrOUp %s AddEd."
+
#: syrup/views/sites.py:202
msgid "You cannot join this site."
msgstr "YOU cAnnOt jOIn thIs sItE."
@@ -649,7 +801,7 @@
msgstr "TErm"
#: templates/open_sites.xhtml:19 templates/search_results.xhtml:35
-#: templates/item/item_add_cat_search.xhtml:65
+#: templates/item/item_add_cat_search.xhtml:66
#: templates/item/item_delete_confirm.xhtml:28
#: templates/item/item_metadata.xhtml:46
msgid "Title"
@@ -688,7 +840,7 @@
msgstr[1] "FOUnd %(num)s mAtchEs."
#: templates/search_results.xhtml:35
-#: templates/item/item_add_cat_search.xhtml:65
+#: templates/item/item_add_cat_search.xhtml:66
msgid "Author"
msgstr "aUthOr"
@@ -1063,7 +1215,7 @@
msgstr "aUthOr #%(num)s"
#: templates/item/common_metadata.xhtml:21
-#: templates/item/item_add_cat_search.xhtml:65
+#: templates/item/item_add_cat_search.xhtml:66
#: templates/item/item_metadata.xhtml:50
msgid "Publisher"
msgstr "PUblIshEr"
@@ -1144,33 +1296,33 @@
msgstr[0] "%(first)s rEsUlt."
msgstr[1] "%(first)s–%(last)s Of %(total)s rEsUlts."
-#: templates/item/item_add_cat_search.xhtml:54
+#: templates/item/item_add_cat_search.xhtml:55
#, python-format
msgid "Previous %(count)s"
msgstr "PrEvIOUs %(count)s"
-#: templates/item/item_add_cat_search.xhtml:58
+#: templates/item/item_add_cat_search.xhtml:59
#, python-format
msgid "Next %(count)s"
msgstr "NExt %(count)s"
-#: templates/item/item_add_cat_search.xhtml:65
+#: templates/item/item_add_cat_search.xhtml:66
msgid "PubDate"
msgstr "PUbDAtE"
-#: templates/item/item_add_cat_search.xhtml:73
+#: templates/item/item_add_cat_search.xhtml:74
msgid "details"
msgstr "dEtAIls"
-#: templates/item/item_add_cat_search.xhtml:74
+#: templates/item/item_add_cat_search.xhtml:75
msgid "Electronic resource."
msgstr "elEctrOnIc rEsOUrcE."
-#: templates/item/item_add_cat_search.xhtml:75
+#: templates/item/item_add_cat_search.xhtml:76
msgid "view"
msgstr "vIEw"
-#: templates/item/item_add_cat_search.xhtml:85
+#: templates/item/item_add_cat_search.xhtml:86
msgid "Pick this item"
msgstr "PIck thIs ItEm"
Modified: servres/branches/i18n/conifer/locale/fr_CA/LC_MESSAGES/django.po
===================================================================
--- servres/branches/i18n/conifer/locale/fr_CA/LC_MESSAGES/django.po 2011-03-29 01:53:37 UTC (rev 1292)
+++ servres/branches/i18n/conifer/locale/fr_CA/LC_MESSAGES/django.po 2011-03-29 03:10:29 UTC (rev 1293)
@@ -8,7 +8,7 @@
"Project-Id-Version: Syrup Reserves 0.1\n"
"Report-Msgid-Bugs-To: Graham Fawcett <graham.fawcett at gmail.com>\n"
"POT-Creation-Date: 2011-03-28 20:22+0400\n"
-"PO-Revision-Date: 2011-03-28 21:49-0400\n"
+"PO-Revision-Date: 2011-03-28 23:08-0400\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: fr_CA <LL at li.org>\n"
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
@@ -17,6 +17,36 @@
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.4\n"
+#: integration/uwindsor.py:214
+msgid " (Available)"
+msgstr ""
+
+#: integration/uwindsor.py:218
+#, python-format
+msgid "%(callnum)s (DUE: %(_duetime)s)"
+msgstr ""
+
+#: integration/linktool/app.py:20
+msgid "You are not allowed here."
+msgstr ""
+
+#: integration/linktool/app.py:81 integration/linktool/app.py:105
+#: integration/linktool/app.py:128
+msgid "Sorry, but you are not allowed to create sites."
+msgstr ""
+
+#: integration/linktool/app.py:103 integration/linktool/app.py:126
+msgid "You are not an instructor on this site; you cannot copy it."
+msgstr ""
+
+#: integration/linktool/app.py:108
+msgid "Sorry, but you cannot make an association to such an old site."
+msgstr ""
+
+#: integration/linktool/app.py:113 integration/linktool/app.py:133
+msgid "Sorry, you are not an instructor on this Sakai site."
+msgstr ""
+
#: integration/linktool/templates/associate.xhtml:14
msgid "No associated reserves items."
msgstr ""
@@ -90,6 +120,20 @@
"Please choose from the list below:"
msgstr ""
+#: libsystems/evergreen/item_status.py:19
+msgid "no EG BASE. Did you call support.initialize()?"
+msgstr ""
+
+#: libsystems/evergreen/startup.py:39
+#, python-format
+msgid "Could not open URL to read IDL: %s"
+msgstr ""
+
+#: libsystems/evergreen/startup.py:42
+#, python-format
+msgid "Could not write IDL to file: %s"
+msgstr ""
+
#: syrup/models.py:133
msgid "ILS patron ID"
msgstr ""
@@ -180,9 +224,26 @@
msgstr ""
#: syrup/models.py:251
+msgid "CLOSE"
+msgstr ""
+
+#: syrup/models.py:251
msgid "Accessible only to course-site owners"
msgstr ""
+#: syrup/models.py:282
+msgid "The end-term cannot begin before the start-term."
+msgstr ""
+
+#: syrup/models.py:430
+#, python-format
+msgid "Cannot determine access level for user %s in site %s"
+msgstr ""
+
+#: syrup/models.py:507
+msgid "(internal)"
+msgstr ""
+
#: syrup/models.py:518
msgid "Instructor"
msgstr ""
@@ -221,6 +282,26 @@
msgid "MARCXML"
msgstr ""
+#: syrup/models.py:633
+msgid "unknown"
+msgstr ""
+
+#: syrup/models.py:634
+msgid "fair dealing"
+msgstr ""
+
+#: syrup/models.py:635
+msgid "permission granted"
+msgstr ""
+
+#: syrup/models.py:636
+msgid "licensed content"
+msgstr ""
+
+#: syrup/models.py:637
+msgid "available to students"
+msgstr ""
+
#: syrup/models.py:646
msgid "Normal"
msgstr ""
@@ -325,6 +406,10 @@
msgid "The page you requested could not be found"
msgstr ""
+#: syrup/views/_generics.py:53
+msgid "Cannot be blank."
+msgstr ""
+
#: syrup/views/admin.py:17 templates/courses.xhtml:1
#: templates/admin/index.xhtml:24
msgid "Courses"
@@ -339,7 +424,7 @@
msgstr ""
#: syrup/views/admin.py:60
-msgid "start must precede finish"
+msgid "The term's start must precede its finish."
msgstr ""
#: syrup/views/admin.py:87
@@ -350,6 +435,29 @@
msgid "Configs"
msgstr ""
+#. I18N: a 'hook' in this context is a locally-defined function.
+#: syrup/views/admin.py:124 syrup/views/admin.py:141
+#, python-format
+msgid "Sorry, cannot perform this operation at this time: hook %r not found."
+msgstr ""
+
+#: syrup/views/admin.py:134
+msgid "Courses and departments updated."
+msgstr ""
+
+#: syrup/views/admin.py:152
+msgid "Terms updated."
+msgstr ""
+
+#: syrup/views/admin.py:173
+msgid "No user was selected."
+msgstr ""
+
+#: syrup/views/admin.py:176
+#, python-format
+msgid "Staff user added: %s [%s]."
+msgstr ""
+
#: syrup/views/auth.py:24
msgid "Invalid username or password. Please try again."
msgstr ""
@@ -368,6 +476,10 @@
msgid "Courses with Materials in %s"
msgstr ""
+#: syrup/views/items.py:47
+msgid "Items of this type are not downloadable."
+msgstr ""
+
#: syrup/views/items.py:76 syrup/views/items.py:238 syrup/views/items.py:266
msgid "You can only add items to headings!"
msgstr ""
@@ -384,6 +496,14 @@
msgid "Sorry, only HEADINGs, URLs and ELECs can be added right now."
msgstr ""
+#: syrup/views/items.py:165
+msgid "The title and/or URL are missing."
+msgstr ""
+
+#: syrup/views/items.py:316 syrup/views/items.py:329
+msgid "Untitled"
+msgstr ""
+
#: syrup/views/items.py:395
msgid "Unable to update"
msgstr ""
@@ -408,6 +528,10 @@
msgid "You cannot make an item a descendant of itself!"
msgstr ""
+#: syrup/views/sites.py:16
+msgid "The end-term precedes the start-term."
+msgstr ""
+
#: syrup/views/sites.py:34
msgid "You are not allowed to create sites."
msgstr ""
@@ -432,6 +556,34 @@
msgid "Instructors only: this site is closed."
msgstr ""
+#: syrup/views/sites.py:104
+msgid "Changes saved."
+msgstr ""
+
+#: syrup/views/sites.py:110
+#, python-format
+msgid "Security level changed to \"%s\"."
+msgstr ""
+
+#: syrup/views/sites.py:126
+#, python-format
+msgid "%s has been added as a member (role: %s)."
+msgstr ""
+
+#: syrup/views/sites.py:131
+#, python-format
+msgid "%s: role changed to %s."
+msgstr ""
+
+#: syrup/views/sites.py:145
+msgid "No group code or section number provided."
+msgstr ""
+
+#: syrup/views/sites.py:150
+#, python-format
+msgid "Group %s added."
+msgstr ""
+
#: syrup/views/sites.py:202
msgid "You cannot join this site."
msgstr ""
@@ -635,7 +787,7 @@
msgstr ""
#: templates/open_sites.xhtml:19 templates/search_results.xhtml:35
-#: templates/item/item_add_cat_search.xhtml:65
+#: templates/item/item_add_cat_search.xhtml:66
#: templates/item/item_delete_confirm.xhtml:28
#: templates/item/item_metadata.xhtml:46
msgid "Title"
@@ -674,7 +826,7 @@
msgstr[1] ""
#: templates/search_results.xhtml:35
-#: templates/item/item_add_cat_search.xhtml:65
+#: templates/item/item_add_cat_search.xhtml:66
msgid "Author"
msgstr ""
@@ -1041,7 +1193,7 @@
msgstr ""
#: templates/item/common_metadata.xhtml:21
-#: templates/item/item_add_cat_search.xhtml:65
+#: templates/item/item_add_cat_search.xhtml:66
#: templates/item/item_metadata.xhtml:50
msgid "Publisher"
msgstr ""
@@ -1122,33 +1274,33 @@
msgstr[0] ""
msgstr[1] ""
-#: templates/item/item_add_cat_search.xhtml:54
+#: templates/item/item_add_cat_search.xhtml:55
#, python-format
msgid "Previous %(count)s"
msgstr ""
-#: templates/item/item_add_cat_search.xhtml:58
+#: templates/item/item_add_cat_search.xhtml:59
#, python-format
msgid "Next %(count)s"
msgstr ""
-#: templates/item/item_add_cat_search.xhtml:65
+#: templates/item/item_add_cat_search.xhtml:66
msgid "PubDate"
msgstr ""
-#: templates/item/item_add_cat_search.xhtml:73
+#: templates/item/item_add_cat_search.xhtml:74
msgid "details"
msgstr ""
-#: templates/item/item_add_cat_search.xhtml:74
+#: templates/item/item_add_cat_search.xhtml:75
msgid "Electronic resource."
msgstr ""
-#: templates/item/item_add_cat_search.xhtml:75
+#: templates/item/item_add_cat_search.xhtml:76
msgid "view"
msgstr ""
-#: templates/item/item_add_cat_search.xhtml:85
+#: templates/item/item_add_cat_search.xhtml:86
msgid "Pick this item"
msgstr ""
Modified: servres/branches/i18n/conifer/pybabel-extract
===================================================================
--- servres/branches/i18n/conifer/pybabel-extract 2011-03-29 01:53:37 UTC (rev 1292)
+++ servres/branches/i18n/conifer/pybabel-extract 2011-03-29 03:10:29 UTC (rev 1293)
@@ -131,6 +131,7 @@
os.system(('pybabel extract '
'-F babel.cfg '
'--omit-header '
+ '-c I18N '
'-o %(POTFILE)s .'
) % vars())
Modified: servres/branches/i18n/conifer/syrup/models.py
===================================================================
--- servres/branches/i18n/conifer/syrup/models.py 2011-03-29 01:53:37 UTC (rev 1292)
+++ servres/branches/i18n/conifer/syrup/models.py 2011-03-29 03:10:29 UTC (rev 1293)
@@ -248,7 +248,7 @@
('LOGIN', _('Accessible to all logged-in users')),
('RESTR', _('Accessible to all logged-in users, but only course-site members can read electronic documents.')),
('MEMBR', _('Accessible to course-site members')),
- ('CLOSE', _('Accessible only to course-site owners'))]
+ (_('CLOSE'), _('Accessible only to course-site owners'))]
ACCESS_DEFAULT = getattr(settings, 'SITE_DEFAULT_ACCESS_LEVEL', 'ANON')
assert ACCESS_DEFAULT in [x[0] for x in ACCESS_CHOICES]
@@ -279,7 +279,7 @@
def save(self, *args, **kwargs):
# Assert that the term-order is logical.
assert self.start_term.start <= self.end_term.start, \
- 'The end-term cannot begin before the start-term.'
+ _('The end-term cannot begin before the start-term.')
# Ensure there is always an internal Group.
super(Site, self).save(*args, **kwargs)
internal, just_created = Group.objects.get_or_create(
@@ -427,8 +427,8 @@
elif level == u'MEMBR':
return True
else:
- raise Exception('Cannot determine access level '
- 'for user %s in site %s' % (user, self))
+ raise Exception(_('Cannot determine access level '
+ 'for user %s in site %s') % (user, self))
def allows_downloads_to(self, user):
"""
@@ -504,7 +504,7 @@
def __unicode__(self):
return u"Group('%s', '%s')" % (self.site,
- self.external_id or '(internal)')
+ self.external_id or _('(internal)'))
class Membership(BaseModel):
@@ -630,11 +630,11 @@
# As per discussion with Art Rhyno and Joan Dalton, Leddy Library.
COPYRIGHT_STATUS_CHOICES = [
- ('UK', 'unknown'),
- ('FD', 'fair dealing'),
- ('PG', 'permission granted'),
- ('LC', 'licensed content'),
- ('AV', 'available to students'),
+ ('UK', _('unknown')),
+ ('FD', _('fair dealing')),
+ ('PG', _('permission granted')),
+ ('LC', _('licensed content')),
+ ('AV', _('available to students')),
]
copyright_status = m.CharField(max_length=2,
Modified: servres/branches/i18n/conifer/syrup/views/_generics.py
===================================================================
--- servres/branches/i18n/conifer/syrup/views/_generics.py 2011-03-29 01:53:37 UTC (rev 1292)
+++ servres/branches/i18n/conifer/syrup/views/_generics.py 2011-03-29 03:10:29 UTC (rev 1293)
@@ -50,6 +50,6 @@
def clean(self):
v = self.cleaned_data.get(fieldname) or ''
if not v.strip():
- raise ValidationError('Cannot be blank.')
+ raise ValidationError(_('Cannot be blank.'))
return v.strip()
return clean
Modified: servres/branches/i18n/conifer/syrup/views/admin.py
===================================================================
--- servres/branches/i18n/conifer/syrup/views/admin.py 2011-03-29 01:53:37 UTC (rev 1292)
+++ servres/branches/i18n/conifer/syrup/views/admin.py 2011-03-29 03:10:29 UTC (rev 1293)
@@ -57,7 +57,7 @@
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, _('The term\'s start must precede its finish.')
return cd
admin_terms = generic_handler(TermForm, decorator=admin_only)
@@ -120,8 +120,9 @@
if catalogue is None:
return HttpResponse(
- 'Sorry, cannot perform this operation at this time: '
- 'hook %r not found.' % HOOKNAME)
+ # I18N: a 'hook' in this context is a locally-defined function.
+ _('Sorry, cannot perform this operation at this time: '
+ 'hook %r not found.') % HOOKNAME)
else:
for deptname, ccode, cname in catalogue:
if not (deptname.strip() and ccode.strip() and cname.strip()):
@@ -130,15 +131,15 @@
name=deptname, defaults={'service_desk': desk})
models.Course.objects.get_or_create(
code=ccode, defaults={'department': dept, 'name': cname})
- return simple_message('Courses and departments updated.', '')
+ return simple_message(_('Courses and departments updated.'), '')
def admin_update_terms(request):
HOOKNAME = 'term_catalogue'
catalogue = callhook(HOOKNAME)
if catalogue is None:
return HttpResponse(
- 'Sorry, cannot perform this operation at this time: '
- 'hook %r not found.' % HOOKNAME)
+ _('Sorry, cannot perform this operation at this time: '
+ 'hook %r not found.') % HOOKNAME)
else:
for tcode, tname, start, finish in catalogue:
tcode = tcode.strip(); tname = tname.strip()
@@ -148,7 +149,7 @@
models.Term.objects.get_or_create(
code = tcode,
defaults = dict(name=tname, start=start, finish=finish))
- return simple_message('Terms updated.', '')
+ return simple_message(_('Terms updated.'\), '')
@admin_only
def admin_staff_add(request):
@@ -169,10 +170,10 @@
user.save()
if not userid:
- message = 'No user selected.'
+ message = _('No user was selected.')
message_continue = False
else:
- message = 'Staff user added: %s [%s].' % (user.get_full_name(), user.username)
+ message = _('Staff user added: %s [%s].') % (user.get_full_name(), user.username)
return g.render('admin/staff_add.xhtml', **locals())
Modified: servres/branches/i18n/conifer/syrup/views/items.py
===================================================================
--- servres/branches/i18n/conifer/syrup/views/items.py 2011-03-29 01:53:37 UTC (rev 1292)
+++ servres/branches/i18n/conifer/syrup/views/items.py 2011-03-29 03:10:29 UTC (rev 1293)
@@ -44,7 +44,7 @@
assert request.method == 'POST'
item = get_object_or_404(models.Item, pk=item_id, site__id=site_id)
if item.item_type != 'ELEC':
- return HttpResponseNotFound('Items of this type are not downloadable.')
+ return HttpResponseNotFound(_('Items of this type are not downloadable.'))
else:
# we don't actually need the declaration object for anything; we just
# need to ensure one exists.
@@ -162,7 +162,7 @@
publisher = clean('publisher')
published = clean('published')
if not (title and url):
- raise Exception('Missing title and/or URL.')
+ raise Exception(_('The title and/or URL are missing.'))
else:
item = models.Item(
site=site,
@@ -313,7 +313,7 @@
if bibid > 0:
item = site.item_set.create(parent_heading=parent_item,
- title=dublin.get('dc:title','Untitled'),
+ title=dublin.get('dc:title',_('Untitled')),
author=dublin.get('dc:creator'),
publisher=dublin.get('dc:publisher',''),
published=pubdate,
@@ -326,7 +326,7 @@
**dct)
else:
item = site.item_set.create(parent_heading=parent_item,
- title=dublin.get('dc:title','Untitled'),
+ title=dublin.get('dc:title',_('Untitled')),
author=dublin.get('dc:creator'),
publisher=dublin.get('dc:publisher',''),
published=pubdate,
Modified: servres/branches/i18n/conifer/syrup/views/sites.py
===================================================================
--- servres/branches/i18n/conifer/syrup/views/sites.py 2011-03-29 01:53:37 UTC (rev 1292)
+++ servres/branches/i18n/conifer/syrup/views/sites.py 2011-03-29 03:10:29 UTC (rev 1293)
@@ -13,7 +13,7 @@
cd = self.cleaned_data
if cd['start_term'].start > cd['end_term'].start:
raise ValidationError(
- 'The end-term precedes the start-term.')
+ _('The end-term precedes the start-term.'))
return cd['end_term']
def __init__(self, *args, **kwargs):
@@ -101,13 +101,13 @@
return g.render('edit_site_permissions.xhtml', **locals())
else:
POST = request.POST
- message = 'Changes saved.' # default
+ message = _('Changes saved.') # default
message_iserror = False
if 'action_access_level' in POST:
access = POST.get('access')
site.access = access
- message = 'Security level changed: "%s"' % dict(choices)[access]
+ message = _('Security level changed to "%s".') % dict(choices)[access]
elif 'action_add_member' in POST:
userid = request.POST.get('userid')
@@ -123,12 +123,12 @@
mbr, created = models.Membership.objects.get_or_create(
group=group, user=user, defaults=dict(role=role))
if created:
- message = '%s has been added as a member (role: %s).' % (
+ message = _('%s has been added as a member (role: %s).') % (
user.get_full_name() or user.username, mbr.get_role_display())
else:
mbr.role = role
mbr.save()
- message = '%s: role changed to %s.' % (
+ message = _('%s: role changed to %s.') % (
user.get_full_name() or user.username,
mbr.get_role_display())
@@ -142,12 +142,12 @@
groupcode = POST.get('groupcode','').strip()
if not groupcode:
- message = 'No group code or section number provided.'
+ message = _('No group code or section number provided.')
message_iserror = True
else:
group, created = models.Group.objects.get_or_create(
site=site, external_id=groupcode)
- message = 'Group %s added.' % groupcode
+ message = _('Group %s added.') % groupcode
site.save()
return g.render('edit_site_permissions.xhtml', **locals())
More information about the open-ils-commits
mailing list