Revision: 3991 Author: wikipedian Date: 2007-08-07 16:26:46 +0000 (Tue, 07 Aug 2007)
Log Message: ----------- german translations
Modified Paths: -------------- branches/pywikipedia/i18n/solve_disambiguation.py branches/pywikipedia/i18n/translations/de/LC_MESSAGES/pywikipedia.mo branches/pywikipedia/i18n/translations/de/LC_MESSAGES/pywikipedia.po branches/pywikipedia/i18n/wikipedia.py
Modified: branches/pywikipedia/i18n/solve_disambiguation.py =================================================================== --- branches/pywikipedia/i18n/solve_disambiguation.py 2007-08-07 15:42:17 UTC (rev 3990) +++ branches/pywikipedia/i18n/solve_disambiguation.py 2007-08-07 16:26:46 UTC (rev 3991) @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python # -*- coding: utf-8 -*- """ Script to help a human solve disambiguations by presenting a set of options. @@ -348,18 +348,18 @@ def __iter__(self): # TODO: start yielding before all referring pages have been found refs = [page for page in self.disambPage.getReferences(follow_redirects = False, withTemplateInclusion = False)] - wikipedia.output(u"Found %d references." % len(refs)) + wikipedia.output(_(u'Found %i references.') % len(refs)) # Remove ignorables if ignore_title.has_key(self.disambPage.site().family.name) and ignore_title[self.disambPage.site().family.name].has_key(self.disambPage.site().lang): for ig in ignore_title[self.disambPage.site().family.name][self.disambPage.site().lang]: for i in range(len(refs)-1, -1, -1): if re.match(ig, refs[i].title()): - wikipedia.output('Ignoring page %s' % refs[i].title()) + wikipedia.output(_('Ignoring page %s') % refs[i].title()) del refs[i] elif self.primaryIgnoreManager.isIgnored(refs[i]): #wikipedia.output('Ignoring page %s because it was skipped before' % refs[i].title()) del refs[i] - wikipedia.output(u"Will work on %d pages." % len(refs)) + wikipedia.output(_(u'Will work on %i pages.') % len(refs)) for ref in refs: yield ref
@@ -588,25 +588,26 @@
if not self.always: if edited: - choice = wikipedia.input(u"Option (#, r#, s=skip link, e=edit page, n=next page, u=unlink, q=quit\n" - " m=more context, l=list, a=add new, x=save in this form):") + choice = wikipedia.input(_(u"Option (#, r#, s=skip link, e=edit page, n=next page, u=unlink, q=quit\n" + " m=more context, d=show disambiguation page, l=list, a=add new, v=save in this form):")) else: - choice = wikipedia.input(u"Option (#, r#, s=skip link, e=edit page, n=next page, u=unlink, q=quit\n" - " m=more context, d=show disambiguation page, l=list, a=add new):") + choice = wikipedia.input(_(u"Option (#, r#, s=skip link, e=edit page, n=next page, u=unlink, q=quit\n" + " m=more context, d=show disambiguation page, l=list, a=add new):")) else: choice = self.always - if choice in ['a', 'A']: - newAlternative = wikipedia.input(u'New alternative:') + choice = choice.lower() + if choice == _('a [add new hotkey]'): + newAlternative = wikipedia.input(_(u'New alternative:')) self.alternatives.append(newAlternative) self.listAlternatives() - elif choice in ['e', 'E']: + elif choice == _('e [edit hotkey]'): editor = editarticle.TextEditor() newText = editor.edit(text, jumpIndex = m.start(), highlight = disambPage.title()) # if user didn't press Cancel if newText and newText != text: text = newText break - elif choice in ['d', 'D']: + elif choice == _('d (show disambiguation page hotkey]'): editor = editarticle.TextEditor() if disambPage.isRedirectPage(): disambredir1 = disambPage.getRedirectTarget() @@ -614,33 +615,33 @@ disambigText = editor.edit(disambredir2.get(), jumpIndex = m.start(), highlight = disambredir2.title()) else: disambigText = editor.edit(disambPage.get(), jumpIndex = m.start(), highlight = disambPage.title()) - elif choice in ['l', 'L']: + elif choice == _('l [list hotkey]'): self.listAlternatives() - elif choice in ['m', 'M']: + elif choice == _('m [more context hotkey]'): # show more text around the link we're working on context *= 2 else: break - - if choice in ['e', 'E']: + + if choice == _('e [edit hotkey]'): # user has edited the page and then pressed 'OK' edited = True curpos = 0 continue - elif choice in ['n', 'N']: + elif choice == _('n [next page hotkey]'): # skip this page if self.primary: # If run with the -primary argument, skip this occurence next time. self.primaryIgnoreManager.ignore(refPage) return True - elif choice in ['q', 'Q']: + elif choice == _('q [quit hotkey]'): # quit the program return False - elif choice in ['s', 'S']: + elif choice == _('s [skip hotkey]'): # Next link on this page n -= 1 continue - elif choice in ['x', 'X'] and edited: + elif choice == _('v [save in this form hotkey]') and edited: # Save the page as is break
@@ -660,7 +661,7 @@ if trailing_chars: link_text += trailing_chars
- if choice in ['u', 'U']: + if choice == _('u [unlink hotkey]'): # unlink - we remove the section if there's any text = text[:m.start()] + link_text + text[m.end():] continue @@ -677,12 +678,12 @@ try: choice=int(choice) except ValueError: - wikipedia.output(u"Unknown option") + wikipedia.output(_(u"Unknown option.")) # step back to ask the user again what to do with the current link curpos -= 1 continue if choice >= len(self.alternatives) or choice < 0: - wikipedia.output(u"Choice out of range. Please select a number between 0 and %i." % (len(self.alternatives) - 1)) + wikipedia.output(_(u"Choice out of range. Please select a number between 0 and %i.") % (len(self.alternatives) - 1)) # show list of possible choices self.listAlternatives() # step back to ask the user again what to do with the current link @@ -709,18 +710,18 @@
wikipedia.output(text[max(0,m.start()-30):m.end()+30]) if text == original_text: - wikipedia.output(u'\nNo changes have been made:\n') + wikipedia.output(_(u'\nNo changes have been made.\n')) else: - wikipedia.output(u'\nThe following changes have been made:\n') + wikipedia.output(_(u'\nThe following changes have been made:\n')) wikipedia.showDiff(original_text, text) wikipedia.output(u'') # save the page try: refPage.put_async(text) except wikipedia.LockedPage: - wikipedia.output(u'Page not saved: page is locked') + wikipedia.output(_(u'Page not saved: it is locked.')) except wikipedia.PageNotSaved, error: - wikipedia.output(u'Page not saved: %s' % error.args) + wikipedia.output(_(u'Page not saved: %s') % error.args) return True
def findAlternatives(self, disambPage): @@ -729,17 +730,14 @@ target = disambPage.getRedirectTarget() self.alternatives.append(target) except wikipedia.NoPage: - wikipedia.output(u"The specified page was not found.") - user_input = wikipedia.input(u"""\ -Please enter the name of the page where the redirect should have pointed at, -or press enter to quit:""") - if user_input == "": + wikipedia.output(_(u'The specified page was not found.')) + user_input = wikipedia.input(_(u'Please enter the title of the page where the redirect should have pointed at, or press enter to quit:')) + if user_input == '': sys.exit(1) else: self.alternatives.append(user_input) except wikipedia.IsNotRedirectPage: - wikipedia.output( - u"The specified page is not a redirect. Skipping.") + wikipedia.output(_(u'The specified page is not a redirect. Skipping.')) return False elif self.getAlternatives: try: @@ -752,7 +750,7 @@ links = disambPage2.linkedPages() links = [correctcap(l,disambPage2.get()) for l in links] except wikipedia.NoPage: - wikipedia.output(u"Page does not exist, using the first link in page %s." % disambPage.title()) + wikipedia.output(_(u'Page does not exist, using the first link in page %s.') % disambPage.title()) links = disambPage.linkedPages()[:1] links = [correctcap(l,disambPage.get()) for l in links] else: @@ -760,10 +758,10 @@ links = disambPage.linkedPages() links = [correctcap(l,disambPage.get()) for l in links] except wikipedia.NoPage: - wikipedia.output(u"Page does not exist, skipping.") + wikipedia.output(_(u'Page %s does not exist; skipping.') % disambPage) return False except wikipedia.IsRedirectPage: - wikipedia.output(u"Page is a redirect, skipping.") + wikipedia.output(_(u"Page is a redirect, skipping.")) return False self.alternatives += links return True @@ -857,7 +855,7 @@ if page.exists(): alternatives.append(page.title()) else: - answer = wikipedia.inputChoice(u'Possibility %s does not actually exist. Use it anyway?' + answer = wikipedia.inputChoice(_(u'Page %s does not actually exist. Use it anyway?') % page.title(), ['yes', 'no'], ['y', 'N'], 'N') if answer in ('Y', 'y'): alternatives.append(page.title()) @@ -875,10 +873,10 @@ generator = pagegenerators.CategorizedPageGenerator(wikipedia.getSite().disambcategory(), start = arg[7:]) generator = pagegenerators.NamespaceFilterPageGenerator(generator, [0]) except wikipedia.NoPage: - print "Disambiguation category for your wiki is not known." + wikipedia.output(_(u'Disambiguation category for your wiki is not known.')) raise elif arg.startswith("-"): - print "Unrecognized command line argument: %s" % arg + wikipedia.output(_('Unrecognized command line argument: %s') % arg) # show help text and exit wikipedia.showHelp() else: @@ -894,7 +892,7 @@ # if no disambiguation pages was given as an argument, and none was # read from a file, query the user if not generator: - pageTitle = wikipedia.input(u'On which disambiguation page do you want to work?') + pageTitle = wikipedia.input(_(u'On which disambiguation page do you want to work?')) page = wikipedia.Page(wikipedia.getSite(), pageTitle) generator = iter([page])
Modified: branches/pywikipedia/i18n/translations/de/LC_MESSAGES/pywikipedia.mo =================================================================== (Binary files differ)
Modified: branches/pywikipedia/i18n/translations/de/LC_MESSAGES/pywikipedia.po =================================================================== --- branches/pywikipedia/i18n/translations/de/LC_MESSAGES/pywikipedia.po 2007-08-07 15:42:17 UTC (rev 3990) +++ branches/pywikipedia/i18n/translations/de/LC_MESSAGES/pywikipedia.po 2007-08-07 16:26:46 UTC (rev 3991) @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python Wikipedia Bot Framework\n" -"POT-Creation-Date: 2007-08-07 16:52+CEST\n" -"PO-Revision-Date: 2007-08-07 16:52+0100\n" +"POT-Creation-Date: 2007-08-07 18:15+CEST\n" +"PO-Revision-Date: 2007-08-07 18:20+0100\n" "Last-Translator: Daniel Herding <DHerding {at} gmx {dot} de>\n" "Language-Team: German team pywikipedia-l@lists.wikimedia.org\n" "MIME-Version: 1.0\n" @@ -48,27 +48,37 @@ msgid "unlink" msgstr "entlinken"
-#: selflink.py:111 selflink.py:114 +#: selflink.py:111 +#: selflink.py:114 +#: solve_disambiguation.py:640 msgid "s [skip hotkey]" msgstr "s"
-#: selflink.py:111 selflink.py:117 +#: selflink.py:111 +#: selflink.py:117 +#: solve_disambiguation.py:603 +#: solve_disambiguation.py:626 msgid "e [edit hotkey]" -msgstr "e" +msgstr "b"
-#: selflink.py:111 selflink.py:125 +#: selflink.py:111 +#: selflink.py:125 +#: solve_disambiguation.py:620 msgid "m [more context hotkey]" msgstr "m"
-#: selflink.py:111 selflink.py:131 +#: selflink.py:111 +#: selflink.py:131 +#: solve_disambiguation.py:664 msgid "u [unlink hotkey]" -msgstr "l" +msgstr "e"
#: selflink.py:157 msgid "No changes necessary." msgstr "Keine Änderung nötig."
#: selflink.py:162 +#: solve_disambiguation.py:761 msgid "Page %s does not exist; skipping." msgstr "Seite %s existiert nicht; überspringe."
@@ -84,10 +94,138 @@ msgid "Please enter the XML dump's filename:" msgstr "Bitte gib den Dateinamen des XML-Dumps ein:"
+#: solve_disambiguation.py:351 +msgid "Found %i references." +msgstr "%i Referenzen gefunden." + +#: solve_disambiguation.py:357 +msgid "Ignoring page %s" +msgstr "Ignoriere Seite %s" + +#: solve_disambiguation.py:362 +msgid "Will work on %i pages." +msgstr "Werde auf %i Seiten arbeiten." + +#: solve_disambiguation.py:591 +msgid "" +"Option (#, r#, s=skip link, e=edit page, n=next page, u=unlink, q=quit\n" +" m=more context, d=show disambiguation page, l=list, a=add new, v=save in this form):" +msgstr "" +"Auswahl (#, r#, s=Link überspringen, b=bearbeiten, n=nächste Seite, e=entlinken, q=beenden\n" +" m=mehr Kontext, z=zeige Begriffsklärung, l=Liste, a=neue Alternative, p=so speichern):" + +#: solve_disambiguation.py:594 +msgid "" +"Option (#, r#, s=skip link, e=edit page, n=next page, u=unlink, q=quit\n" +" m=more context, d=show disambiguation page, l=list, a=add new):" +msgstr "" +"Auswahl (#, r#, s=Link überspringen, b=bearbeiten, n=nächste Seite, e=entlinken, q=beenden\n" +" m=mehr Kontext, z=zeige Begriffsklärung, l=Liste, a=neue Alternative):" + +#: solve_disambiguation.py:599 +msgid "a [add new hotkey]" +msgstr "a" + +#: solve_disambiguation.py:600 +msgid "New alternative:" +msgstr "Neue Alternative:" + +#: solve_disambiguation.py:610 +msgid "d (show disambiguation page hotkey]" +msgstr "z" + +#: solve_disambiguation.py:618 +msgid "l [list hotkey]" +msgstr "l" + +#: solve_disambiguation.py:631 +msgid "n [next page hotkey]" +msgstr "n" + +#: solve_disambiguation.py:637 +msgid "q [quit hotkey]" +msgstr "q" + +#: solve_disambiguation.py:644 +msgid "v [save in this form hotkey]" +msgstr "p" + +#: solve_disambiguation.py:681 +msgid "Unknown option." +msgstr "Unbekannte Option." + +#: solve_disambiguation.py:686 +msgid "Choice out of range. Please select a number between 0 and %i." +msgstr "Auswahl nicht im zulässigen Bereich. Bitte wähle eine Nummer zwischen 0 und %i." + +#: solve_disambiguation.py:713 +msgid "" +"\n" +"No changes have been made.\n" +msgstr "" +"\n" +"Es wurden keine Änderungen vorgenommen.\n" + +#: solve_disambiguation.py:715 +msgid "" +"\n" +"The following changes have been made:\n" +msgstr "" +"\n" +"Die folgenden Änderungen wurden gemacht:\n" + +#: solve_disambiguation.py:722 +msgid "Page not saved: it is locked." +msgstr "Seite nicht gespeichert: sie ist gesperrt." + +#: solve_disambiguation.py:724 +msgid "Page not saved: %s" +msgstr "Seite nicht gespeichert: %s" + +#: solve_disambiguation.py:733 +msgid "The specified page was not found." +msgstr "Die angegebene Seite wurde nicht gefunden." + +#: solve_disambiguation.py:734 +msgid "Please enter the name of the page where the redirect should have pointed at, or press enter to quit:" +msgstr "Bitte gib den Titel der Seite ein, auf die der Redirect gezeigt haben soll, oder drücke Enter zum Beenden:" + +#: solve_disambiguation.py:740 +msgid "The specified page is not a redirect. Skipping." +msgstr "Die angegebene Seite ist kein Redirect; überspringe." + +#: solve_disambiguation.py:753 +msgid "Page does not exist, using the first link in page %s." +msgstr "Seite existiert nicht, verwende den ersten Link auf Seite %s." + +#: solve_disambiguation.py:764 +msgid "Page is a redirect, skipping." +msgstr "Seite ist ein Redirect; überspringe." + +#: solve_disambiguation.py:858 +msgid "Page %s does not actually exist. Use it anyway?" +msgstr "Seite %s existiert nicht. Trotzdem verwenden?" + +#: solve_disambiguation.py:876 +msgid "Disambiguation category for your wiki is not known." +msgstr "Begriffsklärungs-Kategorie für dein Wiki ist nicht bekannt." + +#: solve_disambiguation.py:879 +msgid "Unrecognized command line argument: %s" +msgstr "Unbekanntes Kommandozeilenargument: %s" + +#: solve_disambiguation.py:895 +msgid "On which disambiguation page do you want to work?" +msgstr "Mit welcher Begriffsklärungsseite möchtest du arbeiten?" + #: wikipedia.py:552 msgid "Getting page %s" msgstr "Lade Seite %s"
+#: wikipedia.py:890 +msgid "Getting references to %s..." +msgstr "Lade Verweise auf %s..." + #: wikipedia.py:1154 msgid "Creating page %s..." msgstr "Erstelle Seite %s..." @@ -101,12 +239,8 @@ msgstr "Lade %i Seiten von %s..."
#: wikipedia.py:2414 -msgid "" -"Checked for running processes. %i processes currently running, including the " -"current process." -msgstr "" -"Prüfe auf laufende Prozesse. %i Prozesse laufen momentan, diesen Prozess " -"eingeschlossen." +msgid "Checked for running processes. %i processes currently running, including the current process." +msgstr "Prüfe auf laufende Prozesse. %i Prozesse laufen momentan, diesen Prozess eingeschlossen."
#: wikipedia.py:3183 msgid "Getting a page to check if we're logged in on %s..." @@ -115,3 +249,4 @@ #: wikipedia.py:3194 msgid "NOTE: You have unread messages on %s" msgstr "HINWEIS: Du hast ungelesene Nachrichten auf %s" +
Modified: branches/pywikipedia/i18n/wikipedia.py =================================================================== --- branches/pywikipedia/i18n/wikipedia.py 2007-08-07 15:42:17 UTC (rev 3990) +++ branches/pywikipedia/i18n/wikipedia.py 2007-08-07 16:26:46 UTC (rev 3991) @@ -887,7 +887,7 @@ # to avoid duplicates: refPages = set() while path: - output(u'Getting references to %s' % self.aslink()) + output(_(u'Getting references to %s...') % self.aslink()) get_throttle() txt = self.site().getUrl(path) body = BeautifulSoup(txt,
pywikipedia-l@lists.wikimedia.org