diff --git a/session.vim b/session.vim index fa14a92fba..faffaa7e45 100644 --- a/session.vim +++ b/session.vim @@ -1,5 +1,5 @@ " Project wide builtins -let g:pyflakes_builtins += ["dynamic_property", "__", "P", "I", "lopen", "icu_lower", "icu_upper", "icu_title"] +let g:pyflakes_builtins += ["dynamic_property", "__", "P", "I", "lopen", "icu_lower", "icu_upper", "icu_title", "ngettext"] python << EOFPY import os diff --git a/setup/check.py b/setup/check.py index f34e3323a3..8ee77071e7 100644 --- a/setup/check.py +++ b/setup/check.py @@ -64,7 +64,7 @@ class Check(Command): description = 'Check for errors in the calibre source code' BUILTINS = ['_', '__', 'dynamic_property', 'I', 'P', 'lopen', 'icu_lower', - 'icu_upper', 'icu_title'] + 'icu_upper', 'icu_title', 'ngettext'] CACHE = '.check-cache.pickle' def get_files(self, cache): diff --git a/setup/translations.py b/setup/translations.py index c94465a240..2666bb9744 100644 --- a/setup/translations.py +++ b/setup/translations.py @@ -73,9 +73,9 @@ class POT(Command): "Language-Team: LANGUAGE\\n" "MIME-Version: 1.0\\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/calibre\\n" + "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\\n" "Content-Type: text/plain; charset=UTF-8\\n" "Content-Transfer-Encoding: 8bit\\n" - "Generated-By: xgettext\\n" ''')%dict(appname=__appname__, version=__version__, year=time.strftime('%Y'), @@ -90,7 +90,7 @@ class POT(Command): self.info('Creating translations template...') subprocess.check_call(['xgettext', '-f', fl.name, '--default-domain=calibre', '-o', out.name, '-L', 'Python', - '--from-code=UTF-8', '--omit-header', '--sort-by-file', + '--from-code=UTF-8', '--sort-by-file', '--omit-header', '--no-wrap', '-k__', ]) with open(out.name, 'rb') as f: diff --git a/src/calibre/ebooks/metadata/book/base.py b/src/calibre/ebooks/metadata/book/base.py index 1681789528..af9681375b 100644 --- a/src/calibre/ebooks/metadata/book/base.py +++ b/src/calibre/ebooks/metadata/book/base.py @@ -742,7 +742,7 @@ class Metadata(object): ans += [('ISBN', unicode(self.isbn))] ans += [(_('Tags'), u', '.join([unicode(t) for t in self.tags]))] if self.series: - ans += [(_('Series'), unicode(self.series)+ ' #%s'%self.format_series_index())] + ans += [_('Series'), unicode(self.series) + ' #%s'%self.format_series_index()] ans += [(_('Language'), unicode(self.language))] if self.timestamp is not None: ans += [(_('Timestamp'), unicode(self.timestamp.isoformat(' ')))] diff --git a/src/calibre/gui2/dialogs/tag_categories.py b/src/calibre/gui2/dialogs/tag_categories.py index 49f8fc6457..74e4706c04 100644 --- a/src/calibre/gui2/dialogs/tag_categories.py +++ b/src/calibre/gui2/dialogs/tag_categories.py @@ -57,7 +57,7 @@ class TagCategories(QDialog, Ui_TagCategories): lambda: [n for (id, n) in self.db.all_publishers()], lambda: self.db.all_tags() ] - category_names = ['', _('Authors'), _('Series'), _('Publishers'), _('Tags')] + category_names = ['', _('Authors'), ngettext('Series', 'Series', 2), _('Publishers'), _('Tags')] cvals = {} for key,cc in self.db.custom_field_metadata().iteritems(): @@ -284,4 +284,4 @@ class TagCategories(QDialog, Ui_TagCategories): self.category_box.blockSignals(True) self.category_box.clear() self.category_box.addItems(sorted(self.categories.keys(), key=sort_key)) - self.category_box.blockSignals(False) \ No newline at end of file + self.category_box.blockSignals(False) diff --git a/src/calibre/library/field_metadata.py b/src/calibre/library/field_metadata.py index 51511e26d9..f802ae7f7b 100644 --- a/src/calibre/library/field_metadata.py +++ b/src/calibre/library/field_metadata.py @@ -121,7 +121,7 @@ class FieldMetadata(dict): 'datatype':'series', 'is_multiple':{}, 'kind':'field', - 'name':_('Series'), + 'name':ngettext('Series', 'Series', 2), 'search_terms':['series'], 'is_custom':False, 'is_category':True, diff --git a/src/calibre/translations/calibre.pot b/src/calibre/translations/calibre.pot index 69d1dcc04a..b33b18d007 100644 --- a/src/calibre/translations/calibre.pot +++ b/src/calibre/translations/calibre.pot @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: calibre 0.8.9\n" -"POT-Creation-Date: 2011-07-10 13:08+MDT\n" -"PO-Revision-Date: 2011-07-10 13:08+MDT\n" +"POT-Creation-Date: 2011-07-10 13:28+MDT\n" +"PO-Revision-Date: 2011-07-10 13:28+MDT\n" "Last-Translator: Automatically generated\n" "Language-Team: LANGUAGE\n" "MIME-Version: 1.0\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/calibre\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: xgettext\n" #: /home/kovid/work/calibre/src/calibre/customize/__init__.py:56 @@ -2587,7 +2587,9 @@ msgstr "" #: /home/kovid/work/calibre/src/calibre/gui2/preferences/metadata_sources.py:163 #: /home/kovid/work/calibre/src/calibre/library/field_metadata.py:124 msgid "Series" -msgstr "" +msgid_plural "Series" +msgstr[0] "" +msgstr[1] "" #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/book/base.py:746 #: /home/kovid/work/calibre/src/calibre/gui2/preferences/metadata_sources.py:164