From d1abf4ebdc438dd5127694e5bf44d59b7e4fa902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Harald=20S=C3=B8by?= Date: Sun, 6 Apr 2025 16:49:08 +0200 Subject: [PATCH 01/23] Add new i18n function Add i18n function that will output a substing of Module:UKB with the getMessage function, instead of the current gettext setup. --- ukbot/common.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ukbot/common.py b/ukbot/common.py index c77ab63..eeaf913 100644 --- a/ukbot/common.py +++ b/ukbot/common.py @@ -20,6 +20,11 @@ STATE_ENDING = 'ending' STATE_CLOSING = 'closing' +def i18n(*args): + """Returns a string that uses Module:UKB's getMessage function on-wiki""" + if len(args) == 0: + raise ValueError('At least one argument (message key) must be given') + return '{{subst:#invoke:UKB|getMessage|%s}}'.format('|'.join(args)) # Singleton class Localization: From 3c39dd7e5d7383f07a1f36f45a923431349c296b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Harald=20S=C3=B8by?= Date: Mon, 7 Apr 2025 01:04:25 +0200 Subject: [PATCH 02/23] Replace _() with i18n() in main files Replace the _() function with the new i18n() function in all of the main files, except for the "{{Kolonner}}" template, which I'll have to figure out something else for. --- ukbot/common.py | 19 +++++++ ukbot/contest.py | 116 +++++++++++++++++------------------------ ukbot/contributions.py | 52 +++++++----------- ukbot/filters.py | 20 +++---- ukbot/revision.py | 16 ++---- ukbot/sites.py | 10 ++-- ukbot/ukbot.py | 12 ++--- ukbot/user.py | 14 +++-- 8 files changed, 111 insertions(+), 148 deletions(-) diff --git a/ukbot/common.py b/ukbot/common.py index eeaf913..fd947a3 100644 --- a/ukbot/common.py +++ b/ukbot/common.py @@ -26,6 +26,25 @@ def i18n(*args): raise ValueError('At least one argument (message key) must be given') return '{{subst:#invoke:UKB|getMessage|%s}}'.format('|'.join(args)) +def fetch_parsed_i18n(*args): + """Fetch and return the contents of an i18n message""" + # Dummy function for now + """ + Useful query: + { + "action": "parse", + "format": "json", + "title": "Bruker:UKBot", + "text": "{{subst:#invoke:UKB/sandkasse|getMessage|bot-day}}", + "prop": "text", + "pst": 1, + "onlypst": 1, + "disablelimitreport": 1, + "formatversion": "2" + } + """ + return '|'.join(args) + # Singleton class Localization: class __Localization: diff --git a/ukbot/contest.py b/ukbot/contest.py index f534a21..fc34bec 100644 --- a/ukbot/contest.py +++ b/ukbot/contest.py @@ -17,7 +17,7 @@ from mwtemplates import TemplateEditor from .rules import NewPageRule, ByteRule, WordRule, RefRule, ImageRule, TemplateRemovalRule, SectionRule -from .common import _, STATE_ENDING, STATE_CLOSING, InvalidContestPage +from .common import STATE_ENDING, STATE_CLOSING, InvalidContestPage, i18n, fetch_parsed_i18n from .rules import rule_classes from .filters import CatFilter, TemplateFilter, NewPageFilter, ExistingPageFilter, ByteFilter, SparqlFilter, \ BackLinkFilter, ForwardLinkFilter, NamespaceFilter, PageFilter @@ -62,7 +62,7 @@ def get_type(value): for k, v in translations['params'].items(): if v.get('name') == value: return k - raise InvalidContestPage(_('The filter name "%s" was not understood') % value) + raise InvalidContestPage(i18n('bot-filter-misunderstood', value)) self.type = get_type(self.anon_params[1].lower()) @@ -152,11 +152,11 @@ def extract_userlist(self, txt): lst = [] m = re.search(r'==\s*%s\s*==' % self.config['contestPages']['participantsSection'], txt) if not m: - raise InvalidContestPage(_("Couldn't find the list of participants!")) + raise InvalidContestPage(i18n('bot-no-participant-list')) deltakerliste = txt[m.end():] m = re.search('==[^=]+==', deltakerliste) if not m: - raise InvalidContestPage('Fant ingen overskrift etter deltakerlisten!') + raise InvalidContestPage('Couldn\'t find any header following the list of participants!') deltakerliste = deltakerliste[:m.start()] for d in deltakerliste.split('\n'): q = re.search(r'\[\[(?:[^|\]]+):([^|\]]+)', d) @@ -180,7 +180,7 @@ def extract_rules(self, txt, catignore_page=''): dp = TemplateEditor(txt) if config['templates']['rule']['name'] not in dp.templates: - raise InvalidContestPage(_('There are no point rules defined for this contest. Point rules are defined by {{tl|%(template)s}}.') % {'template': config['templates']['rule']['name']}) + raise InvalidContestPage(i18n('bot-no-rules', '{{subst:ns:}}:' + config['templates']['rule']['name'])) #if not 'ukens konkurranse kriterium' in dp.templates.keys(): # raise InvalidContestPage('Denne konkurransen har ingen bidragskriterier. Kriterier defineres med {{tl|ukens konkurranse kriterium}}.') @@ -225,12 +225,12 @@ def extract_rules(self, txt, catignore_page=''): filter_inst = filter_tpl.make(self) except RuntimeError as exp: raise InvalidContestPage( - _('Could not parse {{tlx|%(template)s|%(firstarg)s}} template: %(err)s') - % { - 'template': filter_template_config['name'], - 'firstarg': filter_tpl.anon_params[1], - 'err': str(exp) - } + i18n( + 'bot-no-parse', + '{{subst:ns:10}}:' + filter_template_config['name'], + filter_tpl.anon_params[1], + str(exp) + ) ) nfilters += 1 @@ -254,10 +254,7 @@ def extract_rules(self, txt, catignore_page=''): try: rule_cls = rule_classes_map[rule_name] except: - raise InvalidContestPage( - _('Unkown argument given to {{tl|%(template)s}}: %(argument)s') - % {'template': rulecfg['name'], 'argument': rule_name} - ) + raise InvalidContestPage(i18n('bot-unknown-argument', '{{subst:ns:10}}:' + rulecfg['name'], rule_name)) rule = rule_cls(self.sites, rule_template.parameters, rulecfg) rules.append(rule) @@ -286,7 +283,7 @@ def extract_rules(self, txt, catignore_page=''): try: sdate = self.wiki_tz.localize(datetime.strptime(cleanup_input(template.parameters[2].value), '%Y-%m-%d %H:%M')) except ValueError: - raise InvalidContestPage(_("Couldn't parse the date given to the {{tl|%(template)s}} template.") % sucfg['name']) + raise InvalidContestPage(i18n('bot-unknown-date', '{{subst:ns:10}}:' + sucfg['name'])) #print 'Suspendert bruker:',uname,sdate ufound = False @@ -319,7 +316,7 @@ def extract_rules(self, txt, catignore_page=''): u.disqualified_articles.append(article_key) ufound = True if not ufound: - raise InvalidContestPage(_('Could not find the user %(user)s given to the {{tl|%(template)s}} template.') % {'user': uname, 'template': dicfg['name']}) + raise InvalidContestPage(i18n('bot-unknown-user', uname, '{{subst:ns:10}}:' + dicfg['name'])) pocfg = self.config['templates']['penalty'] if pocfg['name'] in dp.templates: @@ -332,10 +329,7 @@ def extract_rules(self, txt, catignore_page=''): site = self.sites.from_prefix(site_key) if site is None: - raise InvalidContestPage(_('Failed to parse the %(template)s template: Did not find a site matching the site prefix %(prefix)s') % { - 'template': pocfg['name'], - 'prefix': site_key, - }) + raise InvalidContestPage(i18n('bot-parse-no-site', '{{subst:ns:10}}:' + pocfg['name'], site_key)) points = float(cleanup_input(templ.parameters[3].value).replace(',', '.')) reason = cleanup_input(templ.parameters[4].value) @@ -351,10 +345,7 @@ def extract_rules(self, txt, catignore_page=''): }) ufound = True if not ufound: - raise InvalidContestPage(_("Couldn't find the user %(user)s given to the {{tl|%(template)s}} template.") % { - 'user': uname, - 'template': pocfg['name'], - }) + raise InvalidContestPage(i18n('bot-unknown-user', uname, '{{subst:ns:10}}:' + pocfg['name'])) pocfg = self.config['templates']['bonus'] if pocfg['name'] in dp.templates: @@ -372,10 +363,7 @@ def extract_rules(self, txt, catignore_page=''): break if site is None: - raise InvalidContestPage(_('Failed to parse the %(template)s template: Did not find a site matching the site prefix %(prefix)s') % { - 'template': pocfg['name'], - 'prefix': site_key, - }) + raise InvalidContestPage(i18n('bot-parse-no-site', '{{subst:ns:10}}:' + pocfg['name'], site_key)) points = float(cleanup_input(templ.parameters[3].value).replace(',', '.')) reason = cleanup_input(templ.parameters[4].value) @@ -391,10 +379,7 @@ def extract_rules(self, txt, catignore_page=''): }) ufound = True if not ufound: - raise InvalidContestPage(_("Couldn't find the user %(user)s given to the {{tl|%(template)s}} template.") % { - 'user': uname, - 'template': pocfg['name'], - }) + raise InvalidContestPage(i18n('bot-unknown-user', uname, '{{subst:ns:10}}:' + pocfg['name'])) return rules, filters @@ -535,16 +520,13 @@ def plot(self, plotdata): ax.set_xlim(t0, xt[-1]) ax.set_ylim(0, 1.05 * np.max(yall)) - ax.set_xlabel(_('Day')) - ax.set_ylabel(_('Points')) + ax.set_xlabel(fetch_parsed_i18n('bot-day')) + ax.set_ylabel(fetch_parsed_i18n('bot-points')) now = self.server_tz.localize(datetime.now()) - now2 = now.astimezone(self.wiki_tz).strftime(_('%e. %B %Y, %H:%M')) - ax_title = _('Updated %(date)s') - - #print ax_title.encode('utf-8') - #print now2.encode('utf-8') - ax_title = ax_title % {'date': now2} + now2 = now.astimezone(self.wiki_tz).strftime('%Y-%m-%dT%H:%M:%S') + wikiformat_datetime = fetch_parsed_i18n('bot-date-time-format', now2) + ax_title = fetch_parsed_i18n('bot-updated-time', wikiformat_datetime) ax.set_title(ax_title) plt.legend() @@ -575,9 +557,9 @@ def format_msg(self, template_name, awards): def format_heading(self): if self.config.get('contest_type') == 'weekly': if self.startweek == self.endweek: - return _('Weekly contest for week %(week)d') % {'week': self.startweek} + return i18n('bot-weekly-contest-single', self.startweek) else: - return _('Weekly contest for week %(startweek)d–%(endweek)d') % {'startweek': self.startweek, 'endweek': self.endweek} + return i18n('bot-weekly-contest-multiple', self.startweek, self.endweek) else: return self.config.get('name') % {'month': self.month, 'year': self.year} @@ -587,6 +569,7 @@ def deliver_message(self, username, topic, body, sig='~~~~'): prefix = self.sites.homesite.namespaces[3] prefixed = prefix + ':' + username + # FIXME: Remove Flow specific code when Flow is completely removed from Wikimedia wikis res = self.sites.homesite.api(action='query', prop='flowinfo', titles=prefixed) pageinfo = list(res['query']['pages'].values())[0] flow_enabled = 'missing' not in pageinfo and 'enabled' in pageinfo['flowinfo']['flow'] @@ -655,7 +638,7 @@ def deliver_prices(self, results, simulate=False): 'url': self.config['pages']['default'] % dateargs, **dateargs, } - sig = _('Regards') + ' ' + ', '.join(['[[%s:%s|%s]]' % (userprefix, s, s) for s in self.ledere]) + ' ' + _('and') + ' ~~~~' + sig = i18n('bot-greeting', ', '.join(['[[%s:%s|%s]]' % (userprefix, s, s) for s in self.ledere]), '~~~~') if not simulate: cur.execute('SELECT prize_id FROM prizes WHERE contest_id=%s AND site=%s AND user=%s', [contest_id, self.sites.homesite.key, result['name']]) @@ -685,8 +668,8 @@ def deliver_ended_contest_notification(self): raise Exception('No organizer award found in config') for u in self.ledere: mld = self.format_msg('organizer_template', awards) - mld += _('Now you must check if the results look ok. If there are error messages at the bottom of the [[%(page)s|contest page]], you should check that the related contributions have been awarded the correct number of points. Also check if there are comments or complaints on the discussion page. If everything looks fine, [%(link)s click here] (and save) to indicate that I can send out the awards at first occasion.') % {'page': self.name, 'link': link} - sig = _('Thanks, ~~~~') + mld += i18n('bot-note-to-organizer', self.name, link) + sig = i18n('bot-thanks', '~~~~') logger.info('Delivering notification about ended contenst to the contest organizers') self.deliver_message(u, heading, mld, sig) @@ -697,10 +680,10 @@ def deliver_receipt_to_leaders(self): args = {'prefix': self.sites.homesite.site['server'] + self.sites.homesite.site['script'], 'page': 'Special:Contributions'} link = '%(prefix)s?title=%(page)s&contribs=user&target=UKBot&namespace=3' % args - mld = '\n:' + _('Awards have been [%(link)s sent out].') % {'link': link} + mld = '\n:' + i18n('bot-awards-sent', link ) for u in self.ledere: page = self.sites.homesite.pages['%s:%s' % (usertalkprefix, u)] - logger.info('Leverer kvittering til %s', page.name) + logger.info('Sending %s a deliver_receipt_to_leaders', page.name) # Find section number txt = page.text() @@ -708,7 +691,7 @@ def deliver_receipt_to_leaders(self): try: csection = sections.index(heading) + 1 except ValueError: - logger.error('Fant ikke "%s" i "%s', heading, page.name) + logger.error('Couldn\'t find "%s" in "%s"', heading, page.name) return # Append text to section @@ -754,7 +737,7 @@ def deliver_warnings(self, simulate=False): d = [self.sites.homesite.key, self.name, u.name, 'suspension', ''] cur.execute('SELECT id FROM notifications WHERE site=%s AND contest=%s AND user=%s AND class=%s AND args=%s', d) if len(cur.fetchall()) == 0: - msgs.append('Du er inntil videre suspendert fra konkurransen med virkning fra %s. Dette innebærer at dine bidrag gjort etter dette tidspunkt ikke teller i konkurransen, men alle bidrag blir registrert og skulle suspenderingen oppheves i løpet av konkurranseperioden vil også bidrag gjort i suspenderingsperioden telle med. Vi oppfordrer deg derfor til å arbeide med problemene som førte til suspenderingen slik at den kan oppheves.' % u.suspended_since.strftime(_('%e. %B %Y, %H:%M'))) + msgs.append('Du er inntil videre suspendert fra konkurransen med virkning fra %s. Dette innebærer at dine bidrag gjort etter dette tidspunkt ikke teller i konkurransen, men alle bidrag blir registrert og skulle suspenderingen oppheves i løpet av konkurranseperioden vil også bidrag gjort i suspenderingsperioden telle med. Vi oppfordrer deg derfor til å arbeide med problemene som førte til suspenderingen slik at den kan oppheves.' % u.suspended_since.strftime('%e. %B %Y, %H:%M')) if not simulate: cur.execute('INSERT INTO notifications (site, contest, user, class, args) VALUES (%s,%s,%s,%s,%s)', d) discs = [] @@ -886,7 +869,7 @@ def run(self, simulate=False, output=''): if simulate: logger.error(out) else: - self.page.save('dummy', summary=_('UKBot encountered a problem'), appendtext=out) + self.page.save('dummy', summary=fetch_parsed_i18n('bot-problem-encountered'), appendtext=out) raise del user @@ -936,16 +919,16 @@ def run(self, simulate=False, output=''): now = self.server_tz.localize(datetime.now()) if self.state == STATE_ENDING: # Konkurransen er nå avsluttet – takk til alle som deltok! Rosetter vil bli delt ut så snart konkurransearrangøren(e) har sjekket resultatene. - out += "''" + _('This contest is closed – thanks to everyone who participated! Awards will be sent out as soon as the contest organizer has checked the results.') + "''\n\n" + out += "''" + i18n('bot-contest-limbo') + "''\n\n" elif self.state == STATE_CLOSING: - out += "''" + _('This contest is closed – thanks to everyone who participated!') + "''\n\n" + out += "''" + i18n('bot-contest-closed') + "''\n\n" else: oargs = { - 'lastupdate': now.astimezone(self.wiki_tz).strftime(_('%e. %B %Y, %H:%M')), - 'startdate': self.start.strftime(_('%e. %B %Y, %H:%M')), - 'enddate': self.end.strftime(_('%e. %B %Y, %H:%M')) + 'lastupdate': now.astimezone(self.wiki_tz).strftime('%Y-%m-%dT%H:%M:%S'), + 'startdate': self.start.strftime('%Y-%m-%dT%H:%M:%S'), + 'enddate': self.end.strftime('%Y-%m-%dT%H:%M:%S') } - out += "''" + _('Last updated %(lastupdate)s. The contest is open from %(startdate)s to %(enddate)s.') % oargs + "''\n\n" + out += "''" + i18n('bot-contest-last-updated', i18n('bot-date-time-format', oargs['lastupdate']), i18n('bot-date-format', oargs['startdate']), i18n('bot-date-format', oargs['enddate'])) + "''\n\n" # FIXME for i, result in enumerate(results): awards = '' @@ -966,7 +949,7 @@ def run(self, simulate=False, output=''): if len(err) > 8: err = err[:8] err.append('(...)') - errors.append('\n* ' + _('UKBot encountered the following problems with the page [[%s]]') % art + ''.join(['\n** %s' % e for e in err])) + errors.append('\n* ' + i18n('bot-page-problem', art ) + ''.join(['\n** %s' % e for e in err])) for site in self.sites.sites.values(): for error in site.errors: @@ -1000,10 +983,7 @@ def run(self, simulate=False, output=''): except StopIteration: if 'resultsSection' not in config['contestPages']: - raise InvalidContestPage(_('Results markers %(start_marker)s and %(end_marker)s not found') % { - 'start_marker': '', - 'end_marker': '', - }) + raise InvalidContestPage(i18n('bot-result-markers-not-found', '<!-- Begin:ResultsSection -->', '<!-- End:ResultsSection -->' ) for s in re.finditer(r'^[\s]*==([^=]+)==[\s]*\n', txt, flags=re.M): if s.group(1).strip() == config['contestPages']['resultsSection']: secstart = s.end() @@ -1011,9 +991,7 @@ def run(self, simulate=False, output=''): secend = s.start() break if secstart == -1: - raise InvalidContestPage(_('No "%(section_name)s" section found.') % { - 'section_name': config['contestPages']['resultsSection'], - }) + raise InvalidContestPage(i18n('bot-no-named-section', config['contestPages']['resultsSection'])) if secend == -1: txt = txt[:secstart] + out else: @@ -1021,11 +999,11 @@ def run(self, simulate=False, output=''): logger.info('Updating wiki') if self.state == STATE_ENDING: - self.page.save(txt, summary=_('Updating with final results, the contest is now closed.')) + self.page.save(txt, summary=fetch_parsed_i18n('bot-updating-results')) elif self.state == STATE_CLOSING: - self.page.save(txt, summary=_('Checking results and handing out awards')) + self.page.save(txt, summary=fetch_parsed_i18n('bot-checking-results')) else: - self.page.save(txt, summary=_('Updating')) + self.page.save(txt, summary=fetch_parsed_i18n('bot-updating')) if output != '': logger.info("Writing output to file") @@ -1155,7 +1133,7 @@ def run(self, simulate=False, output=''): txt2 = dp.wikitext() if txt != txt2: if not simulate: - oppslagstavle.save(txt2, summary=_('The weekly contest is: %(link)s') % {'link': tema}) + oppslagstavle.save(txt2, summary=i18n('bot-weekly-contest-is', tema) # Make a nice plot diff --git a/ukbot/contributions.py b/ukbot/contributions.py index 45a4e20..2ca48b1 100644 --- a/ukbot/contributions.py +++ b/ukbot/contributions.py @@ -2,7 +2,7 @@ # vim: fenc=utf-8 et sw=4 ts=4 sts=4 ai import logging import weakref -from .common import _, ngettext +from .common import i18n, fetch_parsed_i18n logger = logging.getLogger(__name__) @@ -161,30 +161,21 @@ def format(self, homesite): suspended = '' if self.user().suspended_since is not None: - suspended = ', ' + _('suspended since') + ' %s' % self.user().suspended_since.strftime(_('%A, %H:%M')) + suspended = ', ' + i18n('bot-suspended-since', i18n('bot-format-date-time', self.user().suspended_since.strftime('%Y-%m-%dT%H:%M:%S'))) - user_prefix = homesite.namespaces[2] - - out = '=== %s [[%s:%s|%s]] (%.f p%s) ===\n' % ( - award_icon, - user_prefix, - self.user().name, - self.user().name, - self.sum(), - suspended - ) + out = '=== %s %s ===' % ( award_icon, i18n('bot-results-user-heading', '[[{{subst:ns:2}}:%s|%s]]' % (self.user().name, self.user().name), self.sum(), suspended)) if len(entries) == 0: - out += "''%s''" % _('No qualifying contributions registered yet') + out += "''%s''" % i18n('bot-no-contributions-yet') else: sum_bytes = sum([item['value'] for item in self.user().count_bytes_per_site()]) - out += ngettext('%d article', '%d articles', len(entries)) % len(entries) + out += i18n('bot-article-number', len(entries)) out += ', ' out += '{{formatnum:%.2f}} kB' % (sum_bytes / 1000.) out += '\n' if len(entries) > 10: - out += _('{{Kolonner}}') + '\n' + out += _('{{Kolonner}}') + '\n' # FIXME out += '\n'.join(entries) out += '\n\n' @@ -218,7 +209,7 @@ def summarize_revision(self, revision, homesite): if len(revision_contribs) == 0: return None - formatted = '[[%s|%s]]: ' % (revision.get_link(homesite), revision.wiki_tz.strftime(_('%d.%m, %H:%M'))) + formatted = '[[%s|%s]]: ' % (revision.get_link(homesite), i18n('bot-date-time-format-short', revision.wiki_tz.strftime('%Y-%m-%dT%H:%M:%S'))) # Make a formatted string on this form: # 10.0 p (ny side) + 9.7 p (967 byte) + 5.4 p (54 ord) + 10.0 p (2 kilder) @@ -226,16 +217,16 @@ def summarize_revision(self, revision, homesite): for contribution in revision_contribs: desc = contribution.description if contribution.capped: - desc += ', ' + _('capped at max') - contrib_points.append('%.1f p (%s)' % (contribution.points, desc)) + desc += ', ' + i18n('bot-capped-at-max') + contrib_points.append(i18n('bot-points-short', '%.1f' % contribution.points, desc)) formatted += ' + '.join(contrib_points) # Add deductions, if any for deduction in revision.point_deductions: if deduction[0] > 0: - formatted += ' − %.1f p (%s)' % (deduction[0], deduction[1]) + formatted += ' − %s' % i18n('bot-points-short', '%.1f' % deduction[0], deduction[1]) else: - formatted += ' + %.1f p (%s)' % (- deduction[0], deduction[1]) + formatted += ' + %s' % i18n('bot-points-short', '%.1f' % deduction[0], deduction[1]) # Strikeout if revision was in suspended period if self.user().suspended_since is not None and revision.utc > self.user().suspended_since: @@ -262,7 +253,7 @@ def summarize_article(self, article, revisions_formatted): tooltip_text = '' try: cat_path = [x.split(':')[-1] for x in article.cat_path] - tooltip_text = "''" + _('Category hit') + "'': " + ' > '.join(cat_path) + '
' + tooltip_text = "''" + i18n('bot-category-hit') + "'': " + ' > '.join(cat_path) + '
' except AttributeError: pass tooltip_text += '
'.join(revisions_formatted) @@ -274,11 +265,8 @@ def summarize_article(self, article, revisions_formatted): # titletxt += '
\'\'' + _('Notes') + ':\'\'
%s
' % '
'.join(pds) if article.words > 0: - tooltip_text += '
%s.
' % ( - _('Total: %(bytecount)d bytes, %(wordcount)d words') % { - 'bytecount': article.bytes, - 'wordcount': article.words - } + tooltip_text += '
%s.
' % ( # FIXME inline styling + i18n('bot-byte-word-count', article.bytes, article.words) ) if article.name in self.labels: @@ -288,21 +276,21 @@ def summarize_article(self, article, revisions_formatted): else: formatted = '[[%s|%s]]' % (article.link(), article.name) if article.key in self.user().disqualified_articles: - formatted = '[[File:Qsicon Achtung.png|14px]] ' + formatted + '' - tooltip_text += '
%s
' % ( - _('Note: The contributions to this article are currently disqualified.') + formatted = '[[File:Qsicon Achtung.png|14px]] ' + formatted + '' # FIXME inline image + tooltip_text += '
%s
' % ( # FIXME inline styling + i18n('bot-disqualified-note') ) elif brutto != netto: - formatted = '[[File:Qsicon Achtung.png|14px]] ' + formatted + formatted = '[[File:Qsicon Achtung.png|14px]] ' + formatted # FIXME inline image # titletxt += '
Merk: # En eller flere revisjoner er ikke talt med fordi de ble gjort mens brukeren var suspendert. # Hvis suspenderingen oppheves vil bidragene telle med.
' if article.new: - formatted += ' ' + _('N') + formatted += ' ' + i18n('bot-new-page-abbr') if article.site().host == 'www.wikidata.org': - formatted += ' ' + _('W') + formatted += ' ' + i18n('bot-wikidata-abbr') points = '%.1f p' % brutto if brutto != netto: diff --git a/ukbot/filters.py b/ukbot/filters.py index 85b0320..83aa121 100644 --- a/ukbot/filters.py +++ b/ukbot/filters.py @@ -13,7 +13,7 @@ from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import Retry from mwtemplates.templateeditor2 import TemplateParseError -from .common import _, InvalidContestPage +from .common import InvalidContestPage, i18n from .site import WildcardPage from typing import List, Union, Optional @@ -147,7 +147,7 @@ class TemplateFilter(Filter): @classmethod def make(cls, tpl, **kwargs): if len(tpl.anon_params) < 3: - raise RuntimeError(_('Too few arguments given to this template.')) + raise RuntimeError(i18n('bot-too-few-arguments')) params = { 'sites': tpl.sites, @@ -195,11 +195,7 @@ def test_page(self, page): except TemplateParseError as e: logger.warning('TemplateParser failed to parse %s', page.key) page.site().errors.append( - _('Could not analyze page %(article)s because the revision %(rev)d could not be parsed: %(error)s') % { - 'article': page.key, - 'rev': rev.parentid, - 'error': str(e), - } + i18n('bot-unable-to-analyze', page.key, rev.parentid, str(e)) ) if template_name is None: @@ -230,12 +226,12 @@ def get_ignore_list(tpl: 'FilterTemplate', page_name: str): m = re.search(r'
(.*?)
', catignore_txt, flags=re.DOTALL) return m.group(1).strip().splitlines() except (IndexError, KeyError): - raise RuntimeError(_('Could not parse the catignore page')) + raise RuntimeError(i18n('bot-catignore-parse-error')) @classmethod def make(cls, tpl: 'FilterTemplate', **kwargs): if len(tpl.anon_params) < 3: - raise RuntimeError(_('No category values given!')) + raise RuntimeError(i18n('bot-no-category-values')) params = { 'sites': tpl.sites, @@ -441,7 +437,7 @@ def filter(self, articles: 'Articles') -> 'Articles': ) except CategoryLoopError as err: loop = ' → '.join(['[[:%s|]]' % c.replace('.wikipedia.org', '') for c in err.catpath]) - article.errors.append(_('Encountered an infinite category loop: ') + loop) + article.errors.append(i18n('bot-category-loop', loop)) dt = time.time() - t0 logger.debug('CatFilter: Checked categories for %d articles in %.1f secs', len(articles), dt) @@ -480,7 +476,7 @@ class ByteFilter(Filter): @classmethod def make(cls, tpl, sites, **kwargs): if len(tpl.anon_params) < 3: - raise RuntimeError(_('No byte limit (second argument) given')) + raise RuntimeError(i18n('bot-no-byte-limit')) params = { 'sites': tpl.sites, 'bytelimit': int(tpl.anon_params[2]), @@ -717,7 +713,7 @@ class SparqlFilter(Filter): @classmethod def make(cls, tpl, cfg, **kwargs): if not tpl.has_param('query'): - raise RuntimeError(_('No "%s" parameter given') % cfg['params']['query']) + raise RuntimeError(i18n('bot-no-parameter', cfg['params']['query'])) params = { 'query': tpl.get_raw_param('query'), 'sites': tpl.sites, diff --git a/ukbot/revision.py b/ukbot/revision.py index 97008de..d362164 100644 --- a/ukbot/revision.py +++ b/ukbot/revision.py @@ -9,7 +9,7 @@ import pytz from mwtemplates import TemplateEditor from mwtextextractor import get_body_text -from .common import _ +from .common import i18n logger = logging.getLogger(__name__) @@ -129,22 +129,12 @@ def words(self): self.revid, self.article().site().key, self.bytes, charcount, self._wordcount) if not self.new and words0 == 0 and self._wordcount > 1: - w = _('Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The word count difference might be wrong, because no words were found in the parent revision (%(parentid)s) of size %(size)d, possibly due to unclosed tags or templates in that revision.') % { - 'host': self.article().site().host, - 'revid': self.revid, - 'parentid': self.parentid, - 'size': len(self.parenttext) - } + w = i18n('bot-count-no-words', '[//%s/w/index.php?diff=prev&oldid=%s %s]' % (self.article().site().host, self.revid, self.revid), self.parentid, len(self.parenttext)) logger.warning(w) self.errors.append(w) elif self._wordcount > 10 and self._wordcount > self.bytes: - w = _('Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The word count difference might be wrong, because the word count increase (%(words)d) is larger than the byte increase (%(bytes)d). Wrong word counts can occur for invalid wiki text.') % { - 'host': self.article().site().host, - 'revid': self.revid, - 'words': self._wordcount, - 'bytes': self.bytes - } + w = i18n('bot-word-count-incorrect', '[//%s/w/index.php?diff=prev&oldid=%s %s]' % (self.article().sit().host, self.revid, self.revid), self._wordcount, self.bytes) logger.warning(w) self.errors.append(w) diff --git a/ukbot/sites.py b/ukbot/sites.py index 646272c..2002a83 100644 --- a/ukbot/sites.py +++ b/ukbot/sites.py @@ -1,7 +1,7 @@ # encoding=utf-8 # vim: fenc=utf-8 et sw=4 ts=4 sts=4 ai import logging -from .common import _, InvalidContestPage +from .common import InvalidContestPage, i18n from .db import db_conn from .site import WildcardPage, Site @@ -60,9 +60,7 @@ def resolve_page(self, value, default_ns=0, force_ns=False): else: page = site.pages[value] if not page.exists: - raise InvalidContestPage(_('Page does not exist: [[%(pagename)s]]') % { - 'pagename': site.link_to(page) - }) + raise InvalidContestPage(i18n('bot-page-doesnt-exist', ':' + site.link_to(page))) return page def from_prefix(self, key, raise_on_error=False): @@ -77,9 +75,7 @@ def from_prefix(self, key, raise_on_error=False): if site.match_prefix(key): return site if raise_on_error: - raise InvalidContestPage(_('Could not found a site matching the prefix "%(key)s"') % { - 'key': key - }) + raise InvalidContestPage(i18n('bot-site-not-found', key)) def only(self, sites): return SiteManager(sites, self.homesite) diff --git a/ukbot/ukbot.py b/ukbot/ukbot.py index fbf0d28..c944a59 100644 --- a/ukbot/ukbot.py +++ b/ukbot/ukbot.py @@ -18,7 +18,7 @@ import platform from dotenv import load_dotenv -from .common import get_mem_usage, Localization, _, STATE_NORMAL, InvalidContestPage +from .common import get_mem_usage, STATE_NORMAL, InvalidContestPage, i18n, fetch_parsed_i18n from .util import load_config from .contest import Contest from .contests import discover_contest_pages @@ -110,8 +110,6 @@ def main(): working_dir = os.path.realpath(os.getcwd()) logger.info('Working dir: %s', working_dir) - Localization().init(config['locale']) - mainstart = config['server_timezone'].localize(datetime.now()) mainstart_s = time.time() @@ -145,10 +143,10 @@ def main(): if status_template in te.templates: te.templates[status_template][0].parameters[1] = 'error' te.templates[status_template][0].parameters[2] = error_msg - contest_page.save(te.wikitext(), summary=_('UKBot encountered a problem')) + contest_page.save(te.wikitext(), summary=fetch_parsed_i18n('bot-problem-encountered')) else: out = '\n{{%s | error | %s }}' % (config['templates']['botinfo'], error_msg) - contest_page.save('dummy', summary=_('UKBot encountered a problem'), appendtext=out) + contest_page.save('dummy', summary=fetch_parsed_i18n('bot-problem-encountered'), appendtext=out) raise # Update redirect page @@ -166,9 +164,9 @@ def main(): pages = [pages] for pagename in pages: page = sites.homesite.pages[pagename] - txt = _('#REDIRECT [[%s]]') % contest_name + txt = '#REDIRECT [[%s]]'.format(contest_name) # FIXME – localize REDIRECT if page.text() != txt and not args.simulate: - page.save(txt, summary=_('Redirecting to %s') % contest_name) + page.save(txt, summary=fetch_parsed_i18n('bot-redirecting', contest_name) runend = config['server_timezone'].localize(datetime.now()) runend_s = time.time() diff --git a/ukbot/user.py b/ukbot/user.py index b4db838..70f8d17 100644 --- a/ukbot/user.py +++ b/ukbot/user.py @@ -15,7 +15,7 @@ from more_itertools import first from .contributions import UserContributions -from .common import _ +from .common import i18n from .db import result_iterator from .util import unix_time from .article import Article @@ -671,16 +671,14 @@ def format_result(self): suspended = '' if self.suspended_since is not None: - suspended = ', ' + _('suspended since') + ' %s' % self.suspended_since.strftime(_('%A, %H:%M')) - userprefix = self.contest().sites.homesite.namespaces[2] - out = '=== %s [[%s:%s|%s]] (%.f p%s) ===\n' % (ros, userprefix, self.name, self.name, - self.contributions.sum(), suspended) + suspended = ', ' + i18n('bot-suspended-since', i18n('bot-date-time-format', self.suspended_since.strftime('%Y-%m-%dT%H:%M:%S'))) + out = '=== %s %s ===' % (ros, i18n('bot-results-user-heading', '[[{{subst:ns:2}}:%s|%s]]'.format(self.name, self.name), self.contributinos.sum(), suspended)) if len(entries) == 0: - out += "''" + _('No qualifying contributions registered yet') + "''" + out += "''" + i18n('bot-no-contributions-yet') + "''" else: - out += '%s, {{formatnum:%.2f}} kB\n' % (_('articles') % {'articlecount': len(entries)}, self.bytes / 1000.) + out += i18n('bot-articles-kb', len(entries), '%0.2f' % self.bytes / 1000.) if len(entries) > 10: - out += _('{{Kolonner}}\n') + out += _('{{Kolonner}}\n') # FIXME out += '\n'.join(entries) out += '\n\n' From cad9cc565a45cfb8dc1ce233a78b19646e55b520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Harald=20S=C3=B8by?= Date: Mon, 7 Apr 2025 01:20:25 +0200 Subject: [PATCH 03/23] Remove commented-out code Remove code that has been commented out for various reasons; most (all?) of this is several years old, and I doubt even Dan Michael will remember what the purpose of it is/was. --- ukbot/article.py | 2 - ukbot/common.py | 1 - ukbot/contest.py | 50 ++----------------------- ukbot/contributions.py | 49 ------------------------ ukbot/filters.py | 55 --------------------------- ukbot/revision.py | 7 +--- ukbot/rules/ref.py | 5 ++- ukbot/server.py | 2 - ukbot/user.py | 85 ------------------------------------------ ukbot/util.py | 2 - 10 files changed, 8 insertions(+), 250 deletions(-) diff --git a/ukbot/article.py b/ukbot/article.py index 2ad606a..ac79dfb 100644 --- a/ukbot/article.py +++ b/ukbot/article.py @@ -55,8 +55,6 @@ def created_at(self): ts = next(res)['timestamp'] self._created_at = pytz.utc.localize(datetime.fromtimestamp(time.mktime(ts))) - # self._created = time.strftime('%Y-%m-%d %H:%M:%S', ts) - # datetime.fromtimestamp(rev.timestamp).strftime('%F %T') cur.execute( 'INSERT INTO articles (site, name, created_at) VALUES (%s, %s, %s)', [self.site().key, self.key, self._created_at.strftime('%Y-%m-%d %H:%M:%S')] diff --git a/ukbot/common.py b/ukbot/common.py index fd947a3..28414ab 100644 --- a/ukbot/common.py +++ b/ukbot/common.py @@ -11,7 +11,6 @@ logger = logging.getLogger(__name__) -# LOCALE_PATH = pkg_resources.resource_filename('ukbot', 'locale/') LOCALE_PATH = os.path.join(os.path.dirname(os.path.dirname(__file__)), "locale") logger.info('Locale path: %s', LOCALE_PATH) diff --git a/ukbot/contest.py b/ukbot/contest.py index fc34bec..a4c013c 100644 --- a/ukbot/contest.py +++ b/ukbot/contest.py @@ -182,19 +182,12 @@ def extract_rules(self, txt, catignore_page=''): if config['templates']['rule']['name'] not in dp.templates: raise InvalidContestPage(i18n('bot-no-rules', '{{subst:ns:}}:' + config['templates']['rule']['name'])) - #if not 'ukens konkurranse kriterium' in dp.templates.keys(): - # raise InvalidContestPage('Denne konkurransen har ingen bidragskriterier. Kriterier defineres med {{tl|ukens konkurranse kriterium}}.') - - ######################## Read infobox ######################## infobox = parse_infobox(txt, self.sites.homesite.namespaces[2], self.config) self.start = infobox['start_time'] self.end = infobox['end_time'] - # args = {'week': commonargs['week'], 'year': commonargs['year'], 'start': ibcfg['start'], 'end': ibcfg['end'], 'template': ibcfg['name']} - # raise InvalidContestPage(_('Did not find %(week)s+%(year)s or %(start)s+%(end)s in {{tl|%(templates)s}}.') % args) - self.year = self.start.isocalendar()[0] self.startweek = self.start.isocalendar()[1] self.endweek = self.end.isocalendar()[1] @@ -210,7 +203,6 @@ def extract_rules(self, txt, catignore_page=''): ######################## Read filters ######################## nfilters = 0 - # print dp.templates.keys() filter_template_config = config['templates']['filters'] if filter_template_config['name'] in dp.templates: for template in dp.templates[filter_template_config['name']]: @@ -285,7 +277,6 @@ def extract_rules(self, txt, catignore_page=''): except ValueError: raise InvalidContestPage(i18n('bot-unknown-date', '{{subst:ns:10}}:' + sucfg['name'])) - #print 'Suspendert bruker:',uname,sdate ufound = False for u in self.users: if u.name == uname: @@ -295,7 +286,6 @@ def extract_rules(self, txt, catignore_page=''): if not ufound: pass # TODO: logging.warning - #raise InvalidContestPage('Fant ikke brukeren %s gitt til {{tl|UK bruker suspendert}}-malen.' % uname) dicfg = self.config['templates']['disqualified'] if dicfg['name'] in dp.templates: @@ -412,7 +402,6 @@ def plot(self, plotdata): fig = plt.figure(figsize=(w, h)) ax = fig.add_subplot(1, 1, 1, frame_on=True) - # ax.grid(True, which='major', color='gray', alpha=0.5) fig.subplots_adjust(left=0.10, bottom=0.09, right=0.65, top=0.94) t0 = float(unix_time(self.start)) @@ -445,7 +434,6 @@ def plot(self, plotdata): y.append(y[-1]) l = ax.plot(x, y, linewidth=1.2, label=result['name']) # markerfacecolor='#FF8C00', markeredgecolor='#888888', label = u['name']) c = l[0].get_color() - #ax.plot(x[1:-1], y[1:-1], marker='.', markersize=4, markerfacecolor=c, markeredgecolor=c, linewidth=0., alpha=0.5) # markerfacecolor='#FF8C00', markeredgecolor='#888888', label = u['name']) if cnt >= 15: break @@ -495,12 +483,6 @@ def plot(self, plotdata): ax.set_xticks(x_ticks_minor, minor=True) x_ticks_minor_size = 3 - # ax.set_xticklabels(['1', '', '', '', '5', '', '', '', '', '10', '', '', '', '', '15', '', '', '', '', '20', '', '', '', '', '25', '', '', '', '', '30'], minor=True) - # elif ndays == 31: - # ax.set_xticklabels(['1', '', '', '', '5', '', '', '', '', '10', '', '', '', '', '15', '', '', '', '', '20', '', '', '', '', '25', '', '', '', '', '', '31'], minor=True) - - - for i in range(1, ndays, 2): ax.axvspan(xt[i], xt[i + 1], facecolor='#000099', linewidth=0., alpha=0.03) @@ -532,7 +514,6 @@ def plot(self, plotdata): plt.legend() ax = plt.gca() ax.legend( - # ncol = 4, loc = 3, bbox_to_anchor = (0., 1.02, 1., .102), mode = "expand", borderaxespad = 0. loc=2, bbox_to_anchor=(1.0, 1.0), borderaxespad=0., frameon=0. ) figname = os.path.join(self.project_dir, self.config['plot']['figname'] % {'year': self.year, 'week': self.startweek, 'month': self.month}) @@ -600,9 +581,6 @@ def deliver_prices(self, results, simulate=False): logger.info('Delivering prices for contest %d' % (contest_id,)) - # self.sql.commit() - # cur.close() - for i, result in enumerate(results): prices = [] @@ -731,6 +709,7 @@ def deliver_warnings(self, simulate=False): """ usertalkprefix = self.sites.homesite.namespaces[3] cur = self.sql.cursor() + # FIXME: Fix hard-coded Norwegian messages (or remove this functionality completely?) for u in self.users: msgs = [] if u.suspended_since is not None: @@ -761,16 +740,10 @@ def deliver_warnings(self, simulate=False): heading = '== Viktig informasjon angående Ukens konkurranse uke %d ==' % self.startweek else: heading = '== Viktig informasjon angående Ukens konkurranse uke %d–%d ==' % (self.startweek, self.endweek) - #msg = 'Arrangøren av denne [[%(pagename)s|ukens konkurranse]] har registrert problemer ved noen av dine bidrag: - #så langt. Det er dessverre registrert problemer med enkelte av dine bidrag som medfører at vi er nødt til å informere deg om følgende:\n' % { 'pagename': self.name } msg = ''.join(['* %s\n' % m for m in msgs]) msg += 'Denne meldingen er generert fra anmerkninger gjort av konkurransearrangør på [[%(pagename)s|konkurransesiden]]. Du finner mer informasjon på konkurransesiden og/eller tilhørende diskusjonsside. Så lenge konkurransen ikke er avsluttet, kan problemer løses i løpet av konkurransen. Om du ønsker det, kan du fjerne denne meldingen når du har lest den. ~~~~' % {'pagename': self.name} - #print '------------------------------',u.name - #print msg - #print '------------------------------' - page = self.sites.homesite.pages['%s:%s' % (usertalkprefix, u.name)] logger.info('Leverer advarsel til %s', page.name) if simulate: @@ -792,13 +765,7 @@ def run(self, simulate=False, output=''): stats = [] - # extraargs = {'namespace': 0} extraargs = {} - # host_filter = None - # for f in self.filters: - # if isinstance(f, NamespaceFilter): - # extraargs['namespace'] = '|'.join(f.namespaces) - # host_filter = f.site article_errors = {} results = [] @@ -883,7 +850,6 @@ def run(self, simulate=False, output=''): # Make outpage out = '' - #out += '[[File:Nowp Ukens konkurranse %s.svg|thumb|400px|Resultater (oppdateres normalt hver natt i halv ett-tiden, viser kun de ti med høyest poengsum)]]\n' % self.start.strftime('%Y-%W') summary_tpl = None if 'status' in config['templates']: @@ -918,7 +884,6 @@ def run(self, simulate=False, output=''): now = self.server_tz.localize(datetime.now()) if self.state == STATE_ENDING: - # Konkurransen er nå avsluttet – takk til alle som deltok! Rosetter vil bli delt ut så snart konkurransearrangøren(e) har sjekket resultatene. out += "''" + i18n('bot-contest-limbo') + "''\n\n" elif self.state == STATE_CLOSING: out += "''" + i18n('bot-contest-closed') + "''\n\n" @@ -928,7 +893,7 @@ def run(self, simulate=False, output=''): 'startdate': self.start.strftime('%Y-%m-%dT%H:%M:%S'), 'enddate': self.end.strftime('%Y-%m-%dT%H:%M:%S') } - out += "''" + i18n('bot-contest-last-updated', i18n('bot-date-time-format', oargs['lastupdate']), i18n('bot-date-format', oargs['startdate']), i18n('bot-date-format', oargs['enddate'])) + "''\n\n" # FIXME + out += "''" + i18n('bot-contest-last-updated', i18n('bot-date-time-format', oargs['lastupdate']), i18n('bot-date-format', oargs['startdate']), i18n('bot-date-format', oargs['enddate'])) + "''\n\n" for i, result in enumerate(results): awards = '' @@ -1091,20 +1056,13 @@ def run(self, simulate=False, output=''): page = self.sites.homesite.pages[aws['pagename']] page.save(text=aws['sent'], summary=aws['sent'], bot=True) - # if not simulate: - # - # Skip for now: not Flow compatible - # self.deliver_receipt_to_leaders() - logger.info('Cleaning database') if not simulate: self.delete_contribs_from_db() # Notify users about issues - # self.deliver_warnings(simulate=simulate) - - # Update Wikipedia:Portal/Oppslagstavle + # Update noticeboards if 'noticeboard' in config: boardname = config['noticeboard']['name'] @@ -1117,7 +1075,7 @@ def run(self, simulate=False, output=''): dp = TemplateEditor(txt) ntempl = len(dp.templates[tplname]) if ntempl != 1: - raise Exception('Feil: Fant %d %s-maler i %s' % (ntempl, tplname, boardname)) + raise Exception('Feil: Fant %d %s-maler i %s' % (ntempl, tplname, boardname)) # FIXME: Hard-coded Norwegian tpl = dp.templates[tplname][0] now2 = now.astimezone(self.wiki_tz) diff --git a/ukbot/contributions.py b/ukbot/contributions.py index 2ca48b1..085b50b 100644 --- a/ukbot/contributions.py +++ b/ukbot/contributions.py @@ -93,17 +93,6 @@ def calculate_contribution_points(self, contribution): return contribution.raw_points - # rev.points.append([pts, ptype, txt + ' > ' + _('max'), points]) - - # elif not self.iszero(revpoints): - # else: - # if self.iszero(points) and not include_zero: - # return False - # pts = points - # rev.points.append([points, ptype, txt, points]) - # if pts > 0.0: - # return True - def get_article_points(self, article, ignore_max=False, ignore_suspension_period=False, ignore_disqualification=False, ignore_point_deductions=False): @@ -136,14 +125,6 @@ def get_article_points(self, article, ignore_max=False, ignore_suspension_period return points - # p = 0. - # for revid, rev in self.revisions.items(): - # dt = pytz.utc.localize(datetime.fromtimestamp(rev.timestamp)) - # if ignore_suspension_period is True or self.user().suspended_since is None or dt < self.user().suspended_since: - # p += rev.get_points(ptype, ignore_max, ignore_point_deductions) - # else: - # logger.debug('!! Skipping revision %d in suspension period', revid) - def get_articles(self): return sorted( list(set([contrib.article for contrib in self.contributions])), @@ -244,12 +225,6 @@ def summarize_article(self, article, revisions_formatted): ignore_disqualification=True) netto = self.get_article_points(article) - # if brutto == 0.0: - # logger.debug(' %s: skipped (0 points)', article.key) - # continue - - # for contrib in contribs: - tooltip_text = '' try: cat_path = [x.split(':')[-1] for x in article.cat_path] @@ -258,12 +233,6 @@ def summarize_article(self, article, revisions_formatted): pass tooltip_text += '
'.join(revisions_formatted) - # if len(article.point_deductions) > 0: - # pds = [] - # for points, reason in article.point_deductions: - # pds.append('%.f p: %s' % (-points, reason)) - # titletxt += '
\'\'' + _('Notes') + ':\'\'
%s
' % '
'.join(pds) - if article.words > 0: tooltip_text += '
%s.
' % ( # FIXME inline styling i18n('bot-byte-word-count', article.bytes, article.words) @@ -282,9 +251,6 @@ def summarize_article(self, article, revisions_formatted): ) elif brutto != netto: formatted = '[[File:Qsicon Achtung.png|14px]] ' + formatted # FIXME inline image - # titletxt += '
Merk: - # En eller flere revisjoner er ikke talt med fordi de ble gjort mens brukeren var suspendert. - # Hvis suspenderingen oppheves vil bidragene telle med.
' if article.new: formatted += ' ' + i18n('bot-new-page-abbr') @@ -352,18 +318,3 @@ def site(self): @property def user(self): return self.rev.article().user() - - # def get_points(self, ptype='', ignore_max=False, ignore_point_deductions=False): - # p = 0.0 - # for pnt in self.points: - # if ptype == '' or pnt[1] == ptype: - # if ignore_max and len(pnt) > 3: - # p += pnt[3] - # else: - # p += pnt[0] - - # if not ignore_point_deductions and (ptype == '' or ptype == 'trekk'): - # for points, reason in self.point_deductions: - # p -= points - - # return p diff --git a/ukbot/filters.py b/ukbot/filters.py index 83aa121..833f5d4 100644 --- a/ukbot/filters.py +++ b/ukbot/filters.py @@ -87,60 +87,6 @@ def filter(self, articles: 'Articles'): type(self).__name__, len(articles), len(out)) return out -#class StubFilter(Filter): -# """ Filters articles that was stubs, but is no more """ - -# def __init__(self): -# Filter.__init__(self) - -# def is_stub(self, text): -# """ Checks if a given text is a stub """ - -# m = re.search(r'{{[^}]*(?:stubb|spire)[^}]*}}', text, re.IGNORECASE) -# if m: -# if self.verbose: -# log(" >> %s " % m.group(0), newline = False) -# return True -# return False - - #def filter(self, articles): - - # out = OrderedDict() - # for article_key, article in articles.items(): - - # firstrevid = article.revisions.firstkey() - # lastrevid = article.revisions.lastkey() - - # firstrev = article.revisions[firstrevid] - # lastrev = article.revisions[lastrevid] - - # try: - - # # skip pages that are definitely not stubs to avoid timeconsuming parsing - # if article.new is False and article.redirect is False and len(firstrev.parenttext) < 20000: - - # # Check if first revision is a stub - # if self.is_stub(firstrev.parenttext): - - # # Check if last revision is a stub - # if not self.is_stub(lastrev.text): - - # out[article_key] = article - - # if self.verbose: - # log('') - - #except DanmicholoParseError as e: - # log(" >> DanmicholoParser failed to parse " + article_key) - # parentid = firstrev.parentid - # args = { 'article': article_key, 'prevrev': firstrev.parentid, 'rev': lastrev.revid, 'error': e.msg } - # article.site().errors.append(_('Could not analyze the article %(article)s because one of the revisions %(prevrev)d or %(rev)d could not be parsed: %(error)s') % args) - - # log(" [+] Applying stub filter: %d -> %d" % (len(articles), len(out))) - - # return out - - class TemplateFilter(Filter): """ Filters articles that had any of a given set of templates (or their aliases) at a point""" @@ -601,7 +547,6 @@ def __init__(self, sites, pages, include_langlinks=False): for page in pages: for linked_page in page.links(redirects=True): link = '%s:%s' % (linked_page.site.key, linked_page.name.replace('_', ' ')) - # logger.debug(' - Include: %s', link) self.page_keys.add(link) # Include langlinks as well diff --git a/ukbot/revision.py b/ukbot/revision.py index d362164..4b23eaf 100644 --- a/ukbot/revision.py +++ b/ukbot/revision.py @@ -138,14 +138,9 @@ def words(self): logger.warning(w) self.errors.append(w) - #s = _('A problem encountered with revision %(revid)d may have influenced the word count for this revision: %(problems)s ') - #s = _('Et problem med revisjon %d kan ha påvirket ordtellingen for denne: %s ') del mt1 del mt0 - # except DanmicholoParseError as e: - # log("!!!>> FAIL: %s @ %d" % (self.article().name, self.revid)) - # self._wordcount = 0 - # #raise + return self._wordcount @property diff --git a/ukbot/rules/ref.py b/ukbot/rules/ref.py index 8cfc793..d46e0bb 100644 --- a/ukbot/rules/ref.py +++ b/ukbot/rules/ref.py @@ -28,8 +28,8 @@ def __init__(self, sites, template, trans=None): @staticmethod def count_sources(txt): - s1 = 0 # kilder - r1 = 0 # kildehenvisninger + s1 = 0 # references + r1 = 0 # reference pointers (re-uses) # Count all tags try: @@ -48,6 +48,7 @@ def count_sources(txt): r1 = 0 # Count list item under section heading "Kilder" or "Kjelder" + # FIXME: Make language-agnostic refsection = False for line in txt.split('\n'): if refsection: diff --git a/ukbot/server.py b/ukbot/server.py index e1ed41e..80b8ea0 100755 --- a/ukbot/server.py +++ b/ukbot/server.py @@ -14,5 +14,3 @@ fh.setFormatter(formatter) app.logger.addHandler(fh) -# app.debug = True # reload on each code change - diff --git a/ukbot/user.py b/ukbot/user.py index 70f8d17..a3239af 100644 --- a/ukbot/user.py +++ b/ukbot/user.py @@ -70,8 +70,6 @@ def add_contribs_from_wiki(self, site, start, end, fulltext=False, **kwargs): fulltext : get revision fulltexts """ - # logger.info('Reading contributions from %s', site.host) - apilim = 50 if 'bot' in site.rights: apilim = site.api_limit # API limit, should be 500 @@ -89,7 +87,6 @@ def add_contribs_from_wiki(self, site, start, end, fulltext=False, **kwargs): logger.debug('Limiting to namespaces: %s', args['namespace']) new_revisions = [] - # stored_revisions = set(copy(self.revisions.keys())) stored_revisions = set([rev.revid for rev in self.revisions.values() if rev.article().site() == site]) current_revisions = set() t0 = time.time() @@ -297,22 +294,6 @@ def backfill_article_creation_dates(self, sql): article = articles_by_site[site][row[0]] article._created_at = pytz.utc.localize(row[1]) - # n = 0 - # for article_key, article in articles.items(): - # if article.created_at is None: - # res = site.pages[article.name].revisions(prop='timestamp', limit=1, dir='newer') - # ts = article.created_at = next(res)['timestamp'] - # ts = time.strftime('%Y-%m-%d %H:%M:%S', ts) - # # datetime.fromtimestamp(rev.timestamp).strftime('%F %T') - # cur.execute( - # 'INSERT INTO articles (site, name, created_at) VALUES (%s, %s, %s)', - # [site.name, article_key, ts] - # ) - # n += 1 - # sql.commit() - # if n > 0: - # logger.debug('Backfilled %d article creation dates from %s', n, site.name) - cur.close() def save_contribs_to_db(self, sql): @@ -343,7 +324,6 @@ def save_contribs_to_db(self, sql): chunk_size = 1000 for n in range(0, len(contribs_query_params), chunk_size): data = contribs_query_params[n:n+chunk_size] - # logger.info('Adding %d contributions to database', len(data)) t0 = time.time() cur.executemany(""" @@ -357,7 +337,6 @@ def save_contribs_to_db(self, sql): chunk_size = 100 for n in range(0, len(fulltexts_query_params), chunk_size): data = fulltexts_query_params[n:n+chunk_size] - # logger.info('Adding %d fulltexts to database', len(data)) t0 = time.time() cur.executemany(""" @@ -565,12 +544,6 @@ def analyze(self, rules): # loop over articles for article in self.articles.values(): - # if self.contest().verbose: - # logger.info(article_key) - # else: - # logger.info('.', newline=False) - # log(article_key) - # loop over revisions for revid, rev in article.revisions.items(): @@ -587,14 +560,12 @@ def analyze(self, rules): points = sum([contribution.points for contribution in contributions]) if points > 0: - # logger.debug('%s: %d: %s', self.name, rev.revid, points) ts = float(unix_time(utc.localize(datetime.fromtimestamp(rev.timestamp)).astimezone( self.contest().wiki_tz ))) x.append(ts) y.append(float(points)) - # logger.debug(' %d : %d ', revid, points) logger.debug('[[%s]] Sum: %.1f points', article.name, self.contributions.get_article_points(article=article)) @@ -604,69 +575,13 @@ def analyze(self, rules): o = np.argsort(x) x = x[o] y = y[o] - #pl = np.array(pl, dtype=float) - #pl.sort(axis = 0) y2 = np.array([np.sum(y[:q + 1]) for q in range(len(y))]) self.plotdata = np.column_stack((x, y2)) - #np.savetxt('user-%s'%self.name, np.column_stack((x,y,y2))) def format_result(self): logger.debug('Formatting results for user %s', self.name) entries = [] - - ## WIP - - # <<<<<<< HEAD - # dt = utc.localize(datetime.fromtimestamp(rev.timestamp)) - # dt_str = dt.astimezone(self.contest().wiki_tz).strftime(_('%d.%m, %H:%M')) - # out = '[%s %s]: %s' % (rev.get_link(), dt_str, descr) - # if self.suspended_since is not None and dt > self.suspended_since: - # out = '' + out + '' - # if len(rev.errors) > 0: - # out = '[[File:Ambox warning yellow.svg|12px|%s]] ' % (', '.join(rev.errors)) + out - # revs.append(out) - - # titletxt = '' - # try: - # cat_path = [x.split(':')[-1] for x in article.cat_path] - # titletxt = ' : '.join(cat_path) + '
' - # except AttributeError: - # pass - # titletxt += '
'.join(revs) - # # if len(article.point_deductions) > 0: - # # pds = [] - # # for points, reason in article.point_deductions: - # # pds.append('%.f p: %s' % (-points, reason)) - # # titletxt += '
\'\'' + _('Notes') + ':\'\'
%s
' % '
'.join(pds) - - # titletxt += '
' + _('Total {{formatnum:%(bytecount)d}} bytes, %(wordcount)d words') % {'bytecount': article.bytes, 'wordcount': article.words} + '
' - - # p = '%.1f p' % brutto - # if brutto != netto: - # p = '' + p + ' ' - # if netto != 0.: - # p += '%.1f p' % netto - - # out = '[[%s|%s]]' % (article.link(), article.name) - # if article_key in self.disqualified_articles: - # out = '[[File:Qsicon Achtung.png|14px]] ' + out + '' - # titletxt += '
' + _('Note: The contributions to this article are currently disqualified.') + '
' - # elif brutto != netto: - # out = '[[File:Qsicon Achtung.png|14px]] ' + out - # #titletxt += '
Merk: En eller flere revisjoner er ikke talt med fordi de ble gjort mens brukeren var suspendert. Hvis suspenderingen oppheves vil bidragene telle med.
' - # if article.new: - # out += ' ' + _('N') - # out += ' (%s)' % p - - # out = '# ' + out - # out += '
' + titletxt + '
' - - # entries.append(out) - # logger.debug(' %s: %.f / %.f points', article_key, netto, brutto) - # ======= - # >>>>>>> WIP - ros = '{awards}' suspended = '' diff --git a/ukbot/util.py b/ukbot/util.py index bc3f601..507773d 100644 --- a/ukbot/util.py +++ b/ukbot/util.py @@ -143,12 +143,10 @@ def parse_infobox(page_text, userprefix, config): parsed['awards'].append([award_name, 'pointlimit', int(award_value)]) except ValueError: pass - # raise InvalidContestPage('Klarte ikke tolke verdien til parameteren %s gitt til {{tl|infoboks ukens konkurranse}}.' % col) winner_awards = [k for k, v in award_cfg.items() if v.get('winner') is True] if len(parsed['awards']) != 0 and 'winner' not in [award[1] for award in parsed['awards']]: winner_awards = ', '.join(['{{para|%s|%s}}' % (k, infobox_cfg['winner']) for k in winner_awards]) - # raise InvalidContestPage(_('Found no winner award in {{tl|%(template)s}}. Winner award is set by one of the following: %(awards)s.') % {'template': ibcfg['name'], 'awards': winner_awards}) logger.warning( 'Found no winner award in {{tl|%s}}. Winner award is set by one of the following: %s.', infobox_cfg['name'], From e0f742bda1e35ef430d71ba5aace632c2826a6ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Harald=20S=C3=B8by?= Date: Mon, 7 Apr 2025 13:49:43 +0200 Subject: [PATCH 04/23] Use new i18n() function in rules files --- ukbot/rules/byte.py | 4 ++-- ukbot/rules/contrib.py | 4 ++-- ukbot/rules/external_link.py | 4 ++-- ukbot/rules/image.py | 4 ++-- ukbot/rules/new.py | 4 ++-- ukbot/rules/qualified.py | 4 ++-- ukbot/rules/redirect.py | 4 ++-- ukbot/rules/ref.py | 6 +++--- ukbot/rules/regexp.py | 6 +++--- ukbot/rules/rule.py | 4 ++-- ukbot/rules/templateremoval.py | 4 ++-- ukbot/rules/wikidata.py | 11 +++++------ ukbot/rules/word.py | 4 ++-- 13 files changed, 31 insertions(+), 32 deletions(-) diff --git a/ukbot/rules/byte.py b/ukbot/rules/byte.py index 20aa24d..0fe3a10 100644 --- a/ukbot/rules/byte.py +++ b/ukbot/rules/byte.py @@ -1,6 +1,6 @@ # encoding=utf-8 # vim: fenc=utf-8 et sw=4 ts=4 sts=4 ai -from ..common import _ +from ..common import i18n from ..contributions import UserContribution from .rule import Rule from .decorators import family @@ -17,4 +17,4 @@ def test(self, rev): if bytes_added > 0.: points = bytes_added * self.points yield UserContribution(rev=rev, points=points, rule=self, - description=_('%(bytes).f bytes') % {'bytes': bytes_added}) + description=i18n('bot-rule-bytes', bytes_added)) diff --git a/ukbot/rules/contrib.py b/ukbot/rules/contrib.py index 44adb0c..ea962cf 100644 --- a/ukbot/rules/contrib.py +++ b/ukbot/rules/contrib.py @@ -1,6 +1,6 @@ # encoding=utf-8 # vim: fenc=utf-8 et sw=4 ts=4 sts=4 ai -from ..common import _ +from ..common import i18n from ..contributions import UserContribution from .rule import Rule from .decorators import family @@ -13,4 +13,4 @@ class ContribRule(Rule): @family('wikipedia.org', 'wikibooks.org') def test(self, rev): yield UserContribution(rev=rev, points=self.points, rule=self.rule, - description=_('contribution')) + description=i18n('bot-rule-contribution')) diff --git a/ukbot/rules/external_link.py b/ukbot/rules/external_link.py index d64d4d3..3bfd4cf 100644 --- a/ukbot/rules/external_link.py +++ b/ukbot/rules/external_link.py @@ -2,7 +2,7 @@ # vim: fenc=utf-8 et sw=4 ts=4 sts=4 ai import re -from ..common import _ +from ..common import i18n from ..contributions import UserContribution from .rule import Rule from .decorators import family @@ -27,4 +27,4 @@ def test(self, rev): if links_added > 0: points = links_added * self.points yield UserContribution(rev=rev, points=points, rule=self, - description=_('links') % {'links': links_added}) + description=i18n('bot-rule-links', links_added)) diff --git a/ukbot/rules/image.py b/ukbot/rules/image.py index 56c4722..f2cfe31 100644 --- a/ukbot/rules/image.py +++ b/ukbot/rules/image.py @@ -4,7 +4,7 @@ from mwclient.errors import InvalidPageTitle import urllib import logging -from ..common import _ +from ..common import i18n from ..contributions import UserContribution from .rule import Rule from .decorators import family @@ -139,4 +139,4 @@ def test(self, rev): points += self.points yield UserContribution(rev=rev, rule=self, points=points, - description=_('images') % {'images': len(added)}) + description=i18n('bot-rule-images', len(added))) diff --git a/ukbot/rules/new.py b/ukbot/rules/new.py index 58bdc9e..3972838 100644 --- a/ukbot/rules/new.py +++ b/ukbot/rules/new.py @@ -1,6 +1,6 @@ # encoding=utf-8 # vim: fenc=utf-8 et sw=4 ts=4 sts=4 ai -from ..common import _ +from ..common import i18n from ..contributions import UserContribution from .rule import Rule from .decorators import family @@ -13,4 +13,4 @@ class NewPageRule(Rule): @family('wikipedia.org', 'wikibooks.org') def test(self, rev): if rev.new and not rev.redirect: - yield UserContribution(rev=rev, points=self.points, rule=self, description=_('new page')) + yield UserContribution(rev=rev, points=self.points, rule=self, description=i18n('bot-rule-new-page')) diff --git a/ukbot/rules/qualified.py b/ukbot/rules/qualified.py index 5fa9346..47a602e 100644 --- a/ukbot/rules/qualified.py +++ b/ukbot/rules/qualified.py @@ -1,6 +1,6 @@ # encoding=utf-8 # vim: fenc=utf-8 et sw=4 ts=4 sts=4 ai -from ..common import _ +from ..common import i18n from ..contributions import UserContribution from .rule import Rule from .decorators import family @@ -19,4 +19,4 @@ def test(self, rev): if rev.article().key not in self.articles_seen: self.articles_seen.add(rev.article().key) yield UserContribution(rev=rev, points=self.points, rule=self, - description=_('qualified')) + description=i18n('bot-rule-eligible')) diff --git a/ukbot/rules/redirect.py b/ukbot/rules/redirect.py index 9f4a70c..4ce57ba 100644 --- a/ukbot/rules/redirect.py +++ b/ukbot/rules/redirect.py @@ -1,6 +1,6 @@ # encoding=utf-8 # vim: fenc=utf-8 et sw=4 ts=4 sts=4 ai -from ..common import _ +from ..common import i18n from ..contributions import UserContribution from .rule import Rule from .decorators import family @@ -13,4 +13,4 @@ class RedirectRule(Rule): @family('wikipedia.org', 'wikibooks.org') def test(self, rev): if rev.new and rev.redirect: - yield UserContribution(rev=rev, points=self.points, rule=self, description=_('redirect')) + yield UserContribution(rev=rev, points=self.points, rule=self, description=i18n('bot-rule-redirect')) diff --git a/ukbot/rules/ref.py b/ukbot/rules/ref.py index d46e0bb..a3a8174 100644 --- a/ukbot/rules/ref.py +++ b/ukbot/rules/ref.py @@ -5,7 +5,7 @@ import lxml from mwtextextractor import condition_for_lxml -from ..common import _ +from ..common import i18n from ..contributions import UserContribution from .rule import Rule from .decorators import family @@ -79,11 +79,11 @@ def test(self, rev): if sources_added > 0: points += sources_added * self.sourcepoints - description.append(_('references') % {'num': sources_added}) + description.append(i18n('bot-rule-references', sources_added)) if refs_added > 0: points += refs_added * self.refpoints - description.append(_('reference pointers') % {'num': refs_added}) + description.append(i18n('bot-rule-reference-reuse', refs_added)) yield UserContribution(rev=rev, points=points, rule=self, description=', '.join(description)) diff --git a/ukbot/rules/regexp.py b/ukbot/rules/regexp.py index 89cb9ac..cc6a3b1 100644 --- a/ukbot/rules/regexp.py +++ b/ukbot/rules/regexp.py @@ -2,7 +2,7 @@ # vim: fenc=utf-8 et sw=4 ts=4 sts=4 ai import re import logging -from ..common import _ +from ..common import i18n from ..contributions import UserContribution from .rule import Rule @@ -16,7 +16,7 @@ class RegexpRule(Rule): def __init__(self, sites, template, trans=None): Rule.__init__(self, sites, template, trans) self.total = 0 - self.description = self.get_param('description', datatype=str, default=_('regexp')) + self.description = self.get_param('description', datatype=str, default=i18n('bot-rule-regexp')) self.patterns = [re.compile(str(pattern).strip()) for pattern in self.get_anon_params()] def has_pattern(self, txt): @@ -41,5 +41,5 @@ class SectionRule(RegexpRule): def __init__(self, sites, template, trans=None): RegexpRule.__init__(self, sites, template, trans) - self.description = self.get_param('description', datatype=str, default=_('section')) + self.description = self.get_param('description', datatype=str, default=i18n('bot-rule-section')) self.patterns = [re.compile(r'\n===?\s*(?:%s)\s*===?\s*\n' % pattern.pattern) for pattern in self.patterns] diff --git a/ukbot/rules/rule.py b/ukbot/rules/rule.py index b5c8162..c4fbdd9 100644 --- a/ukbot/rules/rule.py +++ b/ukbot/rules/rule.py @@ -1,6 +1,6 @@ # encoding=utf-8 # vim: fenc=utf-8 et sw=4 ts=4 sts=4 ai -from ..common import _ +from ..common import i18n from ..contributions import UserContribution from .decorators import family @@ -73,5 +73,5 @@ def test(self, current_rev): if total >= self.limit and this_rev is True: yield UserContribution(rev=current_rev, points=self.points, rule=self, - description=_('bonus %(words)d words') % {'words': self.limit}) + description=i18n('bot-rule-bonus-words', self.limit)) diff --git a/ukbot/rules/templateremoval.py b/ukbot/rules/templateremoval.py index c729eda..c41e442 100644 --- a/ukbot/rules/templateremoval.py +++ b/ukbot/rules/templateremoval.py @@ -2,7 +2,7 @@ # vim: fenc=utf-8 et sw=4 ts=4 sts=4 ai import logging -from ..common import _ +from ..common import i18n from ..contributions import UserContribution from .rule import Rule from .decorators import family @@ -85,5 +85,5 @@ def test(self, rev): if removed > 0: template['total'] += removed yield UserContribution(rev=rev, rule=self, points=removed * self.points, - description=_('removal of {{tl|%(template)s}}') % {'template': template['name']}) + description=i18n('bot-rule-template-removal', '{{subst:ns:10}}:' + template['name'])) diff --git a/ukbot/rules/wikidata.py b/ukbot/rules/wikidata.py index 0522cbf..5b32afc 100644 --- a/ukbot/rules/wikidata.py +++ b/ukbot/rules/wikidata.py @@ -4,7 +4,7 @@ import json import logging from jsonpath_rw import parse -from ..common import _ +from ..common import i18n from ..contributions import UserContribution from .rule import Rule from .decorators import family @@ -44,19 +44,19 @@ def __init__(self, sites, params, trans=None): for lang in self.labels: self.matchers['label:%s' % lang] = { 'rules': [parse('labels.%s' % lang)], - 'msg': _('label (%(lang)s)'), + 'msg': i18n('bot-rule-label-lang', lang), 'opts': {'lang': lang}, } for lang in self.descriptions: self.matchers['description:%s' % lang] = { 'rule': [parse('descriptions.%s' % lang)], - 'msg': _('description (%(lang)s)'), + 'msg': i18n('bot-rule-description-lang', lang), 'opts': {'lang': lang}, } for lang in self.aliases: self.matchers['alias:%s' % lang] = { 'rule': [parse('aliases.%s' % lang)], - 'msg': _('alias (%(lang)s)'), + 'msg': i18n('bot-rule-alias-lang', lang), 'opts': {'lang': lang}, } for prop in self.properties: @@ -69,8 +69,7 @@ def __init__(self, sites, params, trans=None): ] self.matchers['prop:%s' % prop] = { 'rules': rules, - 'msg': _('%(property)s statement'), - 'msg_plural': _('%(count)d %(property)s statements'), + 'msg': i18n('bot-rule-properties', '%(count)s', prop) 'opts': {'property': prop}, } diff --git a/ukbot/rules/word.py b/ukbot/rules/word.py index cf61947..787d77d 100644 --- a/ukbot/rules/word.py +++ b/ukbot/rules/word.py @@ -1,6 +1,6 @@ # encoding=utf-8 # vim: fenc=utf-8 et sw=4 ts=4 sts=4 ai -from ..common import _ +from ..common import i18n from ..contributions import UserContribution from .rule import Rule from .decorators import family @@ -17,4 +17,4 @@ def test(self, rev): if words_added > 0.: points = words_added * self.points yield UserContribution(rev=rev, points=points, rule=self, - description=_('%(words).f words') % {'words': words_added}) + description=i18n('bot-rule-words', words_added)) From b48482cf99316e1a80573b33ac8be59059b83f2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Harald=20S=C3=B8by?= Date: Tue, 8 Apr 2025 10:54:20 +0200 Subject: [PATCH 05/23] Amend fetch_parsed_i18n to use API --- .gitignore | 3 +- ukbot/common.py | 103 ++++++---------------------------------- ukbot/contest.py | 22 ++++----- ukbot/contributions.py | 4 +- ukbot/rules/wikidata.py | 2 +- ukbot/site.py | 2 +- ukbot/ukbot.py | 14 +++--- ukbot/user.py | 6 +-- 8 files changed, 42 insertions(+), 114 deletions(-) diff --git a/.gitignore b/.gitignore index 11515fd..d5058bd 100644 --- a/.gitignore +++ b/.gitignore @@ -21,8 +21,7 @@ pip-log.txt .tox #Translations -*.mo -bot/locale +cache/* #Other wp_private.py diff --git a/ukbot/common.py b/ukbot/common.py index 28414ab..3d8637d 100644 --- a/ukbot/common.py +++ b/ukbot/common.py @@ -11,99 +11,28 @@ logger = logging.getLogger(__name__) -LOCALE_PATH = os.path.join(os.path.dirname(os.path.dirname(__file__)), "locale") - -logger.info('Locale path: %s', LOCALE_PATH) - STATE_NORMAL = 'normal' STATE_ENDING = 'ending' STATE_CLOSING = 'closing' def i18n(*args): - """Returns a string that uses Module:UKB's getMessage function on-wiki""" - if len(args) == 0: - raise ValueError('At least one argument (message key) must be given') - return '{{subst:#invoke:UKB|getMessage|%s}}'.format('|'.join(args)) - -def fetch_parsed_i18n(*args): - """Fetch and return the contents of an i18n message""" - # Dummy function for now - """ - Useful query: - { - "action": "parse", - "format": "json", - "title": "Bruker:UKBot", - "text": "{{subst:#invoke:UKB/sandkasse|getMessage|bot-day}}", - "prop": "text", - "pst": 1, - "onlypst": 1, - "disablelimitreport": 1, - "formatversion": "2" - } + """Returns a string that substs Module:UKB's getMessage function on-wiki""" + if len(args) == 0: + raise ValueError('At least one argument (message key) must be given') + return '{{subst:#invoke:UKB|getMessage|%s}}' % '|'.join(str(arg) for arg in args) + +def fetch_parsed_i18n(*args, site=None): + """ + Fetch and return the contents of an i18n message. This should only used in + two cases: + - 1. The string will not be used on-wiki + - 2. The string will be used in edit summaries + For all cases where text is output to wiki, the i18n() function should be used instead. """ - return '|'.join(args) - -# Singleton -class Localization: - class __Localization: - def __init__(self): - self.t = lambda x: x - self._ = lambda x: x - - def init(self, cl): - '''prepare i18n''' - if not isinstance(cl, list): - cl = [cl] - #['nb_NO.UTF-8', 'nb_NO.utf8', 'no_NO']: - for loc in cl: - try: - # print "Trying (", loc.encode('utf-8'), 'utf-8',")" - locale.setlocale(locale.LC_ALL, (loc, 'utf-8')) - logger.info('Using locale %s', loc) - #logger.info('Locale set to %s' % loc) - break - except locale.Error: - try: - locstr = loc + '.UTF-8' - # print "Trying",locstr - locale.setlocale(locale.LC_ALL, locstr ) - logger.info('Using locale %s', loc) - break - except locale.Error: - pass - - lang, charset = locale.getlocale() - if lang == None: - raise StandardError('Failed to set locale!') - - t = gettext.translation('messages', LOCALE_PATH, fallback=True, languages=[lang]) + if len(args) == 0: + raise ValueError('At least one argument (message key) must be given') - self.t = t - self._ = t.gettext - - instance = None - def __init__(self): - if not Localization.instance: - Localization.instance = Localization.__Localization() - # else: - # Localization.instance.val = arg - - def __getattr__(self, name): - return getattr(self.instance, name) - - -localization = Localization() - -def ngettext(*args, **kwargs): - try: - return localization.t.ngettext(*args, **kwargs) - except AttributeError: - # During tests, Localization might not be initialized - return args[0] - -def _(*args, **kwargs): - return localization._(*args, **kwargs) + return site.api('parse', text=i18n(args), pst=1, onlypst=1)['parse']['text']['*'] logfile = sys.stdout def log(msg, newline = True): @@ -112,14 +41,12 @@ def log(msg, newline = True): logfile.write(msg.encode('utf-8')) logfile.flush() - process = psutil.Process(os.getpid()) def get_mem_usage(): """ Returns memory usage in MBs """ return process.memory_info().rss / 1024.**2 - class InvalidContestPage(Exception): """Raised when wikitext input is not on the expected form, so we don't find what we're looking for""" diff --git a/ukbot/contest.py b/ukbot/contest.py index a4c013c..0963739 100644 --- a/ukbot/contest.py +++ b/ukbot/contest.py @@ -502,13 +502,13 @@ def plot(self, plotdata): ax.set_xlim(t0, xt[-1]) ax.set_ylim(0, 1.05 * np.max(yall)) - ax.set_xlabel(fetch_parsed_i18n('bot-day')) - ax.set_ylabel(fetch_parsed_i18n('bot-points')) + ax.set_xlabel(fetch_parsed_i18n('bot-day', site=self.sites.homesite)) + ax.set_ylabel(fetch_parsed_i18n('bot-points', site=self.sites.homesite)) now = self.server_tz.localize(datetime.now()) now2 = now.astimezone(self.wiki_tz).strftime('%Y-%m-%dT%H:%M:%S') - wikiformat_datetime = fetch_parsed_i18n('bot-date-time-format', now2) - ax_title = fetch_parsed_i18n('bot-updated-time', wikiformat_datetime) + wikiformat_datetime = fetch_parsed_i18n('bot-date-time-format', now2, site=self.sites.homesite) + ax_title = fetch_parsed_i18n('bot-updated-time', wikiformat_datetime, site=self.sites.homesite) ax.set_title(ax_title) plt.legend() @@ -836,7 +836,7 @@ def run(self, simulate=False, output=''): if simulate: logger.error(out) else: - self.page.save('dummy', summary=fetch_parsed_i18n('bot-problem-encountered'), appendtext=out) + self.page.save('dummy', summary=fetch_parsed_i18n('bot-problem-encountered', site=self.sites.homesite), appendtext=out) raise del user @@ -948,7 +948,7 @@ def run(self, simulate=False, output=''): except StopIteration: if 'resultsSection' not in config['contestPages']: - raise InvalidContestPage(i18n('bot-result-markers-not-found', '<!-- Begin:ResultsSection -->', '<!-- End:ResultsSection -->' ) + raise InvalidContestPage(i18n('bot-result-markers-not-found', '<!-- Begin:ResultsSection -->', '<!-- End:ResultsSection -->' )) for s in re.finditer(r'^[\s]*==([^=]+)==[\s]*\n', txt, flags=re.M): if s.group(1).strip() == config['contestPages']['resultsSection']: secstart = s.end() @@ -964,11 +964,11 @@ def run(self, simulate=False, output=''): logger.info('Updating wiki') if self.state == STATE_ENDING: - self.page.save(txt, summary=fetch_parsed_i18n('bot-updating-results')) + self.page.save(txt, summary=fetch_parsed_i18n('bot-updating-results', site=self.sites.homesite)) elif self.state == STATE_CLOSING: - self.page.save(txt, summary=fetch_parsed_i18n('bot-checking-results')) + self.page.save(txt, summary=fetch_parsed_i18n('bot-checking-results', site=self.sites.homesite)) else: - self.page.save(txt, summary=fetch_parsed_i18n('bot-updating')) + self.page.save(txt, summary=fetch_parsed_i18n('bot-updating', site=self.sites.homesite)) if output != '': logger.info("Writing output to file") @@ -1075,7 +1075,7 @@ def run(self, simulate=False, output=''): dp = TemplateEditor(txt) ntempl = len(dp.templates[tplname]) if ntempl != 1: - raise Exception('Feil: Fant %d %s-maler i %s' % (ntempl, tplname, boardname)) # FIXME: Hard-coded Norwegian + raise Exception('Error: Found %d %s templates in %s' % (ntempl, tplname, boardname)) tpl = dp.templates[tplname][0] now2 = now.astimezone(self.wiki_tz) @@ -1091,7 +1091,7 @@ def run(self, simulate=False, output=''): txt2 = dp.wikitext() if txt != txt2: if not simulate: - oppslagstavle.save(txt2, summary=i18n('bot-weekly-contest-is', tema) + oppslagstavle.save(txt2, summary=i18n('bot-weekly-contest-is', tema)) # Make a nice plot diff --git a/ukbot/contributions.py b/ukbot/contributions.py index 085b50b..47c3aef 100644 --- a/ukbot/contributions.py +++ b/ukbot/contributions.py @@ -2,7 +2,7 @@ # vim: fenc=utf-8 et sw=4 ts=4 sts=4 ai import logging import weakref -from .common import i18n, fetch_parsed_i18n +from .common import i18n logger = logging.getLogger(__name__) @@ -156,7 +156,7 @@ def format(self, homesite): out += '\n' if len(entries) > 10: - out += _('{{Kolonner}}') + '\n' # FIXME + out += '{{Kolonner}}' + '\n' # FIXME out += '\n'.join(entries) out += '\n\n' diff --git a/ukbot/rules/wikidata.py b/ukbot/rules/wikidata.py index 5b32afc..54e367f 100644 --- a/ukbot/rules/wikidata.py +++ b/ukbot/rules/wikidata.py @@ -69,7 +69,7 @@ def __init__(self, sites, params, trans=None): ] self.matchers['prop:%s' % prop] = { 'rules': rules, - 'msg': i18n('bot-rule-properties', '%(count)s', prop) + 'msg': i18n('bot-rule-properties', '%(count)s', prop), 'opts': {'property': prop}, } diff --git a/ukbot/site.py b/ukbot/site.py index 83018c3..1b2e2ea 100644 --- a/ukbot/site.py +++ b/ukbot/site.py @@ -27,7 +27,7 @@ def __init__(self, host, prefixes, **kwargs): access_token = os.getenv('MW_ACCESS_TOKEN') access_secret = os.getenv('MW_ACCESS_SECRET') session.auth = OAuth1(consumer_token, consumer_secret, access_token, access_secret) - session.headers['User-Agent'] = 'UKBot (http://tools.wmflabs.org/ukbot/; danmichaelo+wikipedia@gmail.com)' + session.headers['User-Agent'] = 'UKBot (https://ukbot.toolforge.org/; danmichaelo+wikipedia@gmail.com)' self.errors = [] self.name = host diff --git a/ukbot/ukbot.py b/ukbot/ukbot.py index c944a59..096dd40 100644 --- a/ukbot/ukbot.py +++ b/ukbot/ukbot.py @@ -75,9 +75,11 @@ def process_contest(contest_page, contest_state, sites, sql, config, working_dir contest.uploadplot(args.simulate, args.output) elif args.action == 'plot': - filename = os.path.join(working_dir, config['plot']['datafile'] % {'year': contest.year, - 'week': contest.startweek, - 'month': contest.month}) + filename = os.path.join(working_dir, config['plot']['datafile'] % { + 'year': contest.year, + 'week': contest.startweek, + 'month': contest.month + }) with open(filename, 'r') as fp: plotdata = json.load(fp) contest.plot(plotdata) @@ -143,10 +145,10 @@ def main(): if status_template in te.templates: te.templates[status_template][0].parameters[1] = 'error' te.templates[status_template][0].parameters[2] = error_msg - contest_page.save(te.wikitext(), summary=fetch_parsed_i18n('bot-problem-encountered')) + contest_page.save(te.wikitext(), summary=fetch_parsed_i18n('bot-problem-encountered', site=sites.homesite)) else: out = '\n{{%s | error | %s }}' % (config['templates']['botinfo'], error_msg) - contest_page.save('dummy', summary=fetch_parsed_i18n('bot-problem-encountered'), appendtext=out) + contest_page.save('dummy', summary=fetch_parsed_i18n('bot-problem-encountered', site=sites.homesite), appendtext=out) raise # Update redirect page @@ -166,7 +168,7 @@ def main(): page = sites.homesite.pages[pagename] txt = '#REDIRECT [[%s]]'.format(contest_name) # FIXME – localize REDIRECT if page.text() != txt and not args.simulate: - page.save(txt, summary=fetch_parsed_i18n('bot-redirecting', contest_name) + page.save(txt, summary=fetch_parsed_i18n('bot-redirecting', contest_name, site=sites.homesite)) runend = config['server_timezone'].localize(datetime.now()) runend_s = time.time() diff --git a/ukbot/user.py b/ukbot/user.py index a3239af..8c17c5e 100644 --- a/ukbot/user.py +++ b/ukbot/user.py @@ -584,16 +584,16 @@ def format_result(self): ros = '{awards}' - suspended = '' + suspended = '{{subst:ns:0}}' if self.suspended_since is not None: suspended = ', ' + i18n('bot-suspended-since', i18n('bot-date-time-format', self.suspended_since.strftime('%Y-%m-%dT%H:%M:%S'))) - out = '=== %s %s ===' % (ros, i18n('bot-results-user-heading', '[[{{subst:ns:2}}:%s|%s]]'.format(self.name, self.name), self.contributinos.sum(), suspended)) + out = '=== %s %s ===\n' % (ros, i18n('bot-results-user-heading', '[[{{subst:ns:2}}:%s|%s]]'.format(self.name, self.name), self.contributinos.sum(), suspended)) if len(entries) == 0: out += "''" + i18n('bot-no-contributions-yet') + "''" else: out += i18n('bot-articles-kb', len(entries), '%0.2f' % self.bytes / 1000.) if len(entries) > 10: - out += _('{{Kolonner}}\n') # FIXME + out += '{{Kolonner}}\n' # FIXME out += '\n'.join(entries) out += '\n\n' From 1c1cf3117eb54097584a726e970c87ccec9bacbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Harald=20S=C3=B8by?= Date: Tue, 8 Apr 2025 16:14:59 +0200 Subject: [PATCH 06/23] Improve i18n() features Turns out the approach I first tried, with substing the module, had a major flaw: Expansion limits. After relatively few substitutions, all it would result in was Scribunto/Lua errors instead. So this approach instead uses a new function from that module that outputs all the i18n stuff we have in JSON, and then parses that JSON and makes some substitutions as necessary. I've chosen to make it `subst:` all magic words except for {{formatnum:}}, so that the end users shouldn't actually see {{PLURAL:}} etc. --- ukbot/common.py | 59 ++++++++++++++++++++++++++++++++++++------ ukbot/contest.py | 16 ++++++------ ukbot/contributions.py | 6 ++--- ukbot/ukbot.py | 10 ++++--- 4 files changed, 68 insertions(+), 23 deletions(-) diff --git a/ukbot/common.py b/ukbot/common.py index 3d8637d..30ec69c 100644 --- a/ukbot/common.py +++ b/ukbot/common.py @@ -1,9 +1,9 @@ # encoding=utf-8 from __future__ import unicode_literals import sys -import locale -import gettext import yaml +import json +import re import os import psutil import pkg_resources @@ -15,24 +15,67 @@ STATE_ENDING = 'ending' STATE_CLOSING = 'closing' +class Localization: + class __Localization: + def __init__(self): + self.messages = lambda x: x + self.site = lambda x: x + + def init(self, homesite): + messages = homesite.api( + 'parse', + text='{{subst:#invoke:UKB/sandkasse|getAllI18n}}', # FIXME: De-sandbox + pst=1, + onlypst=1 + )['parse']['text']['*'] + messages = json.loads(messages) + + self.messages = messages + self.site = homesite + + instance = None + def __init__(self): + if not Localization.instance: + Localization.instance = Localization.__Localization() + + def __getattr__(self, name): + return getattr(self.instance, name) + +localization = Localization() + def i18n(*args): - """Returns a string that substs Module:UKB's getMessage function on-wiki""" + """ + Returns a string from the i18n file saved in Commons. + + TODO: Make more resilient in case key is not present in the file (and other things?) + """ + logger.debug('Arguments to i18n(): %s' % '|'.join([str(x) for x in args])) if len(args) == 0: raise ValueError('At least one argument (message key) must be given') - return '{{subst:#invoke:UKB|getMessage|%s}}' % '|'.join(str(arg) for arg in args) + if args[0] == 'bot-day': + logger.debug('Messages json: ' + json.dumps(localization.messages)) + message = localization.messages[args[0]] + for i in range(1, len(args)): + message = message.replace('$' + str(i), str(args[i])) + # Add subst: in front of some magic words, so they don't appear in wikitext + replacements = ['PLURAL', 'GENDER', 'GRAMMAR', '#time'] + message = re.sub(re.compile('\{\{(' + '|'.join(replacements) + r'):'), '{{subst:\\1:', message) + return message -def fetch_parsed_i18n(*args, site=None): +def fetch_parsed_i18n(*args): """ Fetch and return the contents of an i18n message. This should only used in two cases: - - 1. The string will not be used on-wiki + - 1. The string will not be used in a MediaWiki environment - 2. The string will be used in edit summaries For all cases where text is output to wiki, the i18n() function should be used instead. """ + logger.debug('Arguments to fetch_parsed_i18n(): %s', '|'.join([str(x) for x in args])) if len(args) == 0: raise ValueError('At least one argument (message key) must be given') - - return site.api('parse', text=i18n(args), pst=1, onlypst=1)['parse']['text']['*'] + if len(args) == 1: + return i18n(*args) + return localization.site.api('parse', text=i18n(*args), pst=1, onlypst=1)['parse']['text']['*'] logfile = sys.stdout def log(msg, newline = True): diff --git a/ukbot/contest.py b/ukbot/contest.py index 0963739..68b94f5 100644 --- a/ukbot/contest.py +++ b/ukbot/contest.py @@ -502,13 +502,13 @@ def plot(self, plotdata): ax.set_xlim(t0, xt[-1]) ax.set_ylim(0, 1.05 * np.max(yall)) - ax.set_xlabel(fetch_parsed_i18n('bot-day', site=self.sites.homesite)) - ax.set_ylabel(fetch_parsed_i18n('bot-points', site=self.sites.homesite)) + ax.set_xlabel(fetch_parsed_i18n('bot-day')) + ax.set_ylabel(fetch_parsed_i18n('bot-points')) now = self.server_tz.localize(datetime.now()) now2 = now.astimezone(self.wiki_tz).strftime('%Y-%m-%dT%H:%M:%S') - wikiformat_datetime = fetch_parsed_i18n('bot-date-time-format', now2, site=self.sites.homesite) - ax_title = fetch_parsed_i18n('bot-updated-time', wikiformat_datetime, site=self.sites.homesite) + wikiformat_datetime = fetch_parsed_i18n('bot-date-time-format', now2) + ax_title = fetch_parsed_i18n('bot-updated-time', wikiformat_datetime) ax.set_title(ax_title) plt.legend() @@ -836,7 +836,7 @@ def run(self, simulate=False, output=''): if simulate: logger.error(out) else: - self.page.save('dummy', summary=fetch_parsed_i18n('bot-problem-encountered', site=self.sites.homesite), appendtext=out) + self.page.save('dummy', summary=fetch_parsed_i18n('bot-problem-encountered'), appendtext=out) raise del user @@ -964,11 +964,11 @@ def run(self, simulate=False, output=''): logger.info('Updating wiki') if self.state == STATE_ENDING: - self.page.save(txt, summary=fetch_parsed_i18n('bot-updating-results', site=self.sites.homesite)) + self.page.save(txt, summary=fetch_parsed_i18n('bot-updating-results')) elif self.state == STATE_CLOSING: - self.page.save(txt, summary=fetch_parsed_i18n('bot-checking-results', site=self.sites.homesite)) + self.page.save(txt, summary=fetch_parsed_i18n('bot-checking-results')) else: - self.page.save(txt, summary=fetch_parsed_i18n('bot-updating', site=self.sites.homesite)) + self.page.save(txt, summary=fetch_parsed_i18n('bot-updating')) if output != '': logger.info("Writing output to file") diff --git a/ukbot/contributions.py b/ukbot/contributions.py index 47c3aef..b51f5da 100644 --- a/ukbot/contributions.py +++ b/ukbot/contributions.py @@ -144,7 +144,7 @@ def format(self, homesite): if self.user().suspended_since is not None: suspended = ', ' + i18n('bot-suspended-since', i18n('bot-format-date-time', self.user().suspended_since.strftime('%Y-%m-%dT%H:%M:%S'))) - out = '=== %s %s ===' % ( award_icon, i18n('bot-results-user-heading', '[[{{subst:ns:2}}:%s|%s]]' % (self.user().name, self.user().name), self.sum(), suspended)) + out = '=== %s %s ===\n' % ( award_icon, i18n('bot-results-user-heading', '[[{{subst:ns:2}}:%s|%s]]' % (self.user().name, self.user().name), self.sum(), suspended)) if len(entries) == 0: out += "''%s''" % i18n('bot-no-contributions-yet') @@ -258,11 +258,11 @@ def summarize_article(self, article, revisions_formatted): if article.site().host == 'www.wikidata.org': formatted += ' ' + i18n('bot-wikidata-abbr') - points = '%.1f p' % brutto + points = i18n('bot-points-sum', '%.1f' % brutto) if brutto != netto: points = '' + points + ' ' if netto != 0.: - points += '%.1f p' % netto + points += i18n('bot-points-sum', '%.1f' % netto) formatted += ' (%s)' % points formatted = '# ' + formatted diff --git a/ukbot/ukbot.py b/ukbot/ukbot.py index 096dd40..06f5800 100644 --- a/ukbot/ukbot.py +++ b/ukbot/ukbot.py @@ -18,7 +18,7 @@ import platform from dotenv import load_dotenv -from .common import get_mem_usage, STATE_NORMAL, InvalidContestPage, i18n, fetch_parsed_i18n +from .common import get_mem_usage, STATE_NORMAL, InvalidContestPage, Localization, i18n, fetch_parsed_i18n from .util import load_config from .contest import Contest from .contests import discover_contest_pages @@ -127,6 +127,8 @@ def main(): sites, sql = init_sites(config) + Localization().init(sites.homesite) + active_contests = list(discover_contest_pages(sql, sites.homesite, config, args.page)) logger.info('Number of active contests: %d', len(active_contests)) @@ -145,10 +147,10 @@ def main(): if status_template in te.templates: te.templates[status_template][0].parameters[1] = 'error' te.templates[status_template][0].parameters[2] = error_msg - contest_page.save(te.wikitext(), summary=fetch_parsed_i18n('bot-problem-encountered', site=sites.homesite)) + contest_page.save(te.wikitext(), summary=fetch_parsed_i18n('bot-problem-encountered')) else: out = '\n{{%s | error | %s }}' % (config['templates']['botinfo'], error_msg) - contest_page.save('dummy', summary=fetch_parsed_i18n('bot-problem-encountered', site=sites.homesite), appendtext=out) + contest_page.save('dummy', summary=fetch_parsed_i18n('bot-problem-encountered'), appendtext=out) raise # Update redirect page @@ -168,7 +170,7 @@ def main(): page = sites.homesite.pages[pagename] txt = '#REDIRECT [[%s]]'.format(contest_name) # FIXME – localize REDIRECT if page.text() != txt and not args.simulate: - page.save(txt, summary=fetch_parsed_i18n('bot-redirecting', contest_name, site=sites.homesite)) + page.save(txt, summary=fetch_parsed_i18n('bot-redirecting', contest_name)) runend = config['server_timezone'].localize(datetime.now()) runend_s = time.time() From da537513c1a5772eaa76d0a64c304221319780dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Harald=20S=C3=B8by?= Date: Tue, 8 Apr 2025 16:22:42 +0200 Subject: [PATCH 07/23] Cleanup: Remove files that are no longer necessary --- MANIFEST.in | 1 - Makefile | 113 ---------- config/sites/nowiki.yml | 4 +- locale/ca_ES.po | 430 ----------------------------------- locale/es_ES.po | 433 ------------------------------------ locale/eu_ES.po | 471 --------------------------------------- locale/fi_FI.po | 472 --------------------------------------- locale/gl_ES.po | 427 ----------------------------------- locale/messages.pot | 395 -------------------------------- locale/nb_NO.po | 482 ---------------------------------------- setup.py | 2 +- 11 files changed, 3 insertions(+), 3227 deletions(-) delete mode 100644 MANIFEST.in delete mode 100644 Makefile delete mode 100644 locale/ca_ES.po delete mode 100644 locale/es_ES.po delete mode 100644 locale/eu_ES.po delete mode 100644 locale/fi_FI.po delete mode 100644 locale/gl_ES.po delete mode 100644 locale/messages.pot delete mode 100644 locale/nb_NO.po diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 85c9a00..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1 +0,0 @@ -include locale/*/*/*.mo \ No newline at end of file diff --git a/Makefile b/Makefile deleted file mode 100644 index cdf9d1a..0000000 --- a/Makefile +++ /dev/null @@ -1,113 +0,0 @@ -# encoding=utf-8 -# vim: fenc=utf-8 noet sw=4 ts=4 sts=4 ai - -# Add more languages here! Beware that this is a makefile snippet and -# you have to adhere to make syntax. -LINGUAS = nb_NO \ - ca_ES \ - fi_FI \ - gl_ES \ - es_ES \ - eu_ES - -# Textdomain for our package. -TEXTDOMAIN = messages - -localedir = ./locale -targetdir = ./locale -sourcedir = ./ukbot - -CATALOGS = $(LINGUAS) -MO_FILES = $(addprefix $(localedir)/, $(addsuffix .mo, $(LINGUAS))) -SOURCE_FILES = $(wildcard ukbot/*.py ukbot/rules/*.py ukbot/filters/*.py) -MSGMERGE = msgmerge -MSGFMT = msgfmt -XGETTEXT = xgettext -CATOBJEXT = .po - -TD = $(strip $(TEXTDOMAIN)) - -default: help - -all: $(TD).pot update-po update-mo install -# makedb - -help: - @echo "Available targets:" - @echo " pot - Regenerate master catalog from source files" - @echo " update-po - Update po files from master catalog" - @echo " update-mo - Regenerate mo files from po files" - @echo " install - Install mo files" - @echo " all - All of the above" - -#POTFILES = $(localedir)/POTFILES.in \ -# $(shell cat $(localedir)/POTFILES.in) - -pot: $(TD).pot - -clean: - for dir in ./ $(localedir); do \ - rm -fv $$dir/*~ $$dir/*.bak $$dir/*.mo $$dir/*.pox $$dir/*.pot; \ - done - - -# Use xgettext to extract strings from the source code -# files listed in POTFILESS.in - -$(TD).pot: $(SOURCE_FILES) - $(XGETTEXT) --output=$(localedir)/$(TD).pox $(SOURCE_FILES) - rm -f $(localedir)/$@ && mv $(localedir)/$(TD).pox $(localedir)/$@ - -install: $(MO_FILES) - languages='$(LINGUAS)'; \ - for lang in $$languages; do \ - mkdir -p "$(targetdir)/$$lang/LC_MESSAGES" || exit 1; \ - dest="$(targetdir)/$$lang/LC_MESSAGES/$(TD).mo"; \ - cat="$(localedir)/$$lang.mo"; \ - echo "installing $$cat as $$dest"; \ - mv -f $$cat $$dest && chmod 644 $$dest || exit 1; \ - done - -update-mo: $(MO_FILES) - -update-po: - $(MAKE) $(TD).pot - cd $(localedir); \ - catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ - mv $$lang.po $$lang.old.po; \ - echo "$$lang:"; \ - if $(MSGMERGE) $$lang.old.po $(TD).pot -o $$lang.po; then \ - rm -f $$lang.old.po; \ - else \ - echo "msgmerge for $$cat failed!"; \ - rm -f $$lang.po; \ - mv $$lang.old.po $$lang.po; \ - fi; \ - done - -.SUFFIXES: -.SUFFIXES: .po .mo - -.po.mo: - $(MSGFMT) --verbose -o $@ $< - -# $(MSGFMT) --check --statistics --verbose -o $@ $< - - -#makedb: -# ./db/initialize.sh - - -#MSGSRC=$(wildcard locale/*/LC_MESSAGES/messages.po) -#MSGOBJ=$(addprefix $(TARGET_BUILD_PATH)/$(target)/,$(MSG_SRC:.po=.mo)) - -#gettext: $(MSGOBJS) - -#locale/%/LC_MESSAGES/messages.mo: locale/%/LC_MESSAGES/messages.po -# msgfmt -c $< -o $@ - - -#.PHONY: makedb diff --git a/config/sites/nowiki.yml b/config/sites/nowiki.yml index 4237679..58008f2 100644 --- a/config/sites/nowiki.yml +++ b/config/sites/nowiki.yml @@ -8,8 +8,8 @@ othersites: - nn.wikipedia.org - se.wikipedia.org - smn.wikipedia.org - - www.wikidata.org - - commons.wikimedia.org + #- www.wikidata.org + #- commons.wikimedia.org default_prefix: no wikidata_languages: ['nb', 'nn', 'en', 'se', 'smn'] contestPages: diff --git a/locale/ca_ES.po b/locale/ca_ES.po deleted file mode 100644 index bc8199c..0000000 --- a/locale/ca_ES.po +++ /dev/null @@ -1,430 +0,0 @@ -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# -# Joan Creus , 2020. -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-02 15:46+0200\n" -"PO-Revision-Date: 2020-11-24 20:36+0100\n" -"Last-Translator: Joan Creus \n" -"Language-Team: Catalan \n" -"Language: ca_ES\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Lokalize 19.12.3\n" - -#: ukbot/contest.py:65 -#, python-format -msgid "The filter name \"%s\" was not understood" -msgstr "El nom de filtre \"%s\" no s'ha entès" - -#: ukbot/contest.py:155 -msgid "Couldn't find the list of participants!" -msgstr "No s'ha trobat la llista de participants!" - -#: ukbot/contest.py:183 -#, python-format -msgid "" -"There are no point rules defined for this contest. Point rules are defined " -"by {{tl|%(template)s}}." -msgstr "" -"No hi ha regles de punts definides per a aquest concurs. Les regles de punts " -"es defineixen amb {{tl|%(template)s}}." - -#: ukbot/contest.py:228 -#, python-format -msgid "Could not parse {{tlx|%(template)s|%(firstarg)s}} template: %(err)s" -msgstr "" -"No s'ha pogut analitzar la plantilla {{tlx|%(template)s|%(firstarg)s}}: " -"%(err)s" - -#: ukbot/contest.py:258 -#, python-format -msgid "Unkown argument given to {{tl|%(template)s}}: %(argument)s" -msgstr "Argument desconegut passat a {{tl|%(template)s}}: %(argument)s" - -#: ukbot/contest.py:289 -#, python-format -msgid "Couldn't parse the date given to the {{tl|%(template)s}} template." -msgstr "" -"No s'ha pogut entendre la data que s'ha passat a la plantilla {{tl|" -"%(template)s}}." - -#: ukbot/contest.py:322 -#, python-format -msgid "" -"Could not find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" -"No s'ha pogut trobar l'usuari %(user)s que s'ha passat a la plantilla {{tl|" -"%(template)s}}." - -#: ukbot/contest.py:335 ukbot/contest.py:375 -#, python-format -msgid "" -"Failed to parse the %(template)s template: Did not find a site matching the " -"site prefix %(prefix)s" -msgstr "" -"No s'ha pogut analitzar la plantilla %(template)s: no hem trobat un site que " -"concordi amb el prefix que tenim: %(prefix)s" - -#: ukbot/contest.py:354 ukbot/contest.py:394 -#, python-format -msgid "" -"Couldn't find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" -"Could not find the user %(user)s given to the {{tl|%(template)s}} template." - -#: ukbot/contest.py:529 -msgid "Day" -msgstr "Dia" - -#: ukbot/contest.py:530 -msgid "Points" -msgstr "Punts" - -#: ukbot/contest.py:533 ukbot/contest.py:748 ukbot/contest.py:935 -#: ukbot/contest.py:936 ukbot/contest.py:937 -msgid "%e. %B %Y, %H:%M" -msgstr "%e %B %Y, %H:%M" - -#: ukbot/contest.py:534 -#, python-format -msgid "Updated %(date)s" -msgstr "Actualitzat %(date)s" - -#: ukbot/contest.py:569 -#, python-format -msgid "Weekly contest for week %(week)d" -msgstr "Concurs setmanal de la setmana %(week)d" - -#: ukbot/contest.py:571 -#, python-format -msgid "Weekly contest for week %(startweek)d–%(endweek)d" -msgstr "Concurs setmanal de la setmana %(startweek)d–%(endweek)d" - -#: ukbot/contest.py:649 -msgid "Regards" -msgstr "Atentament" - -#: ukbot/contest.py:649 -msgid "and" -msgstr "i" - -#: ukbot/contest.py:679 -#, python-format -msgid "" -"Now you must check if the results look ok. If there are error messages at " -"the bottom of the [[%(page)s|contest page]], you should check that the " -"related contributions have been awarded the correct number of points. Also " -"check if there are comments or complaints on the discussion page. If " -"everything looks fine, [%(link)s click here] (and save) to indicate that I " -"can send out the awards at first occasion." -msgstr "" -"Ara has de comprovar si els resultats semblen correctes. Si hi ha missatges " -"d'error al final de la [[%(page)s|pàgina del concurs]], hauries de comprovar " -"que les contribucions relacionades han rebut el nombre correcte de punts. " -"Comprova també si hi ha comentaris o queixes a la pàgina de discussió. Si " -"tot fa bona pinta, [%(link)s clica aquí] (i desa) per indicar que puc enviar " -"els premis de seguida que pugui." - -#: ukbot/contest.py:680 -msgid "Thanks, ~~~~" -msgstr "Gràcies, ~~~~" - -#: ukbot/contest.py:691 -#, python-format -msgid "Awards have been [%(link)s sent out]." -msgstr "S'han [%(link)s enviat] els premis." - -#: ukbot/contest.py:880 ukbot/ukbot.py:148 ukbot/ukbot.py:151 -msgid "UKBot encountered a problem" -msgstr "UKBot ha trobat un problema" - -#: ukbot/contest.py:930 -msgid "" -"This contest is closed – thanks to everyone who participated! Awards will be " -"sent out as soon as the contest organizer has checked the results." -msgstr "" -"Aquest concurs està tancat – gràcies a tothom que hi ha participat! Els " -"premis s'enviaran de seguida que l'organitzador del concurs n'hagi comprovat " -"els resultats." - -#: ukbot/contest.py:932 -msgid "This contest is closed – thanks to everyone who participated!" -msgstr "Aquest concurs està tancat – gràcies a tothom que hi ha participat!" - -#: ukbot/contest.py:939 -#, python-format -msgid "" -"Last updated %(lastupdate)s. The contest is open from %(startdate)s to " -"%(enddate)s." -msgstr "" -"Última actualització %(lastupdate)s. El concurs és obert des de " -"%(startdate)s fins %(enddate)s." - -#: ukbot/contest.py:960 -#, python-format -msgid "UKBot encountered the following problems with the page [[%s]]" -msgstr "UKBot ha trobat els següents problemes amb la pàgina [[%s]]" - -#: ukbot/contest.py:994 -#, python-format -msgid "Results markers %(start_marker)s and %(end_marker)s not found" -msgstr "" -"Els marcadors de resultats %(start_marker)s i %(end_marker)s no s'han trobat" - -#: ukbot/contest.py:1005 -#, python-format -msgid "No \"%(section_name)s\" section found." -msgstr "No s'ha trobat la secció \"%(section_name)s\"." - -#: ukbot/contest.py:1015 -msgid "Updating with final results, the contest is now closed." -msgstr "Actualitzant amb els resultats finals, el concurs queda tancat." - -#: ukbot/contest.py:1017 -msgid "Checking results and handing out awards" -msgstr "Comprovant els resultats i lliurant premis" - -#: ukbot/contest.py:1019 -msgid "Updating" -msgstr "Actualitzant" - -#: ukbot/contest.py:1149 -#, python-format -msgid "The weekly contest is: %(link)s" -msgstr "El concurs setmanal és. %(link)s" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "suspended since" -msgstr "suspès des de" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "%A, %H:%M" -msgstr "%A, %H:%M" - -#: ukbot/contributions.py:178 ukbot/user.py:679 -msgid "No qualifying contributions registered yet" -msgstr "Encara no s'hi han registrat contribucions qualificades" - -#: ukbot/contributions.py:181 -#, python-format -msgid "%d article" -msgid_plural "%d articles" -msgstr[0] "%d article" -msgstr[1] "%d articles" - -#: ukbot/contributions.py:187 -msgid "{{Kolonner}}" -msgstr "{{Columnes}}" - -#: ukbot/contributions.py:221 -msgid "%d.%m, %H:%M" -msgstr "%d.%m, %H:%M" - -#: ukbot/contributions.py:229 -msgid "capped at max" -msgstr "limitat al màxim" - -#: ukbot/contributions.py:265 -msgid "Category hit" -msgstr "Coincidència de categoria" - -#: ukbot/contributions.py:278 -#, fuzzy, python-format -msgid "Total: %(bytecount)d bytes, %(wordcount)d words" -msgstr "Total: {{formatnum:%(bytecount)d}} bytes, %(wordcount)d paraules" - -#: ukbot/contributions.py:293 -msgid "" -"Note: The contributions to this article are currently " -"disqualified." -msgstr "" -"Nota: Les contribucions a aquest article estan " -"desqualificades actualment." - -#: ukbot/contributions.py:302 -msgid "N" -msgstr "N" - -#: ukbot/contributions.py:305 -msgid "W" -msgstr "W" - -#: ukbot/filters.py:150 -msgid "Too few arguments given to this template." -msgstr "Aquesta plantilla té massa pocs arguments." - -#: ukbot/filters.py:198 -#, python-format -msgid "" -"Could not analyze page %(article)s because the revision %(rev)d could not be " -"parsed: %(error)s" -msgstr "" -"No s'ha pogut analitzar la pàgina %(article)s perquè la revisió %(rev)d no " -"s'ha pogut entendre: %(error)s" - -#: ukbot/filters.py:233 -msgid "Could not parse the catignore page" -msgstr "No s'ha pogut entendre la pàgina catignore" - -#: ukbot/filters.py:238 -msgid "No category values given!" -msgstr "No s'han donat valors de categoria!" - -#: ukbot/filters.py:444 -msgid "Encountered an infinite category loop: " -msgstr "S'ha trobat un bucle de categories infinit:" - -#: ukbot/filters.py:483 -msgid "No byte limit (second argument) given" -msgstr "No s'ha donat el límit de bytes (segon argument)" - -#: ukbot/filters.py:720 -#, python-format -msgid "No \"%s\" parameter given" -msgstr "No s'ha donat el paràmetre \"%s\"" - -#: ukbot/revision.py:132 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because no words were found in the " -"parent revision (%(parentid)s) of size %(size)d, possibly due to unclosed " -"tags or templates in that revision." -msgstr "" -"Revisió [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: la " -"diferència en el nombre de paraules pot estar equivocada, perquè no s'han " -"trobat paraules a la revisió pare (%(parentid)s) de mida %(size)d, " -"possiblement perquè hi hagi tags o plantilles mal tancades en aquella " -"revisió." - -#: ukbot/revision.py:142 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because the word count increase " -"(%(words)d) is larger than the byte increase (%(bytes)d). Wrong word counts " -"can occur for invalid wiki text." -msgstr "" -"Revisió [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: la " -"diferència en el nombre de paraules pot estar equivocada, perquè l'augment " -"(%(words)d) en el nombre de paraules és més gran que l'augment de bytes " -"(%(bytes)d). Poden sortir recomptes incorrectes si el viquitext no és vàlid." - -#: ukbot/sites.py:63 -#, python-format -msgid "Page does not exist: [[%(pagename)s]]" -msgstr "La pàgina no existeix: [[%(pagename)s]]" - -#: ukbot/sites.py:80 -#, python-format -msgid "Could not found a site matching the prefix \"%(key)s\"" -msgstr "No s'ha trobat un site que concordi amb el prefix \"%(key)s\"" - -#: ukbot/ukbot.py:169 -#, python-format -msgid "#REDIRECT [[%s]]" -msgstr "#REDIRECT [[%s]]" - -#: ukbot/ukbot.py:171 -#, python-format -msgid "Redirecting to %s" -msgstr "Redirigint a %s" - -#: ukbot/user.py:681 -msgid "articles" -msgstr "articles" - -#: ukbot/user.py:683 -msgid "{{Kolonner}}\n" -msgstr "{{Columnes}}\n" - -#: ukbot/rules/byte.py:20 -#, python-format -msgid "%(bytes).f bytes" -msgstr "%(bytes).f bytes" - -#: ukbot/rules/contrib.py:16 -msgid "contribution" -msgstr "contribució" - -#: ukbot/rules/external_link.py:30 -msgid "links" -msgstr "enllaços" - -#: ukbot/rules/image.py:142 -msgid "images" -msgstr "imatges" - -#: ukbot/rules/new.py:16 -msgid "new page" -msgstr "pàgina nova" - -#: ukbot/rules/qualified.py:22 -msgid "qualified" -msgstr "qualificat" - -#: ukbot/rules/redirect.py:16 -msgid "redirect" -msgstr "redirecció" - -#: ukbot/rules/ref.py:81 -msgid "references" -msgstr "referències" - -#: ukbot/rules/ref.py:85 -msgid "reference pointers" -msgstr "punters de referència" - -#: ukbot/rules/regexp.py:19 -msgid "regexp" -msgstr "expressió regular" - -#: ukbot/rules/regexp.py:44 -msgid "section" -msgstr "secció" - -#: ukbot/rules/rule.py:76 -#, python-format -msgid "bonus %(words)d words" -msgstr "%(words)d paraules bonificades" - -#: ukbot/rules/templateremoval.py:88 -#, python-format -msgid "removal of {{tl|%(template)s}}" -msgstr "esborrament de {{tl|%(template)s}}" - -#: ukbot/rules/wikidata.py:47 -#, python-format -msgid "label (%(lang)s)" -msgstr "etiqueta (%(lang)s)" - -#: ukbot/rules/wikidata.py:53 -#, python-format -msgid "description (%(lang)s)" -msgstr "descripció (%(lang)s)" - -#: ukbot/rules/wikidata.py:59 -#, python-format -msgid "alias (%(lang)s)" -msgstr "àlies (%(lang)s)" - -#: ukbot/rules/wikidata.py:72 -#, python-format -msgid "%(property)s statement" -msgstr "declaració de %(property)s" - -#: ukbot/rules/wikidata.py:73 -#, python-format -msgid "%(count)d %(property)s statements" -msgstr "%(count)d declaracions de %(property)s" - -#: ukbot/rules/word.py:20 -#, python-format -msgid "%(words).f words" -msgstr "%(words).f paraules" diff --git a/locale/es_ES.po b/locale/es_ES.po deleted file mode 100644 index 89a2718..0000000 --- a/locale/es_ES.po +++ /dev/null @@ -1,433 +0,0 @@ -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# -# Rubén Ojeda , 2025 -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-02 15:46+0200\n" -"PO-Revision-Date: 2020-11-24 20:36+0100\n" -"Last-Translator: Rubén Ojeda \n" -"Language: es_ES\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Lokalize 19.12.3\n" - -#: ukbot/contest.py:65 -#, python-format -msgid "The filter name \"%s\" was not understood" -msgstr "No se entendió el nombre del filtro \"%s\"" - -#: ukbot/contest.py:155 -msgid "Couldn't find the list of participants!" -msgstr "¡No se ha encontrado la lista de participantes!" - -#: ukbot/contest.py:183 -#, python-format -msgid "" -"There are no point rules defined for this contest. Point rules are defined " -"by {{tl|%(template)s}}." -msgstr "" -"No existen reglas de puntos definidas para este concurso. Las reglas de " -"puntos se definen con {{tl|%(template)s}}." - -#: ukbot/contest.py:228 -#, python-format -msgid "Could not parse {{tlx|%(template)s|%(firstarg)s}} template: %(err)s" -msgstr "" -"No se pudo analizar la plantilla {{tlx|%(template)s|%(firstarg)s}}: %(err)s" - -#: ukbot/contest.py:258 -#, python-format -msgid "Unkown argument given to {{tl|%(template)s}}: %(argument)s" -msgstr "" -"Argumento desconocido proporcionado a {{tl|%(template)s}}: %(argument)s" - -#: ukbot/contest.py:289 -#, python-format -msgid "Couldn't parse the date given to the {{tl|%(template)s}} template." -msgstr "" -"No se pudo entender la fecha proporcionada a la plantilla {{tl|" -"%(template)s}}." - -#: ukbot/contest.py:322 -#, python-format -msgid "" -"Could not find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" -"No se pudo encontrar el usuario %(user)s proporcionado a la plantilla {{tl|" -"%(template)s}}." - -#: ukbot/contest.py:335 ukbot/contest.py:375 -#, python-format -msgid "" -"Failed to parse the %(template)s template: Did not find a site matching the " -"site prefix %(prefix)s" -msgstr "" -"No se pudo analizar la plantilla %(template)s: no hemos encontrado un site " -"que concuerde con el prefijo que tenemos: %(prefix)s" - -#: ukbot/contest.py:354 ukbot/contest.py:394 -#, python-format -msgid "" -"Couldn't find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" -"No se pudo encontrar el usuario %(user)s proporcionado a la plantilla {{tl|" -"%(template)s}}." - -#: ukbot/contest.py:529 -msgid "Day" -msgstr "Día" - -#: ukbot/contest.py:530 -msgid "Points" -msgstr "Puntos" - -#: ukbot/contest.py:533 ukbot/contest.py:748 ukbot/contest.py:935 -#: ukbot/contest.py:936 ukbot/contest.py:937 -msgid "%e. %B %Y, %H:%M" -msgstr "%e %B %Y, %H:%M" - -#: ukbot/contest.py:534 -#, python-format -msgid "Updated %(date)s" -msgstr "Actualizado %(date)s" - -#: ukbot/contest.py:569 -#, python-format -msgid "Weekly contest for week %(week)d" -msgstr "Concurso semanal de la semana %(week)d" - -#: ukbot/contest.py:571 -#, python-format -msgid "Weekly contest for week %(startweek)d–%(endweek)d" -msgstr "Concurso semanal de la semana %(startweek)d–%(endweek)d" - -#: ukbot/contest.py:649 -msgid "Regards" -msgstr "Atentamente" - -#: ukbot/contest.py:649 -msgid "and" -msgstr "y" - -#: ukbot/contest.py:679 -#, python-format -msgid "" -"Now you must check if the results look ok. If there are error messages at " -"the bottom of the [[%(page)s|contest page]], you should check that the " -"related contributions have been awarded the correct number of points. Also " -"check if there are comments or complaints on the discussion page. If " -"everything looks fine, [%(link)s click here] (and save) to indicate that I " -"can send out the awards at first occasion." -msgstr "" -"Ahora debes comprobar si los resultados parecen correctos. Si hay mensajes " -"de error al final de la [[%(page)s|página del concurso]], deberías comprobar " -"que las contribuciones relacionadas han recibido el número correcto de " -"puntos. Comprueba también si hay comentarios o quejas en la página de " -"discusión. Si todo está bien, [%(link)s haz clic aquí] (y guarda) para " -"indicar que puedo enviar los premios en cuanto pueda." - -#: ukbot/contest.py:680 -msgid "Thanks, ~~~~" -msgstr "Gracias, ~~~~" - -#: ukbot/contest.py:691 -#, python-format -msgid "Awards have been [%(link)s sent out]." -msgstr "Se han [%(link)s enviado] los premios." - -#: ukbot/contest.py:880 ukbot/ukbot.py:148 ukbot/ukbot.py:151 -msgid "UKBot encountered a problem" -msgstr "UKBot ha encontrado un problema" - -#: ukbot/contest.py:930 -msgid "" -"This contest is closed – thanks to everyone who participated! Awards will be " -"sent out as soon as the contest organizer has checked the results." -msgstr "" -"Este concurso ha acabado – ¡gracias a todas las personas que han " -"participado! Los premios se enviarán en cuanto el organizador del concurso " -"haya comprobado los resultados." - -#: ukbot/contest.py:932 -msgid "This contest is closed – thanks to everyone who participated!" -msgstr "" -"Este concurso ha acabado – ¡gracias a todas las personas que han participado!" - -#: ukbot/contest.py:939 -#, python-format -msgid "" -"Last updated %(lastupdate)s. The contest is open from %(startdate)s to " -"%(enddate)s." -msgstr "" -"Última actualización %(lastupdate)s. El concurso está abierto desde " -"%(startdate)s hasta %(enddate)s." - -#: ukbot/contest.py:960 -#, python-format -msgid "UKBot encountered the following problems with the page [[%s]]" -msgstr "UKBot ha encontrado los siguientes problemas con la página [[%s]]" - -#: ukbot/contest.py:994 -#, python-format -msgid "Results markers %(start_marker)s and %(end_marker)s not found" -msgstr "" -"Los marcadores de resultados %(start_marker)s y %(end_marker)s no se han " -"encontrado" - -#: ukbot/contest.py:1005 -#, python-format -msgid "No \"%(section_name)s\" section found." -msgstr "No se ha encontrado la sección \"%(section_name)s\"." - -#: ukbot/contest.py:1015 -msgid "Updating with final results, the contest is now closed." -msgstr "Actualizando con los resultados finales, el concurso ha acabado." - -#: ukbot/contest.py:1017 -msgid "Checking results and handing out awards" -msgstr "Comprobando los resultados y entregando premios" - -#: ukbot/contest.py:1019 -msgid "Updating" -msgstr "Actualizando" - -#: ukbot/contest.py:1149 -#, python-format -msgid "The weekly contest is: %(link)s" -msgstr "El concurso semanal es: %(link)s" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "suspended since" -msgstr "suspendido desde" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "%A, %H:%M" -msgstr "%A, %H:%M" - -#: ukbot/contributions.py:178 ukbot/user.py:679 -msgid "No qualifying contributions registered yet" -msgstr "Aún no se han registrado contribuciones calificadas" - -#: ukbot/contributions.py:181 -#, python-format -msgid "%d article" -msgid_plural "%d articles" -msgstr[0] "%d artículo" -msgstr[1] "%d artículos" - -#: ukbot/contributions.py:187 -msgid "{{Kolonner}}" -msgstr "{{Columnas}}" - -#: ukbot/contributions.py:221 -msgid "%d.%m, %H:%M" -msgstr "%d.%m, %H:%M" - -#: ukbot/contributions.py:229 -msgid "capped at max" -msgstr "limitado al máximo" - -#: ukbot/contributions.py:265 -msgid "Category hit" -msgstr "Coincidencia de categoría" - -#: ukbot/contributions.py:278 -#, fuzzy, python-format -msgid "Total: %(bytecount)d bytes, %(wordcount)d words" -msgstr "Total: {{formatnum:%(bytecount)d}} bytes, %(wordcount)d palabras" - -#: ukbot/contributions.py:293 -msgid "" -"Note: The contributions to this article are currently " -"disqualified." -msgstr "" -"Nota: Las contribuciones a este artículo están " -"descalificadas actualmente." - -#: ukbot/contributions.py:302 -msgid "N" -msgstr "N" - -#: ukbot/contributions.py:305 -msgid "W" -msgstr "W" - -#: ukbot/filters.py:150 -msgid "Too few arguments given to this template." -msgstr "Esta plantilla tiene demasiados pocos argumentos." - -#: ukbot/filters.py:198 -#, python-format -msgid "" -"Could not analyze page %(article)s because the revision %(rev)d could not be " -"parsed: %(error)s" -msgstr "" -"No se pudo analizar la página %(article)s porque la revisión %(rev)d no se " -"ha podido entender: %(error)s" - -#: ukbot/filters.py:233 -msgid "Could not parse the catignore page" -msgstr "No se pudo entender la página catignore" - -#: ukbot/filters.py:238 -msgid "No category values given!" -msgstr "¡No se han dado valores de categoría!" - -#: ukbot/filters.py:444 -msgid "Encountered an infinite category loop: " -msgstr "Se ha encontrado un bucle de categorías infinito:" - -#: ukbot/filters.py:483 -msgid "No byte limit (second argument) given" -msgstr "No se ha dado el límite de bytes (segundo argumento)" - -#: ukbot/filters.py:720 -#, python-format -msgid "No \"%s\" parameter given" -msgstr "No se ha dado el parámetro \"%s\"" - -#: ukbot/revision.py:132 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because no words were found in the " -"parent revision (%(parentid)s) of size %(size)d, possibly due to unclosed " -"tags or templates in that revision." -msgstr "" -"Revisión [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: la " -"diferencia en el número de palabras puede estar equivocada, porque no se han " -"encontrado palabras en la revisión (%(parentid)s) de tamaño %(size)d, " -"posiblemente porque que hay tags o plantillas mal cerradas en aquella " -"revisión." - -#: ukbot/revision.py:142 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because the word count increase " -"(%(words)d) is larger than the byte increase (%(bytes)d). Wrong word counts " -"can occur for invalid wiki text." -msgstr "" -"Revisión [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: la " -"diferencia en el número de palabras puede estar equivocada, porque el " -"aumento (%(words)d) en el número de palabras es mayor que el aumento de " -"bytes (%(bytes)d). Pueden salir recuentos incorrectos si el wikitexto no es " -"válido." - -#: ukbot/sites.py:63 -#, python-format -msgid "Page does not exist: [[%(pagename)s]]" -msgstr "La página no existe: [[%(pagename)s]]" - -#: ukbot/sites.py:80 -#, python-format -msgid "Could not found a site matching the prefix \"%(key)s\"" -msgstr "No se ha encontrado un site que concuerde con el prefijo \"%(key)s\"" - -#: ukbot/ukbot.py:169 -#, python-format -msgid "#REDIRECT [[%s]]" -msgstr "#REDIRECT [[%s]]" - -#: ukbot/ukbot.py:171 -#, python-format -msgid "Redirecting to %s" -msgstr "Redirigiendo a %s" - -#: ukbot/user.py:681 -msgid "articles" -msgstr "artículos" - -#: ukbot/user.py:683 -msgid "{{Kolonner}}\n" -msgstr "{{Columnas}}\n" - -#: ukbot/rules/byte.py:20 -#, python-format -msgid "%(bytes).f bytes" -msgstr "%(bytes).f bytes" - -#: ukbot/rules/contrib.py:16 -msgid "contribution" -msgstr "contribución" - -#: ukbot/rules/external_link.py:30 -msgid "links" -msgstr "enlaces" - -#: ukbot/rules/image.py:142 -msgid "images" -msgstr "imágenes" - -#: ukbot/rules/new.py:16 -msgid "new page" -msgstr "página nueva" - -#: ukbot/rules/qualified.py:22 -msgid "qualified" -msgstr "calificado" - -#: ukbot/rules/redirect.py:16 -msgid "redirect" -msgstr "redirección" - -#: ukbot/rules/ref.py:81 -msgid "references" -msgstr "referencias" - -#: ukbot/rules/ref.py:85 -msgid "reference pointers" -msgstr "punteros de referencia" - -#: ukbot/rules/regexp.py:19 -msgid "regexp" -msgstr "regexp" - -#: ukbot/rules/regexp.py:44 -msgid "section" -msgstr "sección" - -#: ukbot/rules/rule.py:76 -#, python-format -msgid "bonus %(words)d words" -msgstr "%(words)d palabras extra" - -#: ukbot/rules/templateremoval.py:88 -#, python-format -msgid "removal of {{tl|%(template)s}}" -msgstr "borrado de {{tl|%(template)s}}" - -#: ukbot/rules/wikidata.py:47 -#, python-format -msgid "label (%(lang)s)" -msgstr "etiqueta (%(lang)s)" - -#: ukbot/rules/wikidata.py:53 -#, python-format -msgid "description (%(lang)s)" -msgstr "descripción (%(lang)s)" - -#: ukbot/rules/wikidata.py:59 -#, python-format -msgid "alias (%(lang)s)" -msgstr "alias (%(lang)s)" - -#: ukbot/rules/wikidata.py:72 -#, python-format -msgid "%(property)s statement" -msgstr "declaración de %(property)s" - -#: ukbot/rules/wikidata.py:73 -#, python-format -msgid "%(count)d %(property)s statements" -msgstr "%(count)d declaraciones de %(property)s" - -#: ukbot/rules/word.py:20 -#, python-format -msgid "%(words).f words" -msgstr "%(words).f palabras" diff --git a/locale/eu_ES.po b/locale/eu_ES.po deleted file mode 100644 index 5de469b..0000000 --- a/locale/eu_ES.po +++ /dev/null @@ -1,471 +0,0 @@ -# Basque translation for UKBot -# Copyright (C) 2017 -# This file is distributed under the same license as the UKBot package. -# Galder Gonzalez Larrañaga , 2017 -# -msgid "" -msgstr "" -"Project-Id-Version: UKBot\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-02 15:46+0200\n" -"PO-Revision-Date: 2019-09-05 01:57+0200\n" -"Last-Translator: Galder Gonzalez \n" -"Language-Team: \n" -"Language: eu\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 2.2.3\n" - -#: ukbot/contest.py:65 -#, python-format -msgid "The filter name \"%s\" was not understood" -msgstr "" - -#: ukbot/contest.py:155 -msgid "Couldn't find the list of participants!" -msgstr "Ezin izan da parte-hartzaileen zerrendarik aurkitu!" - -#: ukbot/contest.py:183 -#, python-format -msgid "" -"There are no point rules defined for this contest. Point rules are defined " -"by {{tl|%(template)s}}." -msgstr "" -"Ez dago puntuazio araurik lehiaketa honetan. Puntuak {{tx|%(template)s}}." -"txantiloiak definitzen ditu." - -#: ukbot/contest.py:228 -#, fuzzy, python-format -msgid "Could not parse {{tlx|%(template)s|%(firstarg)s}} template: %(err)s" -msgstr "Ezin izan da {{tx|%(template)s}} txantiloia irakurri." - -#: ukbot/contest.py:258 -#, python-format -msgid "Unkown argument given to {{tl|%(template)s}}: %(argument)s" -msgstr "Parametro ezezaguna eman da {{tx|%(template)s}}: %(argument)s" - -#: ukbot/contest.py:289 -#, python-format -msgid "Couldn't parse the date given to the {{tl|%(template)s}} template." -msgstr "Ezin izan da emandako data kalkulatu {{tx|%(template)s}} txantiloian." - -#: ukbot/contest.py:322 -#, python-format -msgid "" -"Could not find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" -"Ezin izan da %(user)s wikilaria aurkitu {{tx|%(template)s}} txantiloian." - -#: ukbot/contest.py:335 ukbot/contest.py:375 -#, python-format -msgid "" -"Failed to parse the %(template)s template: Did not find a site matching the " -"site prefix %(prefix)s" -msgstr "" - -#: ukbot/contest.py:354 ukbot/contest.py:394 -#, python-format -msgid "" -"Couldn't find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" -"Ezin izan da %(user)s wikilaria aurkitu {{tx|%(template)s}} txantiloian." - -#: ukbot/contest.py:529 -msgid "Day" -msgstr "Eguna" - -#: ukbot/contest.py:530 -msgid "Points" -msgstr "Puntuak" - -#: ukbot/contest.py:533 ukbot/contest.py:748 ukbot/contest.py:935 -#: ukbot/contest.py:936 ukbot/contest.py:937 -msgid "%e. %B %Y, %H:%M" -msgstr "%Y %B %e, %H:%M" - -#: ukbot/contest.py:534 -#, python-format -msgid "Updated %(date)s" -msgstr "Azken gaurkotzea: %(date)s" - -#: ukbot/contest.py:569 -#, python-format -msgid "Weekly contest for week %(week)d" -msgstr "Asteroko lehiaketa aste honetan: %(week)d" - -#: ukbot/contest.py:571 -#, python-format -msgid "Weekly contest for week %(startweek)d–%(endweek)d" -msgstr "Asteroko lehiaketa aste honetan: %(startweek)d-%(endweek)d" - -#: ukbot/contest.py:649 -msgid "Regards" -msgstr "Ondo segi" - -#: ukbot/contest.py:649 -msgid "and" -msgstr "eta" - -#: ukbot/contest.py:679 -#, python-format -msgid "" -"Now you must check if the results look ok. If there are error messages at " -"the bottom of the [[%(page)s|contest page]], you should check that the " -"related contributions have been awarded the correct number of points. Also " -"check if there are comments or complaints on the discussion page. If " -"everything looks fine, [%(link)s click here] (and save) to indicate that I " -"can send out the awards at first occasion." -msgstr "" -"Orain ikusi behar duzu ea emaitzek itxura ona duten. Akatsik badago mezuetan " -"[[%(page)s|lehiaketaren orrialdearen]] amaieran, begiratu beharko zenuke ea " -"ekarpen guztiek puntu kopuru zuzena jaso ote duten. Gainera konproba ezazu " -"denak itxura ona duela, [%(link)s egin klik hemen] (eta gorde) esateko bidal " -"ditzakedala jada sariak." - -#: ukbot/contest.py:680 -msgid "Thanks, ~~~~" -msgstr "Eskerrik asko, ~~~~" - -#: ukbot/contest.py:691 -#, python-format -msgid "Awards have been [%(link)s sent out]." -msgstr "Sariak [%(link)s bidali dira]." - -#: ukbot/contest.py:880 ukbot/ukbot.py:148 ukbot/ukbot.py:151 -msgid "UKBot encountered a problem" -msgstr "UKBotek arazo bat aurkitu du" - -#: ukbot/contest.py:930 -msgid "" -"This contest is closed – thanks to everyone who participated! Awards will be " -"sent out as soon as the contest organizer has checked the results." -msgstr "" -"Lehiaketa hau itxita dago - eskerrik asko parte-hartzaile guztiei! Sariak " -"emango dira lehiaketaren antolatzaileak emaitzak berrikusten dituenean." - -#: ukbot/contest.py:932 -msgid "This contest is closed – thanks to everyone who participated!" -msgstr "Lehiaketa hau itxita dag - eskerrik asko parte-hartzailee guztiei!" - -#: ukbot/contest.py:939 -#, python-format -msgid "" -"Last updated %(lastupdate)s. The contest is open from %(startdate)s to " -"%(enddate)s." -msgstr "" -"Azken gaurkotzea: %(lastupdate)s. Lehiaketa hau %(startdate)s eta " -"%(enddate)s bitarte irekita dago." - -#: ukbot/contest.py:960 -#, fuzzy, python-format -msgid "UKBot encountered the following problems with the page [[%s]]" -msgstr "UKBotek honako akatsa aurkitu du artikuluan: [[:%s]]" - -#: ukbot/contest.py:994 -#, python-format -msgid "Results markers %(start_marker)s and %(end_marker)s not found" -msgstr "" - -#: ukbot/contest.py:1005 -#, python-format -msgid "No \"%(section_name)s\" section found." -msgstr "" - -#: ukbot/contest.py:1015 -msgid "Updating with final results, the contest is now closed." -msgstr "Azken emaitzekin gaurkotzen, lehiaketa itxiko da." - -#: ukbot/contest.py:1017 -msgid "Checking results and handing out awards" -msgstr "Emaitzak konprobatzen eta sariak ematen" - -#: ukbot/contest.py:1019 -msgid "Updating" -msgstr "Gaurkotzen" - -#: ukbot/contest.py:1149 -#, python-format -msgid "The weekly contest is: %(link)s" -msgstr "Aste honetako lehiaketa: %(link)s" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "suspended since" -msgstr "noiztik suspenditua" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "%A, %H:%M" -msgstr "%A, %H.%M" - -#: ukbot/contributions.py:178 ukbot/user.py:679 -msgid "No qualifying contributions registered yet" -msgstr "Ez du egin lehiaketa honetarako ekarpen baliagarririk oraindik" - -#: ukbot/contributions.py:181 -#, fuzzy, python-format -msgid "%d article" -msgid_plural "%d articles" -msgstr[0] "artikulu" -msgstr[1] "artikulu" - -#: ukbot/contributions.py:187 -msgid "{{Kolonner}}" -msgstr "{{Multicol}}" - -#: ukbot/contributions.py:221 -msgid "%d.%m, %H:%M" -msgstr "%Y %B %e, %H:%M" - -#: ukbot/contributions.py:229 -msgid "capped at max" -msgstr "" - -#: ukbot/contributions.py:265 -msgid "Category hit" -msgstr "Kategoria" - -#: ukbot/contributions.py:278 -#, fuzzy, python-format -msgid "Total: %(bytecount)d bytes, %(wordcount)d words" -msgstr "Guztira: {{formatnum:%(bytecount)d}} byte, %(wordcount)d hitzetan" - -#: ukbot/contributions.py:293 -msgid "" -"Note: The contributions to this article are currently " -"disqualified." -msgstr "" -"Oharra: Artikulu honi egindako ekarpenak oraintxe " -"deskalifikaturik daude." - -#: ukbot/contributions.py:302 -msgid "N" -msgstr "B" - -#: ukbot/contributions.py:305 -#, fuzzy -msgid "W" -msgstr "B" - -#: ukbot/filters.py:150 -#, fuzzy -msgid "Too few arguments given to this template." -msgstr "Parametro ezezaguna eman da {{tx|%(template)s}}: %(argument)s" - -#: ukbot/filters.py:198 -#, fuzzy, python-format -msgid "" -"Could not analyze page %(article)s because the revision %(rev)d could not be " -"parsed: %(error)s" -msgstr "" -"Ezin izan da %(article)s artikulua aztertu berrikuspenetako bat %(prevrev)d " -"edo %(rev)d ezin izan delako ikusi: %(error)s" - -#: ukbot/filters.py:233 -msgid "Could not parse the catignore page" -msgstr "Ezin izan da catignore orrialdea kargatu" - -#: ukbot/filters.py:238 -msgid "No category values given!" -msgstr "" - -#: ukbot/filters.py:444 -msgid "Encountered an infinite category loop: " -msgstr "Kategoria infinitu lotuar bat aurkitu da: " - -#: ukbot/filters.py:483 -#, fuzzy -msgid "No byte limit (second argument) given" -msgstr "" -"Ez zaio byte mugarik eman (bigarren argumentua) {tx|%(template)s|" -"%(firstarg)s}} txantiloiari" - -#: ukbot/filters.py:720 -#, python-format -msgid "No \"%s\" parameter given" -msgstr "" - -#: ukbot/revision.py:132 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because no words were found in the " -"parent revision (%(parentid)s) of size %(size)d, possibly due to unclosed " -"tags or templates in that revision." -msgstr "" -"[//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s] berrikusketa: " -"Hitz zenbaketa ezberdina izan daiteke eta akatsak izan, ez direlako hitzak " -"aurkitu aurreko berriskupenean (%(parentid)s) tamaina honekin %(size)d, " -"ziurrenik itxi gabeko etiketa edo txantiloiak direla eta." - -#: ukbot/revision.py:142 -#, fuzzy, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because the word count increase " -"(%(words)d) is larger than the byte increase (%(bytes)d). Wrong word counts " -"can occur for invalid wiki text." -msgstr "" -"[//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s] berrikuspena: " -"hitz zenbaketa ezberdintasuna gaizki egon daiteke, hitz kontaketaren aldea " -"(%(words)d) handiagoa delako byte kontaketaren aldea baino (%(bytes)d)." -"Gaizki egindako hitz kontaketa wiki testu okerra dela eta gerta daiteke." - -#: ukbot/sites.py:63 -#, python-format -msgid "Page does not exist: [[%(pagename)s]]" -msgstr "" - -#: ukbot/sites.py:80 -#, python-format -msgid "Could not found a site matching the prefix \"%(key)s\"" -msgstr "" - -#: ukbot/ukbot.py:169 -#, python-format -msgid "#REDIRECT [[%s]]" -msgstr "#BIRZUZENDU [[%s]]" - -#: ukbot/ukbot.py:171 -#, python-format -msgid "Redirecting to %s" -msgstr "%s orrialdera birzuzentzen" - -#: ukbot/user.py:681 -msgid "articles" -msgstr "artikulu" - -#: ukbot/user.py:683 -msgid "{{Kolonner}}\n" -msgstr "{{Multicol}}\n" - -#: ukbot/rules/byte.py:20 -#, python-format -msgid "%(bytes).f bytes" -msgstr "%(bytes).f byte" - -#: ukbot/rules/contrib.py:16 -msgid "contribution" -msgstr "ekarpena" - -#: ukbot/rules/external_link.py:30 -msgid "links" -msgstr "%(links).f lotura" - -#: ukbot/rules/image.py:142 -msgid "images" -msgstr "%(images).f irudi" - -#: ukbot/rules/new.py:16 -msgid "new page" -msgstr "orrialde berria" - -#: ukbot/rules/qualified.py:22 -msgid "qualified" -msgstr "kalifikatua" - -#: ukbot/rules/redirect.py:16 -msgid "redirect" -msgstr "birzuzeneketa" - -#: ukbot/rules/ref.py:81 -msgid "references" -msgstr "erreferentziak" - -#: ukbot/rules/ref.py:85 -msgid "reference pointers" -msgstr "erreferentzia berrerabilpena" - -#: ukbot/rules/regexp.py:19 -msgid "regexp" -msgstr "" - -#: ukbot/rules/regexp.py:44 -msgid "section" -msgstr "" - -#: ukbot/rules/rule.py:76 -#, python-format -msgid "bonus %(words)d words" -msgstr "bonus %(words)d hitz" - -#: ukbot/rules/templateremoval.py:88 -#, python-format -msgid "removal of {{tl|%(template)s}}" -msgstr "{{tx|%(template)s}} txantiloia kentzea" - -#: ukbot/rules/wikidata.py:47 -#, python-format -msgid "label (%(lang)s)" -msgstr "" - -#: ukbot/rules/wikidata.py:53 -#, python-format -msgid "description (%(lang)s)" -msgstr "" - -#: ukbot/rules/wikidata.py:59 -#, python-format -msgid "alias (%(lang)s)" -msgstr "" - -#: ukbot/rules/wikidata.py:72 -#, python-format -msgid "%(property)s statement" -msgstr "" - -#: ukbot/rules/wikidata.py:73 -#, python-format -msgid "%(count)d %(property)s statements" -msgstr "" - -#: ukbot/rules/word.py:20 -#, python-format -msgid "%(words).f words" -msgstr "%(words).f hitz" - -#~ msgid "This contest is missing a {{tl|%(template)s}} template." -#~ msgstr "Lehiaketa honek ez du {{tx|%(template)s}} txantiloia." - -#~ msgid "" -#~ "Did not find %(week)s+%(year)s or %(start)s+%(end)s in {{tl|" -#~ "%(templates)s}}." -#~ msgstr "" -#~ "Ez da aurkitu %(week)s+%(year)s edo %(start)s+%(end)s hemen: {{tx|" -#~ "%(templates)s}}." - -#~ msgid "" -#~ "Note that the contest this week is [[%(url)s|{{%(template)s|" -#~ "%(weekarg)s=%(week)s}}]]. Join in!" -#~ msgstr "" -#~ "Aste honetako lehiaketa honakoa da: [[%(url)s|{{%(template)s|" -#~ "%(weekarg)s=%(week)s}}]]. Batu!" - -#~ msgid "max" -#~ msgstr "gehienez" - -#~ msgid "added reference section" -#~ msgstr "erreferentzia atala gehitu du" - -#~ msgid "bonus %(bytes).f bytes" -#~ msgstr "bonus %(bytes).f byte" - -#~ msgid "" -#~ "No template (second argument) given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "" -#~ "Ez zaio bigarren argumentudun txantiloirik eman {{tx|%(template)s|" -#~ "%(firstarg)s}}" - -#~ msgid "No categories given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "Ez zaio kategoriarik eman {{tx|%(template)s|%(firstarg)s}}" - -#, fuzzy -#~ msgid "" -#~ "No \"%(query)s\" parameter given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "Ez zaio kategoriarik eman {{tx|%(template)s|%(firstarg)s}}" - -#~ msgid "Unknown argument given to {{tl|%(template)s}}: %(argument)s" -#~ msgstr "Parametro ezezaguna eman da {{tx|%(template)s}}: %(argument)s" - -#~ msgid "Found no \"%(section)s\" sections in the page \"%(page)s\"" -#~ msgstr "Ez da \"%(section)s\" sekziorik aurkitu \"%(page)s\" orrialdean" diff --git a/locale/fi_FI.po b/locale/fi_FI.po deleted file mode 100644 index 55e4239..0000000 --- a/locale/fi_FI.po +++ /dev/null @@ -1,472 +0,0 @@ -# Finnish translation for UKBot -# Copyright (C) 2013 -# This file is distributed under the same license as the UKBot package. -# Gálaniitoluodda, 2013 -# -msgid "" -msgstr "" -"Project-Id-Version: UKBot\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-02 15:46+0200\n" -"PO-Revision-Date: 2019-09-05 01:56+0200\n" -"Last-Translator: Dan Michael O. Heggø \n" -"Language-Team: \n" -"Language: fi\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 2.2.3\n" - -#: ukbot/contest.py:65 -#, python-format -msgid "The filter name \"%s\" was not understood" -msgstr "" - -#: ukbot/contest.py:155 -msgid "Couldn't find the list of participants!" -msgstr "Osallistujaluettelon löytäminen epäonnistui!" - -#: ukbot/contest.py:183 -#, python-format -msgid "" -"There are no point rules defined for this contest. Point rules are defined " -"by {{tl|%(template)s}}." -msgstr "" -"Tähän kilpailuun ei ole asetettu pistelaskusääntöjä. Säännöt merkitään näin: " -"{{tl|%(template)s}}." - -#: ukbot/contest.py:228 -#, fuzzy, python-format -msgid "Could not parse {{tlx|%(template)s|%(firstarg)s}} template: %(err)s" -msgstr "{{tl|%(template)s}}-mallineen ymmärtäminen epäonnistui." - -#: ukbot/contest.py:258 -#, python-format -msgid "Unkown argument given to {{tl|%(template)s}}: %(argument)s" -msgstr "" -"Tuntematon argumentti on annettu kohteeseen {{tl|%(template)s}}: %(argument)s" - -#: ukbot/contest.py:289 -#, python-format -msgid "Couldn't parse the date given to the {{tl|%(template)s}} template." -msgstr "" -"{{tl|%(template)s}}-mallineeseen annettu päivämäärä ei tullut ymmärretyksi." - -#: ukbot/contest.py:322 -#, python-format -msgid "" -"Could not find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "Käyttäjää %(user)s ri löytynyt {{tl|%(template)s}}-mallineesta." - -#: ukbot/contest.py:335 ukbot/contest.py:375 -#, python-format -msgid "" -"Failed to parse the %(template)s template: Did not find a site matching the " -"site prefix %(prefix)s" -msgstr "" - -#: ukbot/contest.py:354 ukbot/contest.py:394 -#, python-format -msgid "" -"Couldn't find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "Ei löydetty käyttäjää %(user)s {{tl|%(template)s}}-mallineesta." - -#: ukbot/contest.py:529 -msgid "Day" -msgstr "Päivä" - -#: ukbot/contest.py:530 -msgid "Points" -msgstr "Pisteet" - -#: ukbot/contest.py:533 ukbot/contest.py:748 ukbot/contest.py:935 -#: ukbot/contest.py:936 ukbot/contest.py:937 -msgid "%e. %B %Y, %H:%M" -msgstr "%e. %Bta %Y kello %H.%M" - -#: ukbot/contest.py:534 -#, python-format -msgid "Updated %(date)s" -msgstr "Päivitetty %(date)s" - -#: ukbot/contest.py:569 -#, python-format -msgid "Weekly contest for week %(week)d" -msgstr "Viikon %(week)d kilpailu" - -#: ukbot/contest.py:571 -#, python-format -msgid "Weekly contest for week %(startweek)d–%(endweek)d" -msgstr "Viikkojen %(startweek)d–%(endweek)d kilpailu" - -#: ukbot/contest.py:649 -msgid "Regards" -msgstr "Terveisin" - -#: ukbot/contest.py:649 -msgid "and" -msgstr "ja" - -#: ukbot/contest.py:679 -#, python-format -msgid "" -"Now you must check if the results look ok. If there are error messages at " -"the bottom of the [[%(page)s|contest page]], you should check that the " -"related contributions have been awarded the correct number of points. Also " -"check if there are comments or complaints on the discussion page. If " -"everything looks fine, [%(link)s click here] (and save) to indicate that I " -"can send out the awards at first occasion." -msgstr "" -"Nyt sinun on tarkistettava tulokset. Mikäli [[%(page)s|kilpailusivun]] " -"lopussa on virheilmoituksia, on sinun tarkistettava, että muokkauksista on " -"saatu oikea määrä pisteitä. Katso myös onko keskustelusivulla kommentteja " -"tai valituksia. Jos kaikki näyttää olevan kunnossa, paina [%(link)s tästä] " -"(ja tallenna), niin rusetit lähetetään melko nopeasti." - -#: ukbot/contest.py:680 -msgid "Thanks, ~~~~" -msgstr "Terveisin, ~~~~" - -#: ukbot/contest.py:691 -#, python-format -msgid "Awards have been [%(link)s sent out]." -msgstr "Rusetit on nyt [%(link)s jaettu]." - -#: ukbot/contest.py:880 ukbot/ukbot.py:148 ukbot/ukbot.py:151 -msgid "UKBot encountered a problem" -msgstr "UKBot havaitsi ongelman" - -#: ukbot/contest.py:930 -msgid "" -"This contest is closed – thanks to everyone who participated! Awards will be " -"sent out as soon as the contest organizer has checked the results." -msgstr "" -"Tämä kilpailu on päättynyt – kiitos kaikille osallistuneille! Rusetit " -"jaetaan heti kun kilpailun järjestäjä on tarkistanut tulokset." - -#: ukbot/contest.py:932 -msgid "This contest is closed – thanks to everyone who participated!" -msgstr "Tämä kilpailu on päättynyt – kiitos kaikille osallistuneille!" - -#: ukbot/contest.py:939 -#, python-format -msgid "" -"Last updated %(lastupdate)s. The contest is open from %(startdate)s to " -"%(enddate)s." -msgstr "" -"Päivitetty viimeksi %(lastupdate)s. Kilpailu on avoinna %(startdate)s – " -"%(enddate)s." - -#: ukbot/contest.py:960 -#, fuzzy, python-format -msgid "UKBot encountered the following problems with the page [[%s]]" -msgstr "UKBot havaitsi seuraavat ongelmat artikkeliin [[:%s]] liittyen" - -#: ukbot/contest.py:994 -#, python-format -msgid "Results markers %(start_marker)s and %(end_marker)s not found" -msgstr "" - -#: ukbot/contest.py:1005 -#, python-format -msgid "No \"%(section_name)s\" section found." -msgstr "" - -#: ukbot/contest.py:1015 -msgid "Updating with final results, the contest is now closed." -msgstr "Lisätään lopulliset tulokset ja merkitään kilpailu päättyneeksi." - -#: ukbot/contest.py:1017 -msgid "Checking results and handing out awards" -msgstr "Tarkistetaan tulokset ja jaetaan rusetit" - -#: ukbot/contest.py:1019 -msgid "Updating" -msgstr "Päivitetään" - -#: ukbot/contest.py:1149 -#, python-format -msgid "The weekly contest is: %(link)s" -msgstr "Viikon kilpailu on: %(link)s" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "suspended since" -msgstr "suspendert siden" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "%A, %H:%M" -msgstr "%A kello %H.%M" - -#: ukbot/contributions.py:178 ukbot/user.py:679 -msgid "No qualifying contributions registered yet" -msgstr "Hyväksyttyjä muokkauksia ei ole vielä rekisteröity" - -#: ukbot/contributions.py:181 -#, python-format -msgid "%d article" -msgid_plural "%d articles" -msgstr[0] "%d artikkeli" -msgstr[1] "%d artikkelia" - -#: ukbot/contributions.py:187 -msgid "{{Kolonner}}" -msgstr "{{Sarakkeet}}" - -#: ukbot/contributions.py:221 -msgid "%d.%m, %H:%M" -msgstr "%e. %Bta %Y kello %H.%M" - -#: ukbot/contributions.py:229 -msgid "capped at max" -msgstr "" - -#: ukbot/contributions.py:265 -msgid "Category hit" -msgstr "Luokkaosuma" - -#: ukbot/contributions.py:278 -#, fuzzy, python-format -msgid "Total: %(bytecount)d bytes, %(wordcount)d words" -msgstr "" -"Yhteensä: {{formatnum:%(bytecount)d}} {{subst:PLURAL:%(bytecount)d|tavu|" -"tavua}}, %(wordcount)d {{subst:PLURAL:%(wordcount)d|sana|sanaa}}" - -#: ukbot/contributions.py:293 -msgid "" -"Note: The contributions to this article are currently " -"disqualified." -msgstr "" -"Huomio: Muokkaukset tähän artikkeliin on toistaiseksi " -"hylätty." - -#: ukbot/contributions.py:302 -msgid "N" -msgstr "U" - -#: ukbot/contributions.py:305 -#, fuzzy -msgid "W" -msgstr "U" - -#: ukbot/filters.py:150 -#, fuzzy -msgid "Too few arguments given to this template." -msgstr "" -"Tuntematon argumentti on annettu kohteeseen {{tl|%(template)s}}: %(argument)s" - -#: ukbot/filters.py:198 -#, fuzzy, python-format -msgid "" -"Could not analyze page %(article)s because the revision %(rev)d could not be " -"parsed: %(error)s" -msgstr "" -"Artikkelin %(article)s analysointi epäonnistui sillä versio %(prevrev)d tai " -"%(rev)d ei tullut ymmärreyksi: %(error)s" - -#: ukbot/filters.py:233 -msgid "Could not parse the catignore page" -msgstr "Catignore-sivun sisältöä ei ymmärretty" - -#: ukbot/filters.py:238 -msgid "No category values given!" -msgstr "" - -#: ukbot/filters.py:444 -msgid "Encountered an infinite category loop: " -msgstr "Jumiutunut loputtomaan luokkasilmukkaan: " - -#: ukbot/filters.py:483 -#, fuzzy -msgid "No byte limit (second argument) given" -msgstr "" -"Tavurajaa (toinen argumentti) ei ole annettu kohteeseen {{tlx|%(template)s|" -"%(firstarg)s}}" - -#: ukbot/filters.py:720 -#, python-format -msgid "No \"%s\" parameter given" -msgstr "" - -#: ukbot/revision.py:132 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because no words were found in the " -"parent revision (%(parentid)s) of size %(size)d, possibly due to unclosed " -"tags or templates in that revision." -msgstr "" - -#: ukbot/revision.py:142 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because the word count increase " -"(%(words)d) is larger than the byte increase (%(bytes)d). Wrong word counts " -"can occur for invalid wiki text." -msgstr "" - -#: ukbot/sites.py:63 -#, python-format -msgid "Page does not exist: [[%(pagename)s]]" -msgstr "" - -#: ukbot/sites.py:80 -#, python-format -msgid "Could not found a site matching the prefix \"%(key)s\"" -msgstr "" - -#: ukbot/ukbot.py:169 -#, python-format -msgid "#REDIRECT [[%s]]" -msgstr "#OHJAUS [[%s]]" - -#: ukbot/ukbot.py:171 -#, python-format -msgid "Redirecting to %s" -msgstr "Ohjaus sivulle %s" - -#: ukbot/user.py:681 -msgid "articles" -msgstr "" -"%(articlecount)d {{subst:PLURAL:%(articlecount)d|artikkeli|artikkelia}}" - -#: ukbot/user.py:683 -msgid "{{Kolonner}}\n" -msgstr "{{Sarakkeet}}\n" - -#: ukbot/rules/byte.py:20 -#, python-format -msgid "%(bytes).f bytes" -msgstr "%(bytes).f {{subst:PLURAL:%(bytes).f|tavu|tavua}}" - -#: ukbot/rules/contrib.py:16 -msgid "contribution" -msgstr "" - -#: ukbot/rules/external_link.py:30 -msgid "links" -msgstr "%(links).f {{subst:PLURAL:%(links).f|linkkit|linkkiä}}" - -#: ukbot/rules/image.py:142 -msgid "images" -msgstr "%(images).f {{subst:PLURAL:%(images).f|kuva|kuvaa}}" - -#: ukbot/rules/new.py:16 -msgid "new page" -msgstr "uusi sivu" - -#: ukbot/rules/qualified.py:22 -msgid "qualified" -msgstr "hyväksytty" - -#: ukbot/rules/redirect.py:16 -msgid "redirect" -msgstr "uudelleenohjaus" - -#: ukbot/rules/ref.py:81 -msgid "references" -msgstr "" -"{{subst:PLURAL:%(num)d|Yksi lähde on lisätty|%(num)d lähdettä on lisätty}}" - -#: ukbot/rules/ref.py:85 -msgid "reference pointers" -msgstr "" -"{{subst:PLURAL:%(num)d|Yksi viittaus jo olemassa olevaan lähteeseen|%(num)d " -"viittausta jo olemassa oleviin lähteisiin}}" - -#: ukbot/rules/regexp.py:19 -msgid "regexp" -msgstr "" - -#: ukbot/rules/regexp.py:44 -msgid "section" -msgstr "" - -#: ukbot/rules/rule.py:76 -#, python-format -msgid "bonus %(words)d words" -msgstr "bonus %(words)d {{subst:PLURAL:%(words)d|sana|sanaa}}" - -#: ukbot/rules/templateremoval.py:88 -#, python-format -msgid "removal of {{tl|%(template)s}}" -msgstr "mallineen {{tl|%(template)s}} poisto" - -#: ukbot/rules/wikidata.py:47 -#, python-format -msgid "label (%(lang)s)" -msgstr "" - -#: ukbot/rules/wikidata.py:53 -#, python-format -msgid "description (%(lang)s)" -msgstr "" - -#: ukbot/rules/wikidata.py:59 -#, python-format -msgid "alias (%(lang)s)" -msgstr "" - -#: ukbot/rules/wikidata.py:72 -#, python-format -msgid "%(property)s statement" -msgstr "" - -#: ukbot/rules/wikidata.py:73 -#, python-format -msgid "%(count)d %(property)s statements" -msgstr "" - -#: ukbot/rules/word.py:20 -#, python-format -msgid "%(words).f words" -msgstr "%(words).f {{subst:PLURAL:%(words).f|sana|sanaa}}" - -#~ msgid "This contest is missing a {{tl|%(template)s}} template." -#~ msgstr "Tästä kilpailusta puuttuu {{tl|%(template)s}}-malline." - -#~ msgid "" -#~ "Did not find %(week)s+%(year)s or %(start)s+%(end)s in {{tl|" -#~ "%(templates)s}}." -#~ msgstr "" -#~ "Kohteesta {{tl|%(templates)s}} ei ole löydetty %(week)s+%(year)s eikä " -#~ "%(start)s+%(end)s." - -#~ msgid "" -#~ "Note that the contest this week is [[%(url)s|{{%(template)s|" -#~ "%(weekarg)s=%(week)s}}]]. Join in!" -#~ msgstr "" -#~ "Muista, että tämän viikon kilpailu on [[%(url)s|{{%(template)s|" -#~ "%(weekarg)s=%(week)s}}]]. Onnea matkaan!" - -#~ msgid "max" -#~ msgstr "maks" - -#~ msgid "added reference section" -#~ msgstr "yksi viittaus jo olemassaolevaan lähteeseen" - -#~ msgid "bonus %(bytes).f bytes" -#~ msgstr "bonus %(bytes).f {{subst:PLURAL:%(bytes).f|tavu|tavua}}" - -#~ msgid "" -#~ "No template (second argument) given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "" -#~ "Mallineita (toinen argumentti) ei ole annettu kohteeseen {{tlx|" -#~ "%(template)s|%(firstarg)s}}" - -#~ msgid "No categories given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "Kohteeseen {{tlx|%(template)s|%(firstarg)s}} ei ole annettu luokkia" - -#, fuzzy -#~ msgid "" -#~ "No \"%(query)s\" parameter given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "Kohteeseen {{tlx|%(template)s|%(firstarg)s}} ei ole annettu luokkia" - -#~ msgid "Unknown argument given to {{tl|%(template)s}}: %(argument)s" -#~ msgstr "" -#~ "Tuntematon argumentti on annettu kohteeseen {{tl|%(template)s}}: " -#~ "%(argument)s" - -#~ msgid "Found no \"%(section)s\" sections in the page \"%(page)s\"" -#~ msgstr "Ei löydettyjä \"%(section)s\"-osioita sivulla \"%(page)s\"" diff --git a/locale/gl_ES.po b/locale/gl_ES.po deleted file mode 100644 index bc96dc8..0000000 --- a/locale/gl_ES.po +++ /dev/null @@ -1,427 +0,0 @@ -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# -# Francisco Prieto , 2025. -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-02 15:46+0200\n" -"PO-Revision-Date: 2020-11-24 20:36+0100\n" -"Last-Translator: Francisco Prieto \n" -"Language-Team: Galician \n" -"Language: gl_ES\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Lokalize 19.12.3\n" - -#: ukbot/contest.py:65 -#, python-format -msgid "The filter name \"%s\" was not understood" -msgstr "O nome de filtro \"%s\" non se entendeu" - -#: ukbot/contest.py:155 -msgid "Couldn't find the list of participants!" -msgstr "Non se atopou a lista de participantes!" - -#: ukbot/contest.py:183 -#, python-format -msgid "" -"There are no point rules defined for this contest. Point rules are defined " -"by {{tl|%(template)s}}." -msgstr "" -"Non hai regras de puntos definidas para este concurso. As regras de puntos " -"defínense con {{tl|%(template)s}}." - -#: ukbot/contest.py:228 -#, python-format -msgid "Could not parse {{tlx|%(template)s|%(firstarg)s}} template: %(err)s" -msgstr "" -"Non se puido analizar o modelo {{tlx|%(template)s|%(firstarg)s}}: %(err)s" - -#: ukbot/contest.py:258 -#, python-format -msgid "Unkown argument given to {{tl|%(template)s}}: %(argument)s" -msgstr "Argumento descoñecido pasado a {{tl|%(template)s}}: %(argumento)s" - -#: ukbot/contest.py:289 -#, python-format -msgid "Couldn't parse the date given to the {{tl|%(template)s}} template." -msgstr "Non se puido entender a data que se deu ao modelo {{tl|%(template)s}}." - -#: ukbot/contest.py:322 -#, python-format -msgid "" -"Could not find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" -"Non se puido atopar o usuario %(user)s que se deu ao modelo {{tl|" -"%(template)s}}." - -#: ukbot/contest.py:335 ukbot/contest.py:375 -#, python-format -msgid "" -"Failed to parse the %(template)s template: Did not find a site matching the " -"site prefix %(prefix)s" -msgstr "" -"Non se puido analizar o modelo %(template)s: non se atopou un site que " -"concorde co prefixo que temos: %(prefix)s" - -#: ukbot/contest.py:354 ukbot/contest.py:394 -#, python-format -msgid "" -"Couldn't find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" -"Non se puido atopar o usuario %(user)s que se pasou ao {{tl|%(template)s}} " -"modelo." - -#: ukbot/contest.py:529 -msgid "Day" -msgstr "Día" - -#: ukbot/contest.py:530 -msgid "Points" -msgstr "Puntos" - -#: ukbot/contest.py:533 ukbot/contest.py:748 ukbot/contest.py:935 -#: ukbot/contest.py:936 ukbot/contest.py:937 -msgid "%e. %B %Y, %H:%M" -msgstr "%e %B %Y, %H:%M" - -#: ukbot/contest.py:534 -#, python-format -msgid "Updated %(date)s" -msgstr "Actualizado %(date)s" - -#: ukbot/contest.py:569 -#, python-format -msgid "Weekly contest for week %(week)d" -msgstr "Concurso semanal da semana %(week)d" - -#: ukbot/contest.py:571 -#, python-format -msgid "Weekly contest for week %(startweek)d–%(endweek)d" -msgstr "Concurso semanal da semana %(startweek)d–%(endweek)d" - -#: ukbot/contest.py:649 -msgid "Regards" -msgstr "Atentamente" - -#: ukbot/contest.py:649 -msgid "and" -msgstr "e" - -#: ukbot/contest.py:679 -#, python-format -msgid "" -"Now you must check if the results look ok. If there are error messages at " -"the bottom of the [[%(page)s|contest page]], you should check that the " -"related contributions have been awarded the correct number of points. Also " -"check if there are comments or complaints on the discussion page. If " -"everything looks fine, [%(link)s click here] (and save) to indicate that I " -"can send out the awards at first occasion." -msgstr "" -"Agora tes que comprobar se os resultados semellan correctos. Se hai mensaxes " -"de erro ao final da [[%(page)s|páxina do concurso]], deberías comprobar que " -"as achegas relacionadas recibiron o número correcto de puntos. Comproba " -"tamén se hai comentarios ou queixas na páxina de conversa. Se todo ten boa " -"pinta, [%(link)s fai clic aquí] (e garda) para sinalar que podo enviar os " -"premios tan axiña como sexa posible." - -#: ukbot/contest.py:680 -msgid "Thanks, ~~~~" -msgstr "Grazas, ~~~~" - -#: ukbot/contest.py:691 -#, python-format -msgid "Awards have been [%(link)s sent out]." -msgstr "[%(link)s Enviáronse] os premios." - -#: ukbot/contest.py:880 ukbot/ukbot.py:148 ukbot/ukbot.py:151 -msgid "UKBot encountered a problem" -msgstr "UKBot atopou un problema" - -#: ukbot/contest.py:930 -msgid "" -"This contest is closed – thanks to everyone who participated! Awards will be " -"sent out as soon as the contest organizer has checked the results." -msgstr "" -"Este concurso rematou – grazas a todas as persoas que participaron! Os " -"premios enviaranse tan axiña como o organizador do concurso comprobe os " -"resultados." - -#: ukbot/contest.py:932 -msgid "This contest is closed – thanks to everyone who participated!" -msgstr "Este concurso rematou – grazas a todas as persoas que participaron!" - -#: ukbot/contest.py:939 -#, python-format -msgid "" -"Last updated %(lastupdate)s. The contest is open from %(startdate)s to " -"%(enddate)s." -msgstr "" -"Última actualización %(lastupdate)s. O concurso está aberto dende " -"%(startdate)s até %(enddate)s." - -#: ukbot/contest.py:960 -#, python-format -msgid "UKBot encountered the following problems with the page [[%s]]" -msgstr "UKBot atopou os seguintes problemas coa páxina [[%s]]" - -#: ukbot/contest.py:994 -#, python-format -msgid "Results markers %(start_marker)s and %(end_marker)s not found" -msgstr "" -"Os marcadores de resultados %(start_marker)s e %(end_marker)s non se atoparon" - -#: ukbot/contest.py:1005 -#, python-format -msgid "No \"%(section_name)s\" section found." -msgstr "Non se atopou a sección \"%(section_name)s\"." - -#: ukbot/contest.py:1015 -msgid "Updating with final results, the contest is now closed." -msgstr "Actualizando cos resultados finais, o concurso rematou." - -#: ukbot/contest.py:1017 -msgid "Checking results and handing out awards" -msgstr "Comprobando os resultados e repartindo os premios" - -#: ukbot/contest.py:1019 -msgid "Updating" -msgstr "Actualizando" - -#: ukbot/contest.py:1149 -#, python-format -msgid "The weekly contest is: %(link)s" -msgstr "O concurso semanal é: %(link)s" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "suspended since" -msgstr "suspendido dende" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "%A, %H:%M" -msgstr "%A, %H:%M" - -#: ukbot/contributions.py:178 ukbot/user.py:679 -msgid "No qualifying contributions registered yet" -msgstr "Aínda non se rexistraron achegas cualificadas" - -#: ukbot/contributions.py:181 -#, python-format -msgid "%d article" -msgid_plural "%d articles" -msgstr[0] "%d artigo" -msgstr[1] "%d artigos" - -#: ukbot/contributions.py:187 -msgid "{{Kolonner}}" -msgstr "{{Columnas}}" - -#: ukbot/contributions.py:221 -msgid "%d.%m, %H:%M" -msgstr "%d.%m, %H:%M" - -#: ukbot/contributions.py:229 -msgid "capped at max" -msgstr "limitado ao máximo" - -#: ukbot/contributions.py:265 -msgid "Category hit" -msgstr "Coincidencia de categoría" - -#: ukbot/contributions.py:278 -#, fuzzy, python-format -msgid "Total: %(bytecount)d bytes, %(wordcount)d words" -msgstr "Total: {{formatnum:%(bytecount)d}} bytes, %(wordcount)d palabras" - -#: ukbot/contributions.py:293 -msgid "" -"Note: The contributions to this article are currently " -"disqualified." -msgstr "" -"Nota: As achegas a este artigo están descualificadas " -"actualmente." - -#: ukbot/contributions.py:302 -msgid "N" -msgstr "N" - -#: ukbot/contributions.py:305 -msgid "W" -msgstr "W" - -#: ukbot/filters.py:150 -msgid "Too few arguments given to this template." -msgstr "Este modelo ten moi poucos argumentos." - -#: ukbot/filters.py:198 -#, python-format -msgid "" -"Could not analyze page %(article)s because the revision %(rev)d could not be " -"parsed: %(error)s" -msgstr "" -"Non se puido analizar a páxina %(article)s porque a revisión %(rev)d non se " -"puido entender: %(error)s" - -#: ukbot/filters.py:233 -msgid "Could not parse the catignore page" -msgstr "Non se puido entender a páxina catignore" - -#: ukbot/filters.py:238 -msgid "No category values given!" -msgstr "Non se deron valores de categoría!" - -#: ukbot/filters.py:444 -msgid "Encountered an infinite category loop: " -msgstr "Atopouse un bucle de categorías infinito:" - -#: ukbot/filters.py:483 -msgid "No byte limit (second argument) given" -msgstr "Non se deu o límite de bytes (segundo argumento)" - -#: ukbot/filters.py:720 -#, python-format -msgid "No \"%s\" parameter given" -msgstr "Non se deu o parámetro \"%s\"" - -#: ukbot/revision.py:132 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because no words were found in the " -"parent revision (%(parentid)s) of size %(size)d, possibly due to unclosed " -"tags or templates in that revision." -msgstr "" -"Revisión [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: a " -"diferenza no número de palabras pode estar trabucada, porque non se atoparon " -"palabras na revisión (%(parentid)s) de medida %(size)d, posiblemente porque " -"que hai tags ou modelos mal pechados naquela revisión." - -#: ukbot/revision.py:142 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because the word count increase " -"(%(words)d) is larger than the byte increase (%(bytes)d). Wrong word counts " -"can occur for invalid wiki text." -msgstr "" -"Revisión [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: a " -"diferenza no número de palabras pode estar trabucada, porque o aumento " -"(%(words)d) no número de palabras é meirande ca o aumento de bytes " -"(%(bytes)d). Poden saír recontos incorrectos se o wikitexto non é válido." - -#: ukbot/sites.py:63 -#, python-format -msgid "Page does not exist: [[%(pagename)s]]" -msgstr "A páxina non existe: [[%(pagename)s]]" - -#: ukbot/sites.py:80 -#, python-format -msgid "Could not found a site matching the prefix \"%(key)s\"" -msgstr "Non se atopou un site que concorde co prefixo \"%(key)s\"" - -#: ukbot/ukbot.py:169 -#, python-format -msgid "#REDIRECT [[%s]]" -msgstr "#REDIRECT [[%s]]" - -#: ukbot/ukbot.py:171 -#, python-format -msgid "Redirecting to %s" -msgstr "Redirixindo a %s" - -#: ukbot/user.py:681 -msgid "articles" -msgstr "artigos" - -#: ukbot/user.py:683 -msgid "{{Kolonner}}\n" -msgstr "{{Columnas}}\n" - -#: ukbot/rules/byte.py:20 -#, python-format -msgid "%(bytes).f bytes" -msgstr "%(bytes).f bytes" - -#: ukbot/rules/contrib.py:16 -msgid "contribution" -msgstr "achega" - -#: ukbot/rules/external_link.py:30 -msgid "links" -msgstr "ligazóns" - -#: ukbot/rules/image.py:142 -msgid "images" -msgstr "imaxes" - -#: ukbot/rules/new.py:16 -msgid "new page" -msgstr "páxina nova" - -#: ukbot/rules/qualified.py:22 -msgid "qualified" -msgstr "cualificado" - -#: ukbot/rules/redirect.py:16 -msgid "redirect" -msgstr "redirección" - -#: ukbot/rules/ref.py:81 -msgid "references" -msgstr "referencias" - -#: ukbot/rules/ref.py:85 -msgid "reference pointers" -msgstr "punteiros de referencia" - -#: ukbot/rules/regexp.py:19 -msgid "regexp" -msgstr "expresión regular" - -#: ukbot/rules/regexp.py:44 -msgid "section" -msgstr "sección" - -#: ukbot/rules/rule.py:76 -#, python-format -msgid "bonus %(words)d words" -msgstr "%(words)d palabras extra" - -#: ukbot/rules/templateremoval.py:88 -#, python-format -msgid "removal of {{tl|%(template)s}}" -msgstr "borrado de {{tl|%(template)s}}" - -#: ukbot/rules/wikidata.py:47 -#, python-format -msgid "label (%(lang)s)" -msgstr "etiqueta (%(lang)s)" - -#: ukbot/rules/wikidata.py:53 -#, python-format -msgid "description (%(lang)s)" -msgstr "descrición (%(lang)s)" - -#: ukbot/rules/wikidata.py:59 -#, python-format -msgid "alias (%(lang)s)" -msgstr "alcume (%(lang)s)" - -#: ukbot/rules/wikidata.py:72 -#, python-format -msgid "%(property)s statement" -msgstr "declaración de %(property)s" - -#: ukbot/rules/wikidata.py:73 -#, python-format -msgid "%(count)d %(property)s statements" -msgstr "%(count)d declaracións de %(property)s" - -#: ukbot/rules/word.py:20 -#, python-format -msgid "%(words).f words" -msgstr "%(words).f palabras" diff --git a/locale/messages.pot b/locale/messages.pot deleted file mode 100644 index 6f83e4e..0000000 --- a/locale/messages.pot +++ /dev/null @@ -1,395 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-02 15:46+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" - -#: ukbot/contest.py:65 -#, python-format -msgid "The filter name \"%s\" was not understood" -msgstr "" - -#: ukbot/contest.py:155 -msgid "Couldn't find the list of participants!" -msgstr "" - -#: ukbot/contest.py:183 -#, python-format -msgid "" -"There are no point rules defined for this contest. Point rules are defined " -"by {{tl|%(template)s}}." -msgstr "" - -#: ukbot/contest.py:228 -#, python-format -msgid "Could not parse {{tlx|%(template)s|%(firstarg)s}} template: %(err)s" -msgstr "" - -#: ukbot/contest.py:258 -#, python-format -msgid "Unkown argument given to {{tl|%(template)s}}: %(argument)s" -msgstr "" - -#: ukbot/contest.py:289 -#, python-format -msgid "Couldn't parse the date given to the {{tl|%(template)s}} template." -msgstr "" - -#: ukbot/contest.py:322 -#, python-format -msgid "" -"Could not find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" - -#: ukbot/contest.py:335 ukbot/contest.py:375 -#, python-format -msgid "" -"Failed to parse the %(template)s template: Did not find a site matching the " -"site prefix %(prefix)s" -msgstr "" - -#: ukbot/contest.py:354 ukbot/contest.py:394 -#, python-format -msgid "" -"Couldn't find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" - -#: ukbot/contest.py:529 -msgid "Day" -msgstr "" - -#: ukbot/contest.py:530 -msgid "Points" -msgstr "" - -#: ukbot/contest.py:533 ukbot/contest.py:748 ukbot/contest.py:935 -#: ukbot/contest.py:936 ukbot/contest.py:937 -msgid "%e. %B %Y, %H:%M" -msgstr "" - -#: ukbot/contest.py:534 -#, python-format -msgid "Updated %(date)s" -msgstr "" - -#: ukbot/contest.py:569 -#, python-format -msgid "Weekly contest for week %(week)d" -msgstr "" - -#: ukbot/contest.py:571 -#, python-format -msgid "Weekly contest for week %(startweek)d–%(endweek)d" -msgstr "" - -#: ukbot/contest.py:649 -msgid "Regards" -msgstr "" - -#: ukbot/contest.py:649 -msgid "and" -msgstr "" - -#: ukbot/contest.py:679 -#, python-format -msgid "" -"Now you must check if the results look ok. If there are error messages at " -"the bottom of the [[%(page)s|contest page]], you should check that the " -"related contributions have been awarded the correct number of points. Also " -"check if there are comments or complaints on the discussion page. If " -"everything looks fine, [%(link)s click here] (and save) to indicate that I " -"can send out the awards at first occasion." -msgstr "" - -#: ukbot/contest.py:680 -msgid "Thanks, ~~~~" -msgstr "" - -#: ukbot/contest.py:691 -#, python-format -msgid "Awards have been [%(link)s sent out]." -msgstr "" - -#: ukbot/contest.py:880 ukbot/ukbot.py:148 ukbot/ukbot.py:151 -msgid "UKBot encountered a problem" -msgstr "" - -#: ukbot/contest.py:930 -msgid "" -"This contest is closed – thanks to everyone who participated! Awards will be " -"sent out as soon as the contest organizer has checked the results." -msgstr "" - -#: ukbot/contest.py:932 -msgid "This contest is closed – thanks to everyone who participated!" -msgstr "" - -#: ukbot/contest.py:939 -#, python-format -msgid "" -"Last updated %(lastupdate)s. The contest is open from %(startdate)s to " -"%(enddate)s." -msgstr "" - -#: ukbot/contest.py:960 -#, python-format -msgid "UKBot encountered the following problems with the page [[%s]]" -msgstr "" - -#: ukbot/contest.py:994 -#, python-format -msgid "Results markers %(start_marker)s and %(end_marker)s not found" -msgstr "" - -#: ukbot/contest.py:1005 -#, python-format -msgid "No \"%(section_name)s\" section found." -msgstr "" - -#: ukbot/contest.py:1015 -msgid "Updating with final results, the contest is now closed." -msgstr "" - -#: ukbot/contest.py:1017 -msgid "Checking results and handing out awards" -msgstr "" - -#: ukbot/contest.py:1019 -msgid "Updating" -msgstr "" - -#: ukbot/contest.py:1149 -#, python-format -msgid "The weekly contest is: %(link)s" -msgstr "" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "suspended since" -msgstr "" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "%A, %H:%M" -msgstr "" - -#: ukbot/contributions.py:178 ukbot/user.py:679 -msgid "No qualifying contributions registered yet" -msgstr "" - -#: ukbot/contributions.py:181 -#, python-format -msgid "%d article" -msgid_plural "%d articles" -msgstr[0] "" -msgstr[1] "" - -#: ukbot/contributions.py:187 -msgid "{{Kolonner}}" -msgstr "" - -#: ukbot/contributions.py:221 -msgid "%d.%m, %H:%M" -msgstr "" - -#: ukbot/contributions.py:229 -msgid "capped at max" -msgstr "" - -#: ukbot/contributions.py:265 -msgid "Category hit" -msgstr "" - -#: ukbot/contributions.py:278 -#, python-format -msgid "Total: %(bytecount)d bytes, %(wordcount)d words" -msgstr "" - -#: ukbot/contributions.py:293 -msgid "" -"Note: The contributions to this article are currently " -"disqualified." -msgstr "" - -#: ukbot/contributions.py:302 -msgid "N" -msgstr "" - -#: ukbot/contributions.py:305 -msgid "W" -msgstr "" - -#: ukbot/filters.py:150 -msgid "Too few arguments given to this template." -msgstr "" - -#: ukbot/filters.py:198 -#, python-format -msgid "" -"Could not analyze page %(article)s because the revision %(rev)d could not be " -"parsed: %(error)s" -msgstr "" - -#: ukbot/filters.py:233 -msgid "Could not parse the catignore page" -msgstr "" - -#: ukbot/filters.py:238 -msgid "No category values given!" -msgstr "" - -#: ukbot/filters.py:444 -msgid "Encountered an infinite category loop: " -msgstr "" - -#: ukbot/filters.py:483 -msgid "No byte limit (second argument) given" -msgstr "" - -#: ukbot/filters.py:720 -#, python-format -msgid "No \"%s\" parameter given" -msgstr "" - -#: ukbot/revision.py:132 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because no words were found in the " -"parent revision (%(parentid)s) of size %(size)d, possibly due to unclosed " -"tags or templates in that revision." -msgstr "" - -#: ukbot/revision.py:142 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because the word count increase " -"(%(words)d) is larger than the byte increase (%(bytes)d). Wrong word counts " -"can occur for invalid wiki text." -msgstr "" - -#: ukbot/sites.py:63 -#, python-format -msgid "Page does not exist: [[%(pagename)s]]" -msgstr "" - -#: ukbot/sites.py:80 -#, python-format -msgid "Could not found a site matching the prefix \"%(key)s\"" -msgstr "" - -#: ukbot/ukbot.py:169 -#, python-format -msgid "#REDIRECT [[%s]]" -msgstr "" - -#: ukbot/ukbot.py:171 -#, python-format -msgid "Redirecting to %s" -msgstr "" - -#: ukbot/user.py:681 -msgid "articles" -msgstr "" - -#: ukbot/user.py:683 -msgid "{{Kolonner}}\n" -msgstr "" - -#: ukbot/rules/byte.py:20 -#, python-format -msgid "%(bytes).f bytes" -msgstr "" - -#: ukbot/rules/contrib.py:16 -msgid "contribution" -msgstr "" - -#: ukbot/rules/external_link.py:30 -msgid "links" -msgstr "" - -#: ukbot/rules/image.py:142 -msgid "images" -msgstr "" - -#: ukbot/rules/new.py:16 -msgid "new page" -msgstr "" - -#: ukbot/rules/qualified.py:22 -msgid "qualified" -msgstr "" - -#: ukbot/rules/redirect.py:16 -msgid "redirect" -msgstr "" - -#: ukbot/rules/ref.py:81 -msgid "references" -msgstr "" - -#: ukbot/rules/ref.py:85 -msgid "reference pointers" -msgstr "" - -#: ukbot/rules/regexp.py:19 -msgid "regexp" -msgstr "" - -#: ukbot/rules/regexp.py:44 -msgid "section" -msgstr "" - -#: ukbot/rules/rule.py:76 -#, python-format -msgid "bonus %(words)d words" -msgstr "" - -#: ukbot/rules/templateremoval.py:88 -#, python-format -msgid "removal of {{tl|%(template)s}}" -msgstr "" - -#: ukbot/rules/wikidata.py:47 -#, python-format -msgid "label (%(lang)s)" -msgstr "" - -#: ukbot/rules/wikidata.py:53 -#, python-format -msgid "description (%(lang)s)" -msgstr "" - -#: ukbot/rules/wikidata.py:59 -#, python-format -msgid "alias (%(lang)s)" -msgstr "" - -#: ukbot/rules/wikidata.py:72 -#, python-format -msgid "%(property)s statement" -msgstr "" - -#: ukbot/rules/wikidata.py:73 -#, python-format -msgid "%(count)d %(property)s statements" -msgstr "" - -#: ukbot/rules/word.py:20 -#, python-format -msgid "%(words).f words" -msgstr "" diff --git a/locale/nb_NO.po b/locale/nb_NO.po deleted file mode 100644 index faa9fe1..0000000 --- a/locale/nb_NO.po +++ /dev/null @@ -1,482 +0,0 @@ -# Norwegian Bokmål translation for UKBot -# Copyright (C) 2013 -# This file is distributed under the same license as the UKBot package. -# -# Dan Michael Heggø , 2013. -# Jon Harald Søby , 2025. -msgid "" -msgstr "" -"Project-Id-Version: UKBot\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-02 15:46+0200\n" -"PO-Revision-Date: 2025-03-29 13:18+0100\n" -"Last-Translator: Jon Harald Søby \n" -"Language-Team: Norwegian Bokmal \n" -"Language: nb\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Lokalize 21.12.3\n" - -#: ukbot/contest.py:65 -#, python-format -msgid "The filter name \"%s\" was not understood" -msgstr "Filternavnet «%s» ble ikke forstått" - -#: ukbot/contest.py:155 -msgid "Couldn't find the list of participants!" -msgstr "Fant ikke deltakerlisten!" - -#: ukbot/contest.py:183 -#, python-format -msgid "" -"There are no point rules defined for this contest. Point rules are defined " -"by {{tl|%(template)s}}." -msgstr "" -"Denne konkurransen har ingen poengregler. Poengregler defineres med {{tl|" -"%(template)s}}." - -#: ukbot/contest.py:228 -#, fuzzy, python-format -msgid "Could not parse {{tlx|%(template)s|%(firstarg)s}} template: %(err)s" -msgstr "Klarte ikke å tolke {{tl|%(template)s}}-malen." - -#: ukbot/contest.py:258 -#, python-format -msgid "Unkown argument given to {{tl|%(template)s}}: %(argument)s" -msgstr "Ukjent argument gitt til {{ml|%(template)s}}: %(argument)s" - -#: ukbot/contest.py:289 -#, python-format -msgid "Couldn't parse the date given to the {{tl|%(template)s}} template." -msgstr "Klarte ikke å tolke datoen gitt til {{ml|%(template)s}}-malen." - -#: ukbot/contest.py:322 -#, python-format -msgid "" -"Could not find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "Fant ikke brukeren %(user)s gitt til {{ml|%(template)s}}-malen." - -#: ukbot/contest.py:335 ukbot/contest.py:375 -#, python-format -msgid "" -"Failed to parse the %(template)s template: Did not find a site matching the " -"site prefix %(prefix)s" -msgstr "" -"Kunne ikke tolke malen %(template)s: Fant ikke wiki som matcher prefikset " -"%(prefix)s" - -#: ukbot/contest.py:354 ukbot/contest.py:394 -#, python-format -msgid "" -"Couldn't find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "Fant ikke brukeren %(user)s gitt til {{ml|%(template)s}}-malen." - -#: ukbot/contest.py:529 -msgid "Day" -msgstr "Dag" - -#: ukbot/contest.py:530 -msgid "Points" -msgstr "Poeng" - -#: ukbot/contest.py:533 ukbot/contest.py:748 ukbot/contest.py:935 -#: ukbot/contest.py:936 ukbot/contest.py:937 -msgid "%e. %B %Y, %H:%M" -msgstr "%e. %B %Y, %H:%M" - -#: ukbot/contest.py:534 -#, python-format -msgid "Updated %(date)s" -msgstr "Oppdatert %(date)s" - -#: ukbot/contest.py:569 -#, python-format -msgid "Weekly contest for week %(week)d" -msgstr "Ukens konkurranse uke %(week)d" - -#: ukbot/contest.py:571 -#, python-format -msgid "Weekly contest for week %(startweek)d–%(endweek)d" -msgstr "Ukens konkurranse uke %(startweek)d–%(endweek)d" - -#: ukbot/contest.py:649 -msgid "Regards" -msgstr "Hilsen" - -#: ukbot/contest.py:649 -msgid "and" -msgstr "og" - -#: ukbot/contest.py:679 -#, python-format -msgid "" -"Now you must check if the results look ok. If there are error messages at " -"the bottom of the [[%(page)s|contest page]], you should check that the " -"related contributions have been awarded the correct number of points. Also " -"check if there are comments or complaints on the discussion page. If " -"everything looks fine, [%(link)s click here] (and save) to indicate that I " -"can send out the awards at first occasion." -msgstr "" -"Du må nå sjekke resultatene. Hvis det er feilmeldinger nederst på [[%(page)s|" -"konkurransesiden]] må du sjekke om de relaterte bidragene har fått poengene " -"de skal ha. Se også etter om det er kommentarer eller klager på " -"diskusjonssiden. Hvis alt ser greit ut kan du trykke [%(link)s her] (og " -"lagre), så sender jeg ut rosetter ved første anledning." - -#: ukbot/contest.py:680 -msgid "Thanks, ~~~~" -msgstr "Hilsen ~~~~" - -#: ukbot/contest.py:691 -#, python-format -msgid "Awards have been [%(link)s sent out]." -msgstr "Rosetter er nå [%(link)s sendt ut]." - -#: ukbot/contest.py:880 ukbot/ukbot.py:148 ukbot/ukbot.py:151 -msgid "UKBot encountered a problem" -msgstr "UKBot støtte på et problem" - -#: ukbot/contest.py:930 -msgid "" -"This contest is closed – thanks to everyone who participated! Awards will be " -"sent out as soon as the contest organizer has checked the results." -msgstr "" -"Konkurransen er avsluttet – takk til alle som deltok! Rosetter vil sendes ut " -"så snart konkurransearrangøren har sjekket resultatene." - -#: ukbot/contest.py:932 -msgid "This contest is closed – thanks to everyone who participated!" -msgstr "Denne konkurransen er avsluttet – takk til alle som deltok!" - -#: ukbot/contest.py:939 -#, python-format -msgid "" -"Last updated %(lastupdate)s. The contest is open from %(startdate)s to " -"%(enddate)s." -msgstr "" -"Sist oppdatert %(lastupdate)s. Konkurransen er åpen fra %(startdate)s til " -"%(enddate)s." - -#: ukbot/contest.py:960 -#, python-format -msgid "UKBot encountered the following problems with the page [[%s]]" -msgstr "UKBot støtte på problemer med siden [[:%s]]" - -#: ukbot/contest.py:994 -#, python-format -msgid "Results markers %(start_marker)s and %(end_marker)s not found" -msgstr "Resultatmarkørene %(start_marker)s og %(end_marker)s ble ikke funnet" - -#: ukbot/contest.py:1005 -#, python-format -msgid "No \"%(section_name)s\" section found." -msgstr "Ingen seksjon med navn «%(section_name)s» funnet." - -#: ukbot/contest.py:1015 -msgid "Updating with final results, the contest is now closed." -msgstr "" -"Oppdaterer med endelige resultater og merker konkurransen som avsluttet." - -#: ukbot/contest.py:1017 -msgid "Checking results and handing out awards" -msgstr "Sjekker resultater og deler ut rosetter" - -#: ukbot/contest.py:1019 -msgid "Updating" -msgstr "Oppdaterer" - -#: ukbot/contest.py:1149 -#, python-format -msgid "The weekly contest is: %(link)s" -msgstr "Ukens konkurranse er: %(link)s" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "suspended since" -msgstr "suspendert siden" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "%A, %H:%M" -msgstr "%A klokka %H.%M" - -#: ukbot/contributions.py:178 ukbot/user.py:679 -msgid "No qualifying contributions registered yet" -msgstr "Ingen kvalifiserte bidrag har blitt registrert enda" - -#: ukbot/contributions.py:181 -#, fuzzy, python-format -msgid "%d article" -msgid_plural "%d articles" -msgstr[0] "" -"%(articlecount)d {{subst:PLURAL:%(articlecount)d|artikkel|artikler}}" -msgstr[1] "" -"%(articlecount)d {{subst:PLURAL:%(articlecount)d|artikkel|artikler}}" - -#: ukbot/contributions.py:187 -msgid "{{Kolonner}}" -msgstr "{{Kolonner}}" - -#: ukbot/contributions.py:221 -msgid "%d.%m, %H:%M" -msgstr "%e. %B %Y, %H:%M" - -#: ukbot/contributions.py:229 -msgid "capped at max" -msgstr "avgrenset til maks" - -#: ukbot/contributions.py:265 -msgid "Category hit" -msgstr "Kategoritreff" - -#: ukbot/contributions.py:278 -#, fuzzy, python-format -msgid "Total: %(bytecount)d bytes, %(wordcount)d words" -msgstr "" -"Totalt: {{formatnum:%(bytecount)d}} {{subst:PLURAL:%(bytecount)d|byte}}, " -"%(wordcount)d {{subst:PLURAL:%(wordcount)d|ord}}" - -#: ukbot/contributions.py:293 -msgid "" -"Note: The contributions to this article are currently " -"disqualified." -msgstr "" -"Merk: Bidragene til denne artikkelen er for tiden " -"diskvalifisert." - -#: ukbot/contributions.py:302 -msgid "N" -msgstr "N" - -#: ukbot/contributions.py:305 -#, fuzzy -msgid "W" -msgstr "N" - -#: ukbot/filters.py:150 -msgid "Too few arguments given to this template." -msgstr "For få argumenter sendt til denne malen." - -#: ukbot/filters.py:198 -#, python-format -msgid "" -"Could not analyze page %(article)s because the revision %(rev)d could not be " -"parsed: %(error)s" -msgstr "" -"Kunne ikke analysere siden %(article)s fordi sideversjon %(rev)d ikke kunne " -"tolkes: %(error)s" - -#: ukbot/filters.py:233 -msgid "Could not parse the catignore page" -msgstr "Klarte ikke å tolke catignore-siden" - -#: ukbot/filters.py:238 -msgid "No category values given!" -msgstr "Ingen kategoriverdier gitt!" - -#: ukbot/filters.py:444 -msgid "Encountered an infinite category loop: " -msgstr "Havnet i en endeløs kategoriløkke: " - -#: ukbot/filters.py:483 -msgid "No byte limit (second argument) given" -msgstr "Ingen bytegrense (argument nr. 2) gitt" - -#: ukbot/filters.py:720 -#, python-format -msgid "No \"%s\" parameter given" -msgstr "Ingen parameter med navn «%s» gitt" - -#: ukbot/revision.py:132 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because no words were found in the " -"parent revision (%(parentid)s) of size %(size)d, possibly due to unclosed " -"tags or templates in that revision." -msgstr "" -"Sideversjon [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: " -"Ingen ord ble funnet i foreldrerevisjonen (%(parentid)s) med størrelse " -"%(size)d. Dette kan skyldes uavsluttede tagger eller maler, som vil medføre " -"at ordtellingen blir feil, men det kan også skyldes lagring av et " -"arbeidsutkast." - -#: ukbot/revision.py:142 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because the word count increase " -"(%(words)d) is larger than the byte increase (%(bytes)d). Wrong word counts " -"can occur for invalid wiki text." -msgstr "" -"Sideversjon [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: " -"Økningen i antall ord (%(words)d) er større enn økningen i antall byte " -"(%(bytes)d). Det bør sjekkes om ordtellingen er riktig." - -#: ukbot/sites.py:63 -#, python-format -msgid "Page does not exist: [[%(pagename)s]]" -msgstr "Siden finnes ikke: [[%(pagename)s]]" - -#: ukbot/sites.py:80 -#, python-format -msgid "Could not found a site matching the prefix \"%(key)s\"" -msgstr "Kunne ikke finne en wiki som matcher prefikset «%(key)s»" - -#: ukbot/ukbot.py:169 -#, python-format -msgid "#REDIRECT [[%s]]" -msgstr "#OMDIRIGERING [[%s]]" - -#: ukbot/ukbot.py:171 -#, python-format -msgid "Redirecting to %s" -msgstr "Omdirigerer til %s" - -#: ukbot/user.py:681 -msgid "articles" -msgstr "%(articlecount)d {{subst:PLURAL:%(articlecount)d|artikkel|artikler}}" - -#: ukbot/user.py:683 -msgid "{{Kolonner}}\n" -msgstr "{{Kolonner}}\n" - -#: ukbot/rules/byte.py:20 -#, python-format -msgid "%(bytes).f bytes" -msgstr "%(bytes).f {{subst:PLURAL:%(bytes).f|byte}}" - -#: ukbot/rules/contrib.py:16 -msgid "contribution" -msgstr "bidrag" - -#: ukbot/rules/external_link.py:30 -msgid "links" -msgstr "%(links).f {{subst:PLURAL:%(links).f|lenke|lenker}}" - -#: ukbot/rules/image.py:142 -msgid "images" -msgstr "%(images).f {{subst:PLURAL:%(images).f|bilde|bilder}}" - -#: ukbot/rules/new.py:16 -msgid "new page" -msgstr "ny side" - -#: ukbot/rules/qualified.py:22 -msgid "qualified" -msgstr "kvalifisert" - -#: ukbot/rules/redirect.py:16 -msgid "redirect" -msgstr "omdirigering" - -#: ukbot/rules/ref.py:81 -msgid "references" -msgstr "{{subst:PLURAL:%(num)d|én kilde|%(num)d kilder}}" - -#: ukbot/rules/ref.py:85 -msgid "reference pointers" -msgstr "" -"{{subst:PLURAL:%(num)d|én henvisning til navngitt kilde|%(num)d henvisninger " -"til navngitte kilder}}" - -#: ukbot/rules/regexp.py:19 -msgid "regexp" -msgstr "regulært uttrykk" - -#: ukbot/rules/regexp.py:44 -msgid "section" -msgstr "seksjon" - -#: ukbot/rules/rule.py:76 -#, python-format -msgid "bonus %(words)d words" -msgstr "bonus %(words)d {{subst:PLURAL:%(words)d|ord}}" - -#: ukbot/rules/templateremoval.py:88 -#, python-format -msgid "removal of {{tl|%(template)s}}" -msgstr "fjerning av {{ml|%(template)s}}" - -#: ukbot/rules/wikidata.py:47 -#, python-format -msgid "label (%(lang)s)" -msgstr "etikett (%(lang)s)" - -#: ukbot/rules/wikidata.py:53 -#, python-format -msgid "description (%(lang)s)" -msgstr "beskrivelse (%(lang)s)" - -#: ukbot/rules/wikidata.py:59 -#, python-format -msgid "alias (%(lang)s)" -msgstr "alias (%(lang)s)" - -#: ukbot/rules/wikidata.py:72 -#, python-format -msgid "%(property)s statement" -msgstr "%(property)s-påstand" - -#: ukbot/rules/wikidata.py:73 -#, python-format -msgid "%(count)d %(property)s statements" -msgstr "%(count)d %(property)-{{subst:PLURAL:%(count)d|påstand|påstander}}" - -#: ukbot/rules/word.py:20 -#, python-format -msgid "%(words).f words" -msgstr "%(words).f {{subst:PLURAL:%(words).f|ord}}" - -#~ msgid "" -#~ "No template (second argument) given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "" -#~ "Ingen mal (andre argument) ble gitt til {{mlp|%(template)s|%(firstarg)s}}" - -#, fuzzy -#~| msgid "" -#~| "No template (second argument) given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgid "" -#~ "No byte limit (second argument) given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "" -#~ "Ingen mal (andre argument) ble gitt til {{mlp|%(template)s|%(firstarg)s}}" - -#~ msgid "No categories given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "Ingen kategorier gitt til {{mlp|%(template)s|%(firstarg)s}}" - -#, fuzzy -#~ msgid "" -#~ "No \"%(query)s\" parameter given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "Ingen kategorier gitt til {{mlp|%(template)s|%(firstarg)s}}" - -#~ msgid "Unknown argument given to {{tl|%(template)s}}: %(argument)s" -#~ msgstr "Ukjent argument gitt til {{tl|%(template)s}}: %(argument)s" - -#~ msgid "This contest is missing a {{tl|%(template)s}} template." -#~ msgstr "Denne konkurransen mangler en {{tl|%(template)s}}-mal." - -#~ msgid "" -#~ "Did not find %(week)s+%(year)s or %(start)s+%(end)s in {{tl|" -#~ "%(templates)s}}." -#~ msgstr "" -#~ "Fant ikke %(week)s+%(year)s eller %(start)s+%(end)s i {{tl|" -#~ "%(templates)s}}." - -#~ msgid "" -#~ "Note that the contest this week is [[%(url)s|{{%(template)s|" -#~ "%(weekarg)s=%(week)s}}]]. Join in!" -#~ msgstr "" -#~ "Husk at denne ukens konkurranse er [[%(url)s|{{%(template)s|" -#~ "%(weekarg)s=%(week)s}}]]. Lykke til!" - -#~ msgid "max" -#~ msgstr "maks" - -#~ msgid "added reference section" -#~ msgstr "la til referanseavsnitt" - -#~ msgid "bonus %(bytes).f bytes" -#~ msgstr "bonus %(bytes).f {{subst:PLURAL:%(bytes).f|byte}}" - -#~ msgid "Found no \"%(section)s\" sections in the page \"%(page)s\"" -#~ msgstr "Fant ingen \"%(section)s\"-seksjoner på siden \"%(page)s\"" diff --git a/setup.py b/setup.py index 7e7af5c..2ce3441 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import os, sys setup(name='ukbot', - version='1.0.0', + version='1.1.0', description='Wikipedia writing contest bot', keywords='wikipedia', author='Dan Michael O. Heggø', From 424c7f66b6988423c1b73498088513b239138981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Harald=20S=C3=B8by?= Date: Wed, 9 Apr 2025 11:17:59 +0200 Subject: [PATCH 08/23] Add fallback solution if message key doesn't exist Insert the UKB module with its getMessage() function if the message key doesn't exist. This will let the module track uses of non-existing messages, so that can be fixed via the bot's code or fixed by adding the message to the Data file on Commons. --- setup.py | 2 +- ukbot/common.py | 14 +++++++------- ukbot/contest.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/setup.py b/setup.py index 2ce3441..0f9466a 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ keywords='wikipedia', author='Dan Michael O. Heggø', author_email='danmichaelo@gmail.com', - url='https://github.com/danmichaelo/ukbot', + url='https://github.com/wikimedianorge/ukbot', license='MIT', packages=find_packages(), include_package_data=True, diff --git a/ukbot/common.py b/ukbot/common.py index 30ec69c..e97a6b1 100644 --- a/ukbot/common.py +++ b/ukbot/common.py @@ -26,7 +26,8 @@ def init(self, homesite): 'parse', text='{{subst:#invoke:UKB/sandkasse|getAllI18n}}', # FIXME: De-sandbox pst=1, - onlypst=1 + onlypst=1, + contentmodel='wikitext' )['parse']['text']['*'] messages = json.loads(messages) @@ -52,8 +53,9 @@ def i18n(*args): logger.debug('Arguments to i18n(): %s' % '|'.join([str(x) for x in args])) if len(args) == 0: raise ValueError('At least one argument (message key) must be given') - if args[0] == 'bot-day': - logger.debug('Messages json: ' + json.dumps(localization.messages)) + message = '{{#invoke:UKB|getMessage|%s}}' % args[0] # Fallback if key doesn't exist + if args[0] not in localization.messages: + return message message = localization.messages[args[0]] for i in range(1, len(args)): message = message.replace('$' + str(i), str(args[i])) @@ -71,11 +73,9 @@ def fetch_parsed_i18n(*args): For all cases where text is output to wiki, the i18n() function should be used instead. """ logger.debug('Arguments to fetch_parsed_i18n(): %s', '|'.join([str(x) for x in args])) - if len(args) == 0: - raise ValueError('At least one argument (message key) must be given') - if len(args) == 1: + if len(args) <= 1: return i18n(*args) - return localization.site.api('parse', text=i18n(*args), pst=1, onlypst=1)['parse']['text']['*'] + return localization.site.api('parse', text=i18n(*args), pst=1, onlypst=1, contentmodel='wikitext')['parse']['text']['*'] logfile = sys.stdout def log(msg, newline = True): diff --git a/ukbot/contest.py b/ukbot/contest.py index 68b94f5..b036e11 100644 --- a/ukbot/contest.py +++ b/ukbot/contest.py @@ -1083,7 +1083,7 @@ def run(self, simulate=False, output=''): logger.info('Updating noticeboard: %s', boardname) tpllist = config['templates']['contestlist'] commonargs = config['templates']['commonargs'] - tema = self.sites.homesite.api('parse', text='{{subst:%s|%s=%s}}' % (tpllist['name'], commonargs['week'], now2.strftime('%Y-%V')), pst=1, onlypst=1)['parse']['text']['*'] + tema = self.sites.homesite.api('parse', text='{{subst:%s|%s=%s}}' % (tpllist['name'], commonargs['week'], now2.strftime('%Y-%V')), pst=1, onlypst=1, contentmodel='wikitext')['parse']['text']['*'] tpl.parameters[1] = tema tpl.parameters[boardtpl['date']] = now2.strftime('%e. %h') tpl.parameters[commonargs['year']] = now2.isocalendar()[0] From 8f922887eb703dd2fbd9e08d68a1201b00fcdefc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Harald=20S=C3=B8by?= Date: Wed, 9 Apr 2025 11:21:51 +0200 Subject: [PATCH 09/23] Undo inadvertent config file commit --- config/sites/nowiki.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/sites/nowiki.yml b/config/sites/nowiki.yml index 58008f2..4237679 100644 --- a/config/sites/nowiki.yml +++ b/config/sites/nowiki.yml @@ -8,8 +8,8 @@ othersites: - nn.wikipedia.org - se.wikipedia.org - smn.wikipedia.org - #- www.wikidata.org - #- commons.wikimedia.org + - www.wikidata.org + - commons.wikimedia.org default_prefix: no wikidata_languages: ['nb', 'nn', 'en', 'se', 'smn'] contestPages: From 11023badcb6f0ee71421df79c3a8e00787ed088c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Harald=20S=C3=B8by?= Date: Wed, 9 Apr 2025 13:54:15 +0200 Subject: [PATCH 10/23] =?UTF-8?q?Remove=20some=20hard-coded=20Norwegian=20?= =?UTF-8?q?Bokm=C3=A5l=20things?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the hard-coding of the {{kolonner}} template; replace it with a potential config line, or if there is no config, an empty div element with a special class (so that the functionality of {{kolonner}} can be added to a UKBot-specific TemplateStyles page). This partially fixes #23. --- config/sites/fiwiki.yml | 1 + config/sites/nowiki.yml | 1 + ukbot/common.py | 2 +- ukbot/contributions.py | 8 +++++++- ukbot/rules/ref.py | 13 ------------- ukbot/ukbot.py | 5 ++++- ukbot/user.py | 7 ++++++- 7 files changed, 20 insertions(+), 17 deletions(-) diff --git a/config/sites/fiwiki.yml b/config/sites/fiwiki.yml index 94e4fa3..f93faa0 100644 --- a/config/sites/fiwiki.yml +++ b/config/sites/fiwiki.yml @@ -99,6 +99,7 @@ templates: name: sparql # as in {{ ukb criterion | sparql }} params: query: query # as in {{ ukb criterion | sparql | query=... }} + columns: Sarakkeet ignore: - muokkaukset kumottiin ja sivu palautettiin # MediaWiki:Revertpage - ^Hylättiin (viimeisin tekstimuutos|viimeisimmät .* tekstimuutosta) # MediaWiki:Revreview-reject-summary-cur/fi diff --git a/config/sites/nowiki.yml b/config/sites/nowiki.yml index 4237679..dd6ecf2 100644 --- a/config/sites/nowiki.yml +++ b/config/sites/nowiki.yml @@ -106,6 +106,7 @@ templates: name: sparql # as in {{ ukb criterion | sparql }} params: query: spørring # as in {{ ukb criterion | sparql | query=... }} + columns: Kolonner awards: blå: { file: Article blue.svg, winner: true } rød: { file: Article red.svg, winner: true } diff --git a/ukbot/common.py b/ukbot/common.py index e97a6b1..dd79a88 100644 --- a/ukbot/common.py +++ b/ukbot/common.py @@ -24,7 +24,7 @@ def __init__(self): def init(self, homesite): messages = homesite.api( 'parse', - text='{{subst:#invoke:UKB/sandkasse|getAllI18n}}', # FIXME: De-sandbox + text='{{subst:#invoke:UKB|getAllI18n}}', pst=1, onlypst=1, contentmodel='wikitext' diff --git a/ukbot/contributions.py b/ukbot/contributions.py index b51f5da..1806c72 100644 --- a/ukbot/contributions.py +++ b/ukbot/contributions.py @@ -18,6 +18,7 @@ def __init__(self, user, config): self.user = weakref.ref(user) self.contributions = [] self.labels = {} + self.config = config self.wikidata_languages = config['wikidata_languages'] def add(self, contribution): @@ -155,8 +156,13 @@ def format(self, homesite): out += '{{formatnum:%.2f}} kB' % (sum_bytes / 1000.) out += '\n' + if 'columns' in self.config['templates']: + column_template = '{{%s}}' % self.config['templates']['columns'] + else: + column_template = '
' + if len(entries) > 10: - out += '{{Kolonner}}' + '\n' # FIXME + out += column_template + '\n' out += '\n'.join(entries) out += '\n\n' diff --git a/ukbot/rules/ref.py b/ukbot/rules/ref.py index a3a8174..8ed47e7 100644 --- a/ukbot/rules/ref.py +++ b/ukbot/rules/ref.py @@ -47,19 +47,6 @@ def count_sources(txt): s1 = 0 r1 = 0 - # Count list item under section heading "Kilder" or "Kjelder" - # FIXME: Make language-agnostic - refsection = False - for line in txt.split('\n'): - if refsection: - if re.match(r'==', line): - refsection = False - continue - if re.match(r'\*', line): - s1 += 1 - elif re.match(r'==[\s]*(Kilder|Kjelder|Gáldut)[\s]*==', line): - refsection = True - return s1, r1 @family('wikipedia.org', 'wikibooks.org') diff --git a/ukbot/ukbot.py b/ukbot/ukbot.py index 06f5800..0e74239 100644 --- a/ukbot/ukbot.py +++ b/ukbot/ukbot.py @@ -164,11 +164,14 @@ def main(): if len(normal_contests) == 1: contest_name = normal_contests[0] pages = config['pages']['redirect'] + magic_words = sites.homesite.api('query', meta='siteinfo', siprop='magicwords')['query']['magicwords'] + redirect_localized = next((word for word in magic_words if word['name'] == 'redirect'), None)['aliases'][0] + logger.debug('Magic words for redirects is %s' % redirect_localized) if not isinstance(pages, list): pages = [pages] for pagename in pages: page = sites.homesite.pages[pagename] - txt = '#REDIRECT [[%s]]'.format(contest_name) # FIXME – localize REDIRECT + txt = '%s [[%s]]' % (redirect_localized, contest_name) if page.text() != txt and not args.simulate: page.save(txt, summary=fetch_parsed_i18n('bot-redirecting', contest_name)) diff --git a/ukbot/user.py b/ukbot/user.py index 8c17c5e..b3d4a74 100644 --- a/ukbot/user.py +++ b/ukbot/user.py @@ -584,6 +584,11 @@ def format_result(self): ros = '{awards}' + if 'columns' in self.contest().config['templates']: + column_template = '{{%s}}' % self.contest().config['templates']['columns'] + else: + column_template = '
' + suspended = '{{subst:ns:0}}' if self.suspended_since is not None: suspended = ', ' + i18n('bot-suspended-since', i18n('bot-date-time-format', self.suspended_since.strftime('%Y-%m-%dT%H:%M:%S'))) @@ -593,7 +598,7 @@ def format_result(self): else: out += i18n('bot-articles-kb', len(entries), '%0.2f' % self.bytes / 1000.) if len(entries) > 10: - out += '{{Kolonner}}\n' # FIXME + out += column_template + '\n' out += '\n'.join(entries) out += '\n\n' From 5a83152f33222267d050cd330bbcd59f40e07e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Harald=20S=C3=B8by?= Date: Wed, 9 Apr 2025 14:11:39 +0200 Subject: [PATCH 11/23] Remove locale from config No longer used for anything. --- config/sites/cawiki.yml | 2 -- config/sites/enwiki.yml | 2 -- config/sites/eswiki.yml | 2 -- config/sites/euwiki.yml | 2 -- config/sites/fiwiki.yml | 2 -- config/sites/glwiki.yml | 1 - config/sites/nowiki.yml | 2 -- 7 files changed, 13 deletions(-) diff --git a/config/sites/cawiki.yml b/config/sites/cawiki.yml index 1983ed8..ebdce84 100644 --- a/config/sites/cawiki.yml +++ b/config/sites/cawiki.yml @@ -1,5 +1,3 @@ -locale: [ca_ES, ca_AD, ca_FR, ca_IT, ca_ES@valencia] -rollbar_token: 88f5bd483f7348ea8b0564449c8d77cd server_timezone: UTC wiki_timezone: Europe/Andorra homesite: ca.wikipedia.org diff --git a/config/sites/enwiki.yml b/config/sites/enwiki.yml index b35d46a..352c47c 100644 --- a/config/sites/enwiki.yml +++ b/config/sites/enwiki.yml @@ -1,5 +1,3 @@ -locale: [en_US] -rollbar_token: 88f5bd483f7348ea8b0564449c8d77cd server_timezone: UTC wiki_timezone: Europe/Oslo homesite: en.wikipedia.org diff --git a/config/sites/eswiki.yml b/config/sites/eswiki.yml index 4d09f05..3c31d16 100644 --- a/config/sites/eswiki.yml +++ b/config/sites/eswiki.yml @@ -1,5 +1,3 @@ -locale: [es_ES,en_US] -rollbar_token: 88f5bd483f7348ea8b0564449c8d77cd server_timezone: UTC wiki_timezone: UTC homesite: es.wikipedia.org diff --git a/config/sites/euwiki.yml b/config/sites/euwiki.yml index 12a8f80..2795647 100644 --- a/config/sites/euwiki.yml +++ b/config/sites/euwiki.yml @@ -1,5 +1,3 @@ -locale: [eu_ES,en_US] -rollbar_token: 88f5bd483f7348ea8b0564449c8d77cd server_timezone: UTC wiki_timezone: Europe/Oslo homesite: eu.wikipedia.org diff --git a/config/sites/fiwiki.yml b/config/sites/fiwiki.yml index f93faa0..4170696 100644 --- a/config/sites/fiwiki.yml +++ b/config/sites/fiwiki.yml @@ -1,5 +1,3 @@ -locale: fi_FI -rollbar_token: 88f5bd483f7348ea8b0564449c8d77cd server_timezone: UTC wiki_timezone: Europe/Helsinki homesite: fi.wikipedia.org diff --git a/config/sites/glwiki.yml b/config/sites/glwiki.yml index 6be7c65..8c73225 100644 --- a/config/sites/glwiki.yml +++ b/config/sites/glwiki.yml @@ -1,4 +1,3 @@ -locale: [gl_ES,en_US] server_timezone: UTC wiki_timezone: UTC homesite: gl.wikipedia.org diff --git a/config/sites/nowiki.yml b/config/sites/nowiki.yml index dd6ecf2..2521544 100644 --- a/config/sites/nowiki.yml +++ b/config/sites/nowiki.yml @@ -1,6 +1,4 @@ --- -locale: [nb_NO, no_NO] -rollbar_token: 88f5bd483f7348ea8b0564449c8d77cd server_timezone: UTC wiki_timezone: Europe/Oslo homesite: no.wikipedia.org From b8ae1e4cf96cf1f93eb80e7dc13c39721c30c2e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Harald=20S=C3=B8by?= Date: Wed, 9 Apr 2025 14:58:13 +0200 Subject: [PATCH 12/23] Remove locale directory again, readded by accident --- locale/ca_ES.po | 429 --------------------------------------- locale/es_ES.po | 433 --------------------------------------- locale/eu_ES.po | 471 ------------------------------------------- locale/fi_FI.po | 472 ------------------------------------------- locale/gl_ES.po | 427 --------------------------------------- locale/messages.pot | 395 ------------------------------------ locale/nb_NO.po | 482 -------------------------------------------- 7 files changed, 3109 deletions(-) delete mode 100644 locale/ca_ES.po delete mode 100644 locale/es_ES.po delete mode 100644 locale/eu_ES.po delete mode 100644 locale/fi_FI.po delete mode 100644 locale/gl_ES.po delete mode 100644 locale/messages.pot delete mode 100644 locale/nb_NO.po diff --git a/locale/ca_ES.po b/locale/ca_ES.po deleted file mode 100644 index fca60d1..0000000 --- a/locale/ca_ES.po +++ /dev/null @@ -1,429 +0,0 @@ -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# -# SPDX-FileCopyrightText: 2025 Joan Creus \n" -"Language-Team: Catalan \n" -"Language: ca_ES\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Lokalize 23.08.5\n" - -#: ukbot/contest.py:65 -#, python-format -msgid "The filter name \"%s\" was not understood" -msgstr "El nom de filtre \"%s\" no s'ha entès" - -#: ukbot/contest.py:155 -msgid "Couldn't find the list of participants!" -msgstr "No s'ha trobat la llista de participants!" - -#: ukbot/contest.py:183 -#, python-format -msgid "" -"There are no point rules defined for this contest. Point rules are defined " -"by {{tl|%(template)s}}." -msgstr "" -"No hi ha regles de puntuació definides per aquest concurs. Les regles de" -" punts es defineixen amb {{tl|%(template)s}}." - -#: ukbot/contest.py:228 -#, python-format -msgid "Could not parse {{tlx|%(template)s|%(firstarg)s}} template: %(err)s" -msgstr "" -"No s'ha pogut interpretar la plantilla {{tlx|%(template)s|%(firstarg)s}}: " -"%(err)s" - -#: ukbot/contest.py:258 -#, python-format -msgid "Unkown argument given to {{tl|%(template)s}}: %(argument)s" -msgstr "Argument desconegut passat a {{tl|%(template)s}}: %(argument)s" - -#: ukbot/contest.py:289 -#, python-format -msgid "Couldn't parse the date given to the {{tl|%(template)s}} template." -msgstr "" -"No s'ha pogut interpretar la data donada a la plantilla {{tl|%(template)s}}." - -#: ukbot/contest.py:322 -#, python-format -msgid "" -"Could not find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" -"No s'ha trobat l'usuari %(user)s passat a la plantilla {{tl|%(template)s}}." - -#: ukbot/contest.py:335 ukbot/contest.py:375 -#, python-format -msgid "" -"Failed to parse the %(template)s template: Did not find a site matching the " -"site prefix %(prefix)s" -msgstr "" -"No s'ha pogut analitzar la plantilla %(template)s: no s'ha trobat un lloc que" -" concordi amb el prefix de lloc %(prefix)s" - -#: ukbot/contest.py:354 ukbot/contest.py:394 -#, python-format -msgid "" -"Couldn't find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" -"No s'ha trobat l'usuari %(user)s passat a la plantilla {{tl|%(template)s}}." - -#: ukbot/contest.py:529 -msgid "Day" -msgstr "Dia" - -#: ukbot/contest.py:530 -msgid "Points" -msgstr "Punts" - -#: ukbot/contest.py:533 ukbot/contest.py:748 ukbot/contest.py:935 -#: ukbot/contest.py:936 ukbot/contest.py:937 -msgid "%e. %B %Y, %H:%M" -msgstr "%e. %B %Y, %H:%M" - -#: ukbot/contest.py:534 -#, python-format -msgid "Updated %(date)s" -msgstr "Actualitzat %(date)s" - -#: ukbot/contest.py:569 -#, python-format -msgid "Weekly contest for week %(week)d" -msgstr "Concurs setmanal de la setmana %(week)d" - -#: ukbot/contest.py:571 -#, python-format -msgid "Weekly contest for week %(startweek)d–%(endweek)d" -msgstr "Concurs setmanal de la setmana %(startweek)d–%(endweek)d" - -#: ukbot/contest.py:649 -msgid "Regards" -msgstr "Salutacions" - -#: ukbot/contest.py:649 -msgid "and" -msgstr "i" - -#: ukbot/contest.py:679 -#, python-format -msgid "" -"Now you must check if the results look ok. If there are error messages at " -"the bottom of the [[%(page)s|contest page]], you should check that the " -"related contributions have been awarded the correct number of points. Also " -"check if there are comments or complaints on the discussion page. If " -"everything looks fine, [%(link)s click here] (and save) to indicate that I " -"can send out the awards at first occasion." -msgstr "" -"Ara caldria comprovar si el resultat sembla correcte. Si hi ha missatges" -" d'error al final de la [[%(page)s|pàgina de concurs]], caldria comprovar si" -" les contribucions relacionades amb aquest missatge han rebut el nombre de" -" punts correcte. Comproveu també si hi ha comentaris o queixes a la pàgina de" -" discussió. Si tot sembla que està bé, [%(link)s cliqueu aquí] (i deseu) per" -" indicar que puc enviar els premis de seguida que pugui." - -#: ukbot/contest.py:680 -msgid "Thanks, ~~~~" -msgstr "Gràcies, ~~~~" - -#: ukbot/contest.py:691 -#, python-format -msgid "Awards have been [%(link)s sent out]." -msgstr "Els premis s'han [%(link)s enviat]." - -#: ukbot/contest.py:880 ukbot/ukbot.py:148 ukbot/ukbot.py:151 -msgid "UKBot encountered a problem" -msgstr "UKBot ha trobat un problema" - -#: ukbot/contest.py:930 -msgid "" -"This contest is closed – thanks to everyone who participated! Awards will be " -"sent out as soon as the contest organizer has checked the results." -msgstr "" -"Aquest concurs està tancat – gràcies a tothom que hi ha participat! Els" -" premis s'enviaran de seguida que l'organitzador del concurs hagi comprovat" -" els resultats." - -#: ukbot/contest.py:932 -msgid "This contest is closed – thanks to everyone who participated!" -msgstr "Aquest concurs està tancat – gràcies a tothom que hi ha participat!" - -#: ukbot/contest.py:939 -#, python-format -msgid "" -"Last updated %(lastupdate)s. The contest is open from %(startdate)s to " -"%(enddate)s." -msgstr "" -"Actualitzat per darrera vegada a %(lastupdate)s. El concurs està obert des de" -" %(startdate)s fins " -"%(enddate)s." - -#: ukbot/contest.py:960 -#, python-format -msgid "UKBot encountered the following problems with the page [[%s]]" -msgstr "UKBot ha trobat els següents problemes amb la pàgina [[%s]]" - -#: ukbot/contest.py:994 -#, python-format -msgid "Results markers %(start_marker)s and %(end_marker)s not found" -msgstr "" -"No s'han trobat els marcadors de resultats %(start_marker)s i %(end_marker)s" - -#: ukbot/contest.py:1005 -#, python-format -msgid "No \"%(section_name)s\" section found." -msgstr "No s'ha trobat la secció \"%(section_name)s\"." - -#: ukbot/contest.py:1015 -msgid "Updating with final results, the contest is now closed." -msgstr "Actualitzant amb els resultats finals, el concurs queda tancat." - -#: ukbot/contest.py:1017 -msgid "Checking results and handing out awards" -msgstr "Comprovant els resultats i repartint premis" - -#: ukbot/contest.py:1019 -msgid "Updating" -msgstr "Actualitzant" - -#: ukbot/contest.py:1149 -#, python-format -msgid "The weekly contest is: %(link)s" -msgstr "El concurs setmanal és: %(link)s" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "suspended since" -msgstr "suspès des de" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "%A, %H:%M" -msgstr "%A, %H:%M" - -#: ukbot/contributions.py:178 ukbot/user.py:679 -msgid "No qualifying contributions registered yet" -msgstr "Encara no s'hi han registrat contribucions qualificades" - -#: ukbot/contributions.py:181 -#, python-format -msgid "%d article" -msgid_plural "%d articles" -msgstr[0] "%d article" -msgstr[1] "%d articles" - -#: ukbot/contributions.py:187 -msgid "{{Kolonner}}" -msgstr "{{Columnes}}" - -#: ukbot/contributions.py:221 -msgid "%d.%m, %H:%M" -msgstr "%d.%m, %H:%M" - -#: ukbot/contributions.py:229 -msgid "capped at max" -msgstr "limitat al màxim" - -#: ukbot/contributions.py:265 -msgid "Category hit" -msgstr "Categoria trobada" - -#: ukbot/contributions.py:278 -#, python-format -msgid "Total: %(bytecount)d bytes, %(wordcount)d words" -msgstr "Total: %(bytecount)d bytes, %(wordcount)d paraules" - -#: ukbot/contributions.py:293 -msgid "" -"Note: The contributions to this article are currently " -"disqualified." -msgstr "" -"Nota: Les contribucions a aquest article estan " -"desqualificades actualment." - -#: ukbot/contributions.py:302 -msgid "N" -msgstr "N" - -#: ukbot/contributions.py:305 -msgid "W" -msgstr "W" - -#: ukbot/filters.py:150 -msgid "Too few arguments given to this template." -msgstr "Massa pocs arguments passats a aquesta plantilla." - -#: ukbot/filters.py:198 -#, python-format -msgid "" -"Could not analyze page %(article)s because the revision %(rev)d could not be " -"parsed: %(error)s" -msgstr "" -"No s'ha pogut analitzar la pàgina %(article)s perquè la revisió %(rev)d no" -" s'ha pogut analitzar: %(error)s" - -#: ukbot/filters.py:233 -msgid "Could not parse the catignore page" -msgstr "No s'ha pogut interpretar la pàgina catignore" - -#: ukbot/filters.py:238 -msgid "No category values given!" -msgstr "No s'han donat valors a les categories!" - -#: ukbot/filters.py:444 -msgid "Encountered an infinite category loop: " -msgstr "S'ha trobat un bucle infinit de categories:" - -#: ukbot/filters.py:483 -msgid "No byte limit (second argument) given" -msgstr "No s'ha donat el límit de bytes (segon argument)" - -#: ukbot/filters.py:720 -#, python-format -msgid "No \"%s\" parameter given" -msgstr "No s'ha donat el paràmetre \"%s\"" - -#: ukbot/revision.py:132 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because no words were found in the " -"parent revision (%(parentid)s) of size %(size)d, possibly due to unclosed " -"tags or templates in that revision." -msgstr "" -"Revisió [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: La" -" diferència de paraules podria estar malament perquè no s'han trobat paraules" -" a la revisió anterior (%(parentid)s) de mida %(size)d, possiblement per" -" culpa de tags o plantilles mal tancades en aquella revisió." - -#: ukbot/revision.py:142 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because the word count increase " -"(%(words)d) is larger than the byte increase (%(bytes)d). Wrong word counts " -"can occur for invalid wiki text." -msgstr "" -"Revisió [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: La" -" diferència de paraules podria estar malament perquè l'increment en nombre de" -" paraules (%(words)d) és més gran que l'increment en bytes (%(bytes)d). Els" -" errors en comptar paraules poden ser deguts a viquitext incorrecte." - -#: ukbot/sites.py:63 -#, python-format -msgid "Page does not exist: [[%(pagename)s]]" -msgstr "La pàgina no existeix: [[%(pagename)s]]" - -#: ukbot/sites.py:80 -#, python-format -msgid "Could not find a site matching the prefix \"%(key)s\"" -msgstr "No s'ha trobat un site que concordi amb el prefix \"%(key)s\"" - -#: ukbot/ukbot.py:169 -#, python-format -msgid "#REDIRECT [[%s]]" -msgstr "#REDIRECT [[%s]]" - -#: ukbot/ukbot.py:171 -#, python-format -msgid "Redirecting to %s" -msgstr "Redirigint a %s" - -#: ukbot/user.py:681 -msgid "articles" -msgstr "articles" - -#: ukbot/user.py:683 -msgid "{{Kolonner}}\n" -msgstr "{{Columnes}}\n" - -#: ukbot/rules/byte.py:20 -#, python-format -msgid "%(bytes).f bytes" -msgstr "%(bytes).f bytes" - -#: ukbot/rules/contrib.py:16 -msgid "contribution" -msgstr "contribució" - -#: ukbot/rules/external_link.py:30 -msgid "links" -msgstr "enllaços" - -#: ukbot/rules/image.py:142 -msgid "images" -msgstr "imatges" - -#: ukbot/rules/new.py:16 -msgid "new page" -msgstr "pàgina nova" - -#: ukbot/rules/qualified.py:22 -msgid "qualified" -msgstr "qualificada" - -#: ukbot/rules/redirect.py:16 -msgid "redirect" -msgstr "redirecció" - -#: ukbot/rules/ref.py:81 -msgid "references" -msgstr "referències" - -#: ukbot/rules/ref.py:85 -msgid "reference pointers" -msgstr "punters a referència" - -#: ukbot/rules/regexp.py:19 -msgid "regexp" -msgstr "expressió regular" - -#: ukbot/rules/regexp.py:44 -msgid "section" -msgstr "secció" - -#: ukbot/rules/rule.py:76 -#, python-format -msgid "bonus %(words)d words" -msgstr "bonificació %(words)d paraules" - -#: ukbot/rules/templateremoval.py:88 -#, python-format -msgid "removal of {{tl|%(template)s}}" -msgstr "treure {{tl|%(template)s}}" - -#: ukbot/rules/wikidata.py:47 -#, python-format -msgid "label (%(lang)s)" -msgstr "etiqueta (%(lang)s)" - -#: ukbot/rules/wikidata.py:53 -#, python-format -msgid "description (%(lang)s)" -msgstr "descripció (%(lang)s)" - -#: ukbot/rules/wikidata.py:59 -#, python-format -msgid "alias (%(lang)s)" -msgstr "àlies (%(lang)s)" - -#: ukbot/rules/wikidata.py:72 -#, python-format -msgid "%(property)s statement" -msgstr "declaració de %(property)s" - -#: ukbot/rules/wikidata.py:73 -#, python-format -msgid "%(count)d %(property)s statements" -msgstr "%(count)d declaracions de %(property)s" - -#: ukbot/rules/word.py:20 -#, python-format -msgid "%(words).f words" -msgstr "%(words).f paraules" - diff --git a/locale/es_ES.po b/locale/es_ES.po deleted file mode 100644 index 665c7e5..0000000 --- a/locale/es_ES.po +++ /dev/null @@ -1,433 +0,0 @@ -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# -# Rubén Ojeda , 2025 -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-02 15:46+0200\n" -"PO-Revision-Date: 2020-11-24 20:36+0100\n" -"Last-Translator: Rubén Ojeda \n" -"Language: es_ES\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Lokalize 19.12.3\n" - -#: ukbot/contest.py:65 -#, python-format -msgid "The filter name \"%s\" was not understood" -msgstr "No se entendió el nombre del filtro \"%s\"" - -#: ukbot/contest.py:155 -msgid "Couldn't find the list of participants!" -msgstr "¡No se ha encontrado la lista de participantes!" - -#: ukbot/contest.py:183 -#, python-format -msgid "" -"There are no point rules defined for this contest. Point rules are defined " -"by {{tl|%(template)s}}." -msgstr "" -"No existen reglas de puntos definidas para este concurso. Las reglas de " -"puntos se definen con {{tl|%(template)s}}." - -#: ukbot/contest.py:228 -#, python-format -msgid "Could not parse {{tlx|%(template)s|%(firstarg)s}} template: %(err)s" -msgstr "" -"No se pudo analizar la plantilla {{tlx|%(template)s|%(firstarg)s}}: %(err)s" - -#: ukbot/contest.py:258 -#, python-format -msgid "Unkown argument given to {{tl|%(template)s}}: %(argument)s" -msgstr "" -"Argumento desconocido proporcionado a {{tl|%(template)s}}: %(argument)s" - -#: ukbot/contest.py:289 -#, python-format -msgid "Couldn't parse the date given to the {{tl|%(template)s}} template." -msgstr "" -"No se pudo entender la fecha proporcionada a la plantilla {{tl|" -"%(template)s}}." - -#: ukbot/contest.py:322 -#, python-format -msgid "" -"Could not find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" -"No se pudo encontrar el usuario %(user)s proporcionado a la plantilla {{tl|" -"%(template)s}}." - -#: ukbot/contest.py:335 ukbot/contest.py:375 -#, python-format -msgid "" -"Failed to parse the %(template)s template: Did not find a site matching the " -"site prefix %(prefix)s" -msgstr "" -"No se pudo analizar la plantilla %(template)s: no hemos encontrado un site " -"que concuerde con el prefijo que tenemos: %(prefix)s" - -#: ukbot/contest.py:354 ukbot/contest.py:394 -#, python-format -msgid "" -"Couldn't find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" -"No se pudo encontrar el usuario %(user)s proporcionado a la plantilla {{tl|" -"%(template)s}}." - -#: ukbot/contest.py:529 -msgid "Day" -msgstr "Día" - -#: ukbot/contest.py:530 -msgid "Points" -msgstr "Puntos" - -#: ukbot/contest.py:533 ukbot/contest.py:748 ukbot/contest.py:935 -#: ukbot/contest.py:936 ukbot/contest.py:937 -msgid "%e. %B %Y, %H:%M" -msgstr "%e %B %Y, %H:%M" - -#: ukbot/contest.py:534 -#, python-format -msgid "Updated %(date)s" -msgstr "Actualizado %(date)s" - -#: ukbot/contest.py:569 -#, python-format -msgid "Weekly contest for week %(week)d" -msgstr "Concurso semanal de la semana %(week)d" - -#: ukbot/contest.py:571 -#, python-format -msgid "Weekly contest for week %(startweek)d–%(endweek)d" -msgstr "Concurso semanal de la semana %(startweek)d–%(endweek)d" - -#: ukbot/contest.py:649 -msgid "Regards" -msgstr "Atentamente" - -#: ukbot/contest.py:649 -msgid "and" -msgstr "y" - -#: ukbot/contest.py:679 -#, python-format -msgid "" -"Now you must check if the results look ok. If there are error messages at " -"the bottom of the [[%(page)s|contest page]], you should check that the " -"related contributions have been awarded the correct number of points. Also " -"check if there are comments or complaints on the discussion page. If " -"everything looks fine, [%(link)s click here] (and save) to indicate that I " -"can send out the awards at first occasion." -msgstr "" -"Ahora debes comprobar si los resultados parecen correctos. Si hay mensajes " -"de error al final de la [[%(page)s|página del concurso]], deberías comprobar " -"que las contribuciones relacionadas han recibido el número correcto de " -"puntos. Comprueba también si hay comentarios o quejas en la página de " -"discusión. Si todo está bien, [%(link)s haz clic aquí] (y guarda) para " -"indicar que puedo enviar los premios en cuanto pueda." - -#: ukbot/contest.py:680 -msgid "Thanks, ~~~~" -msgstr "Gracias, ~~~~" - -#: ukbot/contest.py:691 -#, python-format -msgid "Awards have been [%(link)s sent out]." -msgstr "Se han [%(link)s enviado] los premios." - -#: ukbot/contest.py:880 ukbot/ukbot.py:148 ukbot/ukbot.py:151 -msgid "UKBot encountered a problem" -msgstr "UKBot ha encontrado un problema" - -#: ukbot/contest.py:930 -msgid "" -"This contest is closed – thanks to everyone who participated! Awards will be " -"sent out as soon as the contest organizer has checked the results." -msgstr "" -"Este concurso ha acabado – ¡gracias a todas las personas que han " -"participado! Los premios se enviarán en cuanto el organizador del concurso " -"haya comprobado los resultados." - -#: ukbot/contest.py:932 -msgid "This contest is closed – thanks to everyone who participated!" -msgstr "" -"Este concurso ha acabado – ¡gracias a todas las personas que han participado!" - -#: ukbot/contest.py:939 -#, python-format -msgid "" -"Last updated %(lastupdate)s. The contest is open from %(startdate)s to " -"%(enddate)s." -msgstr "" -"Última actualización %(lastupdate)s. El concurso está abierto desde " -"%(startdate)s hasta %(enddate)s." - -#: ukbot/contest.py:960 -#, python-format -msgid "UKBot encountered the following problems with the page [[%s]]" -msgstr "UKBot ha encontrado los siguientes problemas con la página [[%s]]" - -#: ukbot/contest.py:994 -#, python-format -msgid "Results markers %(start_marker)s and %(end_marker)s not found" -msgstr "" -"Los marcadores de resultados %(start_marker)s y %(end_marker)s no se han " -"encontrado" - -#: ukbot/contest.py:1005 -#, python-format -msgid "No \"%(section_name)s\" section found." -msgstr "No se ha encontrado la sección \"%(section_name)s\"." - -#: ukbot/contest.py:1015 -msgid "Updating with final results, the contest is now closed." -msgstr "Actualizando con los resultados finales, el concurso ha acabado." - -#: ukbot/contest.py:1017 -msgid "Checking results and handing out awards" -msgstr "Comprobando los resultados y entregando premios" - -#: ukbot/contest.py:1019 -msgid "Updating" -msgstr "Actualizando" - -#: ukbot/contest.py:1149 -#, python-format -msgid "The weekly contest is: %(link)s" -msgstr "El concurso semanal es: %(link)s" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "suspended since" -msgstr "suspendido desde" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "%A, %H:%M" -msgstr "%A, %H:%M" - -#: ukbot/contributions.py:178 ukbot/user.py:679 -msgid "No qualifying contributions registered yet" -msgstr "Aún no se han registrado contribuciones calificadas" - -#: ukbot/contributions.py:181 -#, python-format -msgid "%d article" -msgid_plural "%d articles" -msgstr[0] "%d artículo" -msgstr[1] "%d artículos" - -#: ukbot/contributions.py:187 -msgid "{{Kolonner}}" -msgstr "{{Columnas}}" - -#: ukbot/contributions.py:221 -msgid "%d.%m, %H:%M" -msgstr "%d.%m, %H:%M" - -#: ukbot/contributions.py:229 -msgid "capped at max" -msgstr "limitado al máximo" - -#: ukbot/contributions.py:265 -msgid "Category hit" -msgstr "Coincidencia de categoría" - -#: ukbot/contributions.py:278 -#, fuzzy, python-format -msgid "Total: %(bytecount)d bytes, %(wordcount)d words" -msgstr "Total: {{formatnum:%(bytecount)d}} bytes, %(wordcount)d palabras" - -#: ukbot/contributions.py:293 -msgid "" -"Note: The contributions to this article are currently " -"disqualified." -msgstr "" -"Nota: Las contribuciones a este artículo están " -"descalificadas actualmente." - -#: ukbot/contributions.py:302 -msgid "N" -msgstr "N" - -#: ukbot/contributions.py:305 -msgid "W" -msgstr "W" - -#: ukbot/filters.py:150 -msgid "Too few arguments given to this template." -msgstr "Esta plantilla tiene demasiados pocos argumentos." - -#: ukbot/filters.py:198 -#, python-format -msgid "" -"Could not analyze page %(article)s because the revision %(rev)d could not be " -"parsed: %(error)s" -msgstr "" -"No se pudo analizar la página %(article)s porque la revisión %(rev)d no se " -"ha podido entender: %(error)s" - -#: ukbot/filters.py:233 -msgid "Could not parse the catignore page" -msgstr "No se pudo entender la página catignore" - -#: ukbot/filters.py:238 -msgid "No category values given!" -msgstr "¡No se han dado valores de categoría!" - -#: ukbot/filters.py:444 -msgid "Encountered an infinite category loop: " -msgstr "Se ha encontrado un bucle de categorías infinito:" - -#: ukbot/filters.py:483 -msgid "No byte limit (second argument) given" -msgstr "No se ha dado el límite de bytes (segundo argumento)" - -#: ukbot/filters.py:720 -#, python-format -msgid "No \"%s\" parameter given" -msgstr "No se ha dado el parámetro \"%s\"" - -#: ukbot/revision.py:132 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because no words were found in the " -"parent revision (%(parentid)s) of size %(size)d, possibly due to unclosed " -"tags or templates in that revision." -msgstr "" -"Revisión [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: la " -"diferencia en el número de palabras puede estar equivocada, porque no se han " -"encontrado palabras en la revisión (%(parentid)s) de tamaño %(size)d, " -"posiblemente porque que hay tags o plantillas mal cerradas en aquella " -"revisión." - -#: ukbot/revision.py:142 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because the word count increase " -"(%(words)d) is larger than the byte increase (%(bytes)d). Wrong word counts " -"can occur for invalid wiki text." -msgstr "" -"Revisión [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: la " -"diferencia en el número de palabras puede estar equivocada, porque el " -"aumento (%(words)d) en el número de palabras es mayor que el aumento de " -"bytes (%(bytes)d). Pueden salir recuentos incorrectos si el wikitexto no es " -"válido." - -#: ukbot/sites.py:63 -#, python-format -msgid "Page does not exist: [[%(pagename)s]]" -msgstr "La página no existe: [[%(pagename)s]]" - -#: ukbot/sites.py:80 -#, python-format -msgid "Could not find a site matching the prefix \"%(key)s\"" -msgstr "No se ha encontrado un site que concuerde con el prefijo \"%(key)s\"" - -#: ukbot/ukbot.py:169 -#, python-format -msgid "#REDIRECT [[%s]]" -msgstr "#REDIRECT [[%s]]" - -#: ukbot/ukbot.py:171 -#, python-format -msgid "Redirecting to %s" -msgstr "Redirigiendo a %s" - -#: ukbot/user.py:681 -msgid "articles" -msgstr "artículos" - -#: ukbot/user.py:683 -msgid "{{Kolonner}}\n" -msgstr "{{Columnas}}\n" - -#: ukbot/rules/byte.py:20 -#, python-format -msgid "%(bytes).f bytes" -msgstr "%(bytes).f bytes" - -#: ukbot/rules/contrib.py:16 -msgid "contribution" -msgstr "contribución" - -#: ukbot/rules/external_link.py:30 -msgid "links" -msgstr "enlaces" - -#: ukbot/rules/image.py:142 -msgid "images" -msgstr "imágenes" - -#: ukbot/rules/new.py:16 -msgid "new page" -msgstr "página nueva" - -#: ukbot/rules/qualified.py:22 -msgid "qualified" -msgstr "calificado" - -#: ukbot/rules/redirect.py:16 -msgid "redirect" -msgstr "redirección" - -#: ukbot/rules/ref.py:81 -msgid "references" -msgstr "referencias" - -#: ukbot/rules/ref.py:85 -msgid "reference pointers" -msgstr "punteros de referencia" - -#: ukbot/rules/regexp.py:19 -msgid "regexp" -msgstr "regexp" - -#: ukbot/rules/regexp.py:44 -msgid "section" -msgstr "sección" - -#: ukbot/rules/rule.py:76 -#, python-format -msgid "bonus %(words)d words" -msgstr "%(words)d palabras extra" - -#: ukbot/rules/templateremoval.py:88 -#, python-format -msgid "removal of {{tl|%(template)s}}" -msgstr "borrado de {{tl|%(template)s}}" - -#: ukbot/rules/wikidata.py:47 -#, python-format -msgid "label (%(lang)s)" -msgstr "etiqueta (%(lang)s)" - -#: ukbot/rules/wikidata.py:53 -#, python-format -msgid "description (%(lang)s)" -msgstr "descripción (%(lang)s)" - -#: ukbot/rules/wikidata.py:59 -#, python-format -msgid "alias (%(lang)s)" -msgstr "alias (%(lang)s)" - -#: ukbot/rules/wikidata.py:72 -#, python-format -msgid "%(property)s statement" -msgstr "declaración de %(property)s" - -#: ukbot/rules/wikidata.py:73 -#, python-format -msgid "%(count)d %(property)s statements" -msgstr "%(count)d declaraciones de %(property)s" - -#: ukbot/rules/word.py:20 -#, python-format -msgid "%(words).f words" -msgstr "%(words).f palabras" diff --git a/locale/eu_ES.po b/locale/eu_ES.po deleted file mode 100644 index 71f51d6..0000000 --- a/locale/eu_ES.po +++ /dev/null @@ -1,471 +0,0 @@ -# Basque translation for UKBot -# Copyright (C) 2017 -# This file is distributed under the same license as the UKBot package. -# Galder Gonzalez Larrañaga , 2017 -# -msgid "" -msgstr "" -"Project-Id-Version: UKBot\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-02 15:46+0200\n" -"PO-Revision-Date: 2019-09-05 01:57+0200\n" -"Last-Translator: Galder Gonzalez \n" -"Language-Team: \n" -"Language: eu\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 2.2.3\n" - -#: ukbot/contest.py:65 -#, python-format -msgid "The filter name \"%s\" was not understood" -msgstr "" - -#: ukbot/contest.py:155 -msgid "Couldn't find the list of participants!" -msgstr "Ezin izan da parte-hartzaileen zerrendarik aurkitu!" - -#: ukbot/contest.py:183 -#, python-format -msgid "" -"There are no point rules defined for this contest. Point rules are defined " -"by {{tl|%(template)s}}." -msgstr "" -"Ez dago puntuazio araurik lehiaketa honetan. Puntuak {{tx|%(template)s}}." -"txantiloiak definitzen ditu." - -#: ukbot/contest.py:228 -#, fuzzy, python-format -msgid "Could not parse {{tlx|%(template)s|%(firstarg)s}} template: %(err)s" -msgstr "Ezin izan da {{tx|%(template)s}} txantiloia irakurri." - -#: ukbot/contest.py:258 -#, python-format -msgid "Unkown argument given to {{tl|%(template)s}}: %(argument)s" -msgstr "Parametro ezezaguna eman da {{tx|%(template)s}}: %(argument)s" - -#: ukbot/contest.py:289 -#, python-format -msgid "Couldn't parse the date given to the {{tl|%(template)s}} template." -msgstr "Ezin izan da emandako data kalkulatu {{tx|%(template)s}} txantiloian." - -#: ukbot/contest.py:322 -#, python-format -msgid "" -"Could not find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" -"Ezin izan da %(user)s wikilaria aurkitu {{tx|%(template)s}} txantiloian." - -#: ukbot/contest.py:335 ukbot/contest.py:375 -#, python-format -msgid "" -"Failed to parse the %(template)s template: Did not find a site matching the " -"site prefix %(prefix)s" -msgstr "" - -#: ukbot/contest.py:354 ukbot/contest.py:394 -#, python-format -msgid "" -"Couldn't find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" -"Ezin izan da %(user)s wikilaria aurkitu {{tx|%(template)s}} txantiloian." - -#: ukbot/contest.py:529 -msgid "Day" -msgstr "Eguna" - -#: ukbot/contest.py:530 -msgid "Points" -msgstr "Puntuak" - -#: ukbot/contest.py:533 ukbot/contest.py:748 ukbot/contest.py:935 -#: ukbot/contest.py:936 ukbot/contest.py:937 -msgid "%e. %B %Y, %H:%M" -msgstr "%Y %B %e, %H:%M" - -#: ukbot/contest.py:534 -#, python-format -msgid "Updated %(date)s" -msgstr "Azken gaurkotzea: %(date)s" - -#: ukbot/contest.py:569 -#, python-format -msgid "Weekly contest for week %(week)d" -msgstr "Asteroko lehiaketa aste honetan: %(week)d" - -#: ukbot/contest.py:571 -#, python-format -msgid "Weekly contest for week %(startweek)d–%(endweek)d" -msgstr "Asteroko lehiaketa aste honetan: %(startweek)d-%(endweek)d" - -#: ukbot/contest.py:649 -msgid "Regards" -msgstr "Ondo segi" - -#: ukbot/contest.py:649 -msgid "and" -msgstr "eta" - -#: ukbot/contest.py:679 -#, python-format -msgid "" -"Now you must check if the results look ok. If there are error messages at " -"the bottom of the [[%(page)s|contest page]], you should check that the " -"related contributions have been awarded the correct number of points. Also " -"check if there are comments or complaints on the discussion page. If " -"everything looks fine, [%(link)s click here] (and save) to indicate that I " -"can send out the awards at first occasion." -msgstr "" -"Orain ikusi behar duzu ea emaitzek itxura ona duten. Akatsik badago mezuetan " -"[[%(page)s|lehiaketaren orrialdearen]] amaieran, begiratu beharko zenuke ea " -"ekarpen guztiek puntu kopuru zuzena jaso ote duten. Gainera konproba ezazu " -"denak itxura ona duela, [%(link)s egin klik hemen] (eta gorde) esateko bidal " -"ditzakedala jada sariak." - -#: ukbot/contest.py:680 -msgid "Thanks, ~~~~" -msgstr "Eskerrik asko, ~~~~" - -#: ukbot/contest.py:691 -#, python-format -msgid "Awards have been [%(link)s sent out]." -msgstr "Sariak [%(link)s bidali dira]." - -#: ukbot/contest.py:880 ukbot/ukbot.py:148 ukbot/ukbot.py:151 -msgid "UKBot encountered a problem" -msgstr "UKBotek arazo bat aurkitu du" - -#: ukbot/contest.py:930 -msgid "" -"This contest is closed – thanks to everyone who participated! Awards will be " -"sent out as soon as the contest organizer has checked the results." -msgstr "" -"Lehiaketa hau itxita dago - eskerrik asko parte-hartzaile guztiei! Sariak " -"emango dira lehiaketaren antolatzaileak emaitzak berrikusten dituenean." - -#: ukbot/contest.py:932 -msgid "This contest is closed – thanks to everyone who participated!" -msgstr "Lehiaketa hau itxita dag - eskerrik asko parte-hartzailee guztiei!" - -#: ukbot/contest.py:939 -#, python-format -msgid "" -"Last updated %(lastupdate)s. The contest is open from %(startdate)s to " -"%(enddate)s." -msgstr "" -"Azken gaurkotzea: %(lastupdate)s. Lehiaketa hau %(startdate)s eta " -"%(enddate)s bitarte irekita dago." - -#: ukbot/contest.py:960 -#, fuzzy, python-format -msgid "UKBot encountered the following problems with the page [[%s]]" -msgstr "UKBotek honako akatsa aurkitu du artikuluan: [[:%s]]" - -#: ukbot/contest.py:994 -#, python-format -msgid "Results markers %(start_marker)s and %(end_marker)s not found" -msgstr "" - -#: ukbot/contest.py:1005 -#, python-format -msgid "No \"%(section_name)s\" section found." -msgstr "" - -#: ukbot/contest.py:1015 -msgid "Updating with final results, the contest is now closed." -msgstr "Azken emaitzekin gaurkotzen, lehiaketa itxiko da." - -#: ukbot/contest.py:1017 -msgid "Checking results and handing out awards" -msgstr "Emaitzak konprobatzen eta sariak ematen" - -#: ukbot/contest.py:1019 -msgid "Updating" -msgstr "Gaurkotzen" - -#: ukbot/contest.py:1149 -#, python-format -msgid "The weekly contest is: %(link)s" -msgstr "Aste honetako lehiaketa: %(link)s" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "suspended since" -msgstr "noiztik suspenditua" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "%A, %H:%M" -msgstr "%A, %H.%M" - -#: ukbot/contributions.py:178 ukbot/user.py:679 -msgid "No qualifying contributions registered yet" -msgstr "Ez du egin lehiaketa honetarako ekarpen baliagarririk oraindik" - -#: ukbot/contributions.py:181 -#, fuzzy, python-format -msgid "%d article" -msgid_plural "%d articles" -msgstr[0] "artikulu" -msgstr[1] "artikulu" - -#: ukbot/contributions.py:187 -msgid "{{Kolonner}}" -msgstr "{{Multicol}}" - -#: ukbot/contributions.py:221 -msgid "%d.%m, %H:%M" -msgstr "%Y %B %e, %H:%M" - -#: ukbot/contributions.py:229 -msgid "capped at max" -msgstr "" - -#: ukbot/contributions.py:265 -msgid "Category hit" -msgstr "Kategoria" - -#: ukbot/contributions.py:278 -#, fuzzy, python-format -msgid "Total: %(bytecount)d bytes, %(wordcount)d words" -msgstr "Guztira: {{formatnum:%(bytecount)d}} byte, %(wordcount)d hitzetan" - -#: ukbot/contributions.py:293 -msgid "" -"Note: The contributions to this article are currently " -"disqualified." -msgstr "" -"Oharra: Artikulu honi egindako ekarpenak oraintxe " -"deskalifikaturik daude." - -#: ukbot/contributions.py:302 -msgid "N" -msgstr "B" - -#: ukbot/contributions.py:305 -#, fuzzy -msgid "W" -msgstr "B" - -#: ukbot/filters.py:150 -#, fuzzy -msgid "Too few arguments given to this template." -msgstr "Parametro ezezaguna eman da {{tx|%(template)s}}: %(argument)s" - -#: ukbot/filters.py:198 -#, fuzzy, python-format -msgid "" -"Could not analyze page %(article)s because the revision %(rev)d could not be " -"parsed: %(error)s" -msgstr "" -"Ezin izan da %(article)s artikulua aztertu berrikuspenetako bat %(prevrev)d " -"edo %(rev)d ezin izan delako ikusi: %(error)s" - -#: ukbot/filters.py:233 -msgid "Could not parse the catignore page" -msgstr "Ezin izan da catignore orrialdea kargatu" - -#: ukbot/filters.py:238 -msgid "No category values given!" -msgstr "" - -#: ukbot/filters.py:444 -msgid "Encountered an infinite category loop: " -msgstr "Kategoria infinitu lotuar bat aurkitu da: " - -#: ukbot/filters.py:483 -#, fuzzy -msgid "No byte limit (second argument) given" -msgstr "" -"Ez zaio byte mugarik eman (bigarren argumentua) {tx|%(template)s|" -"%(firstarg)s}} txantiloiari" - -#: ukbot/filters.py:720 -#, python-format -msgid "No \"%s\" parameter given" -msgstr "" - -#: ukbot/revision.py:132 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because no words were found in the " -"parent revision (%(parentid)s) of size %(size)d, possibly due to unclosed " -"tags or templates in that revision." -msgstr "" -"[//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s] berrikusketa: " -"Hitz zenbaketa ezberdina izan daiteke eta akatsak izan, ez direlako hitzak " -"aurkitu aurreko berriskupenean (%(parentid)s) tamaina honekin %(size)d, " -"ziurrenik itxi gabeko etiketa edo txantiloiak direla eta." - -#: ukbot/revision.py:142 -#, fuzzy, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because the word count increase " -"(%(words)d) is larger than the byte increase (%(bytes)d). Wrong word counts " -"can occur for invalid wiki text." -msgstr "" -"[//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s] berrikuspena: " -"hitz zenbaketa ezberdintasuna gaizki egon daiteke, hitz kontaketaren aldea " -"(%(words)d) handiagoa delako byte kontaketaren aldea baino (%(bytes)d)." -"Gaizki egindako hitz kontaketa wiki testu okerra dela eta gerta daiteke." - -#: ukbot/sites.py:63 -#, python-format -msgid "Page does not exist: [[%(pagename)s]]" -msgstr "" - -#: ukbot/sites.py:80 -#, python-format -msgid "Could not find a site matching the prefix \"%(key)s\"" -msgstr "" - -#: ukbot/ukbot.py:169 -#, python-format -msgid "#REDIRECT [[%s]]" -msgstr "#BIRZUZENDU [[%s]]" - -#: ukbot/ukbot.py:171 -#, python-format -msgid "Redirecting to %s" -msgstr "%s orrialdera birzuzentzen" - -#: ukbot/user.py:681 -msgid "articles" -msgstr "artikulu" - -#: ukbot/user.py:683 -msgid "{{Kolonner}}\n" -msgstr "{{Multicol}}\n" - -#: ukbot/rules/byte.py:20 -#, python-format -msgid "%(bytes).f bytes" -msgstr "%(bytes).f byte" - -#: ukbot/rules/contrib.py:16 -msgid "contribution" -msgstr "ekarpena" - -#: ukbot/rules/external_link.py:30 -msgid "links" -msgstr "%(links).f lotura" - -#: ukbot/rules/image.py:142 -msgid "images" -msgstr "%(images).f irudi" - -#: ukbot/rules/new.py:16 -msgid "new page" -msgstr "orrialde berria" - -#: ukbot/rules/qualified.py:22 -msgid "qualified" -msgstr "kalifikatua" - -#: ukbot/rules/redirect.py:16 -msgid "redirect" -msgstr "birzuzeneketa" - -#: ukbot/rules/ref.py:81 -msgid "references" -msgstr "erreferentziak" - -#: ukbot/rules/ref.py:85 -msgid "reference pointers" -msgstr "erreferentzia berrerabilpena" - -#: ukbot/rules/regexp.py:19 -msgid "regexp" -msgstr "" - -#: ukbot/rules/regexp.py:44 -msgid "section" -msgstr "" - -#: ukbot/rules/rule.py:76 -#, python-format -msgid "bonus %(words)d words" -msgstr "bonus %(words)d hitz" - -#: ukbot/rules/templateremoval.py:88 -#, python-format -msgid "removal of {{tl|%(template)s}}" -msgstr "{{tx|%(template)s}} txantiloia kentzea" - -#: ukbot/rules/wikidata.py:47 -#, python-format -msgid "label (%(lang)s)" -msgstr "" - -#: ukbot/rules/wikidata.py:53 -#, python-format -msgid "description (%(lang)s)" -msgstr "" - -#: ukbot/rules/wikidata.py:59 -#, python-format -msgid "alias (%(lang)s)" -msgstr "" - -#: ukbot/rules/wikidata.py:72 -#, python-format -msgid "%(property)s statement" -msgstr "" - -#: ukbot/rules/wikidata.py:73 -#, python-format -msgid "%(count)d %(property)s statements" -msgstr "" - -#: ukbot/rules/word.py:20 -#, python-format -msgid "%(words).f words" -msgstr "%(words).f hitz" - -#~ msgid "This contest is missing a {{tl|%(template)s}} template." -#~ msgstr "Lehiaketa honek ez du {{tx|%(template)s}} txantiloia." - -#~ msgid "" -#~ "Did not find %(week)s+%(year)s or %(start)s+%(end)s in {{tl|" -#~ "%(templates)s}}." -#~ msgstr "" -#~ "Ez da aurkitu %(week)s+%(year)s edo %(start)s+%(end)s hemen: {{tx|" -#~ "%(templates)s}}." - -#~ msgid "" -#~ "Note that the contest this week is [[%(url)s|{{%(template)s|" -#~ "%(weekarg)s=%(week)s}}]]. Join in!" -#~ msgstr "" -#~ "Aste honetako lehiaketa honakoa da: [[%(url)s|{{%(template)s|" -#~ "%(weekarg)s=%(week)s}}]]. Batu!" - -#~ msgid "max" -#~ msgstr "gehienez" - -#~ msgid "added reference section" -#~ msgstr "erreferentzia atala gehitu du" - -#~ msgid "bonus %(bytes).f bytes" -#~ msgstr "bonus %(bytes).f byte" - -#~ msgid "" -#~ "No template (second argument) given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "" -#~ "Ez zaio bigarren argumentudun txantiloirik eman {{tx|%(template)s|" -#~ "%(firstarg)s}}" - -#~ msgid "No categories given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "Ez zaio kategoriarik eman {{tx|%(template)s|%(firstarg)s}}" - -#, fuzzy -#~ msgid "" -#~ "No \"%(query)s\" parameter given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "Ez zaio kategoriarik eman {{tx|%(template)s|%(firstarg)s}}" - -#~ msgid "Unknown argument given to {{tl|%(template)s}}: %(argument)s" -#~ msgstr "Parametro ezezaguna eman da {{tx|%(template)s}}: %(argument)s" - -#~ msgid "Found no \"%(section)s\" sections in the page \"%(page)s\"" -#~ msgstr "Ez da \"%(section)s\" sekziorik aurkitu \"%(page)s\" orrialdean" diff --git a/locale/fi_FI.po b/locale/fi_FI.po deleted file mode 100644 index 1971e62..0000000 --- a/locale/fi_FI.po +++ /dev/null @@ -1,472 +0,0 @@ -# Finnish translation for UKBot -# Copyright (C) 2013 -# This file is distributed under the same license as the UKBot package. -# Gálaniitoluodda, 2013 -# -msgid "" -msgstr "" -"Project-Id-Version: UKBot\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-02 15:46+0200\n" -"PO-Revision-Date: 2019-09-05 01:56+0200\n" -"Last-Translator: Dan Michael O. Heggø \n" -"Language-Team: \n" -"Language: fi\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 2.2.3\n" - -#: ukbot/contest.py:65 -#, python-format -msgid "The filter name \"%s\" was not understood" -msgstr "" - -#: ukbot/contest.py:155 -msgid "Couldn't find the list of participants!" -msgstr "Osallistujaluettelon löytäminen epäonnistui!" - -#: ukbot/contest.py:183 -#, python-format -msgid "" -"There are no point rules defined for this contest. Point rules are defined " -"by {{tl|%(template)s}}." -msgstr "" -"Tähän kilpailuun ei ole asetettu pistelaskusääntöjä. Säännöt merkitään näin: " -"{{tl|%(template)s}}." - -#: ukbot/contest.py:228 -#, fuzzy, python-format -msgid "Could not parse {{tlx|%(template)s|%(firstarg)s}} template: %(err)s" -msgstr "{{tl|%(template)s}}-mallineen ymmärtäminen epäonnistui." - -#: ukbot/contest.py:258 -#, python-format -msgid "Unkown argument given to {{tl|%(template)s}}: %(argument)s" -msgstr "" -"Tuntematon argumentti on annettu kohteeseen {{tl|%(template)s}}: %(argument)s" - -#: ukbot/contest.py:289 -#, python-format -msgid "Couldn't parse the date given to the {{tl|%(template)s}} template." -msgstr "" -"{{tl|%(template)s}}-mallineeseen annettu päivämäärä ei tullut ymmärretyksi." - -#: ukbot/contest.py:322 -#, python-format -msgid "" -"Could not find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "Käyttäjää %(user)s ri löytynyt {{tl|%(template)s}}-mallineesta." - -#: ukbot/contest.py:335 ukbot/contest.py:375 -#, python-format -msgid "" -"Failed to parse the %(template)s template: Did not find a site matching the " -"site prefix %(prefix)s" -msgstr "" - -#: ukbot/contest.py:354 ukbot/contest.py:394 -#, python-format -msgid "" -"Couldn't find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "Ei löydetty käyttäjää %(user)s {{tl|%(template)s}}-mallineesta." - -#: ukbot/contest.py:529 -msgid "Day" -msgstr "Päivä" - -#: ukbot/contest.py:530 -msgid "Points" -msgstr "Pisteet" - -#: ukbot/contest.py:533 ukbot/contest.py:748 ukbot/contest.py:935 -#: ukbot/contest.py:936 ukbot/contest.py:937 -msgid "%e. %B %Y, %H:%M" -msgstr "%e. %Bta %Y kello %H.%M" - -#: ukbot/contest.py:534 -#, python-format -msgid "Updated %(date)s" -msgstr "Päivitetty %(date)s" - -#: ukbot/contest.py:569 -#, python-format -msgid "Weekly contest for week %(week)d" -msgstr "Viikon %(week)d kilpailu" - -#: ukbot/contest.py:571 -#, python-format -msgid "Weekly contest for week %(startweek)d–%(endweek)d" -msgstr "Viikkojen %(startweek)d–%(endweek)d kilpailu" - -#: ukbot/contest.py:649 -msgid "Regards" -msgstr "Terveisin" - -#: ukbot/contest.py:649 -msgid "and" -msgstr "ja" - -#: ukbot/contest.py:679 -#, python-format -msgid "" -"Now you must check if the results look ok. If there are error messages at " -"the bottom of the [[%(page)s|contest page]], you should check that the " -"related contributions have been awarded the correct number of points. Also " -"check if there are comments or complaints on the discussion page. If " -"everything looks fine, [%(link)s click here] (and save) to indicate that I " -"can send out the awards at first occasion." -msgstr "" -"Nyt sinun on tarkistettava tulokset. Mikäli [[%(page)s|kilpailusivun]] " -"lopussa on virheilmoituksia, on sinun tarkistettava, että muokkauksista on " -"saatu oikea määrä pisteitä. Katso myös onko keskustelusivulla kommentteja " -"tai valituksia. Jos kaikki näyttää olevan kunnossa, paina [%(link)s tästä] " -"(ja tallenna), niin rusetit lähetetään melko nopeasti." - -#: ukbot/contest.py:680 -msgid "Thanks, ~~~~" -msgstr "Terveisin, ~~~~" - -#: ukbot/contest.py:691 -#, python-format -msgid "Awards have been [%(link)s sent out]." -msgstr "Rusetit on nyt [%(link)s jaettu]." - -#: ukbot/contest.py:880 ukbot/ukbot.py:148 ukbot/ukbot.py:151 -msgid "UKBot encountered a problem" -msgstr "UKBot havaitsi ongelman" - -#: ukbot/contest.py:930 -msgid "" -"This contest is closed – thanks to everyone who participated! Awards will be " -"sent out as soon as the contest organizer has checked the results." -msgstr "" -"Tämä kilpailu on päättynyt – kiitos kaikille osallistuneille! Rusetit " -"jaetaan heti kun kilpailun järjestäjä on tarkistanut tulokset." - -#: ukbot/contest.py:932 -msgid "This contest is closed – thanks to everyone who participated!" -msgstr "Tämä kilpailu on päättynyt – kiitos kaikille osallistuneille!" - -#: ukbot/contest.py:939 -#, python-format -msgid "" -"Last updated %(lastupdate)s. The contest is open from %(startdate)s to " -"%(enddate)s." -msgstr "" -"Päivitetty viimeksi %(lastupdate)s. Kilpailu on avoinna %(startdate)s – " -"%(enddate)s." - -#: ukbot/contest.py:960 -#, fuzzy, python-format -msgid "UKBot encountered the following problems with the page [[%s]]" -msgstr "UKBot havaitsi seuraavat ongelmat artikkeliin [[:%s]] liittyen" - -#: ukbot/contest.py:994 -#, python-format -msgid "Results markers %(start_marker)s and %(end_marker)s not found" -msgstr "" - -#: ukbot/contest.py:1005 -#, python-format -msgid "No \"%(section_name)s\" section found." -msgstr "" - -#: ukbot/contest.py:1015 -msgid "Updating with final results, the contest is now closed." -msgstr "Lisätään lopulliset tulokset ja merkitään kilpailu päättyneeksi." - -#: ukbot/contest.py:1017 -msgid "Checking results and handing out awards" -msgstr "Tarkistetaan tulokset ja jaetaan rusetit" - -#: ukbot/contest.py:1019 -msgid "Updating" -msgstr "Päivitetään" - -#: ukbot/contest.py:1149 -#, python-format -msgid "The weekly contest is: %(link)s" -msgstr "Viikon kilpailu on: %(link)s" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "suspended since" -msgstr "suspendert siden" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "%A, %H:%M" -msgstr "%A kello %H.%M" - -#: ukbot/contributions.py:178 ukbot/user.py:679 -msgid "No qualifying contributions registered yet" -msgstr "Hyväksyttyjä muokkauksia ei ole vielä rekisteröity" - -#: ukbot/contributions.py:181 -#, python-format -msgid "%d article" -msgid_plural "%d articles" -msgstr[0] "%d artikkeli" -msgstr[1] "%d artikkelia" - -#: ukbot/contributions.py:187 -msgid "{{Kolonner}}" -msgstr "{{Sarakkeet}}" - -#: ukbot/contributions.py:221 -msgid "%d.%m, %H:%M" -msgstr "%e. %Bta %Y kello %H.%M" - -#: ukbot/contributions.py:229 -msgid "capped at max" -msgstr "" - -#: ukbot/contributions.py:265 -msgid "Category hit" -msgstr "Luokkaosuma" - -#: ukbot/contributions.py:278 -#, fuzzy, python-format -msgid "Total: %(bytecount)d bytes, %(wordcount)d words" -msgstr "" -"Yhteensä: {{formatnum:%(bytecount)d}} {{subst:PLURAL:%(bytecount)d|tavu|" -"tavua}}, %(wordcount)d {{subst:PLURAL:%(wordcount)d|sana|sanaa}}" - -#: ukbot/contributions.py:293 -msgid "" -"Note: The contributions to this article are currently " -"disqualified." -msgstr "" -"Huomio: Muokkaukset tähän artikkeliin on toistaiseksi " -"hylätty." - -#: ukbot/contributions.py:302 -msgid "N" -msgstr "U" - -#: ukbot/contributions.py:305 -#, fuzzy -msgid "W" -msgstr "U" - -#: ukbot/filters.py:150 -#, fuzzy -msgid "Too few arguments given to this template." -msgstr "" -"Tuntematon argumentti on annettu kohteeseen {{tl|%(template)s}}: %(argument)s" - -#: ukbot/filters.py:198 -#, fuzzy, python-format -msgid "" -"Could not analyze page %(article)s because the revision %(rev)d could not be " -"parsed: %(error)s" -msgstr "" -"Artikkelin %(article)s analysointi epäonnistui sillä versio %(prevrev)d tai " -"%(rev)d ei tullut ymmärreyksi: %(error)s" - -#: ukbot/filters.py:233 -msgid "Could not parse the catignore page" -msgstr "Catignore-sivun sisältöä ei ymmärretty" - -#: ukbot/filters.py:238 -msgid "No category values given!" -msgstr "" - -#: ukbot/filters.py:444 -msgid "Encountered an infinite category loop: " -msgstr "Jumiutunut loputtomaan luokkasilmukkaan: " - -#: ukbot/filters.py:483 -#, fuzzy -msgid "No byte limit (second argument) given" -msgstr "" -"Tavurajaa (toinen argumentti) ei ole annettu kohteeseen {{tlx|%(template)s|" -"%(firstarg)s}}" - -#: ukbot/filters.py:720 -#, python-format -msgid "No \"%s\" parameter given" -msgstr "" - -#: ukbot/revision.py:132 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because no words were found in the " -"parent revision (%(parentid)s) of size %(size)d, possibly due to unclosed " -"tags or templates in that revision." -msgstr "" - -#: ukbot/revision.py:142 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because the word count increase " -"(%(words)d) is larger than the byte increase (%(bytes)d). Wrong word counts " -"can occur for invalid wiki text." -msgstr "" - -#: ukbot/sites.py:63 -#, python-format -msgid "Page does not exist: [[%(pagename)s]]" -msgstr "" - -#: ukbot/sites.py:80 -#, python-format -msgid "Could not find a site matching the prefix \"%(key)s\"" -msgstr "" - -#: ukbot/ukbot.py:169 -#, python-format -msgid "#REDIRECT [[%s]]" -msgstr "#OHJAUS [[%s]]" - -#: ukbot/ukbot.py:171 -#, python-format -msgid "Redirecting to %s" -msgstr "Ohjaus sivulle %s" - -#: ukbot/user.py:681 -msgid "articles" -msgstr "" -"%(articlecount)d {{subst:PLURAL:%(articlecount)d|artikkeli|artikkelia}}" - -#: ukbot/user.py:683 -msgid "{{Kolonner}}\n" -msgstr "{{Sarakkeet}}\n" - -#: ukbot/rules/byte.py:20 -#, python-format -msgid "%(bytes).f bytes" -msgstr "%(bytes).f {{subst:PLURAL:%(bytes).f|tavu|tavua}}" - -#: ukbot/rules/contrib.py:16 -msgid "contribution" -msgstr "" - -#: ukbot/rules/external_link.py:30 -msgid "links" -msgstr "%(links).f {{subst:PLURAL:%(links).f|linkkit|linkkiä}}" - -#: ukbot/rules/image.py:142 -msgid "images" -msgstr "%(images).f {{subst:PLURAL:%(images).f|kuva|kuvaa}}" - -#: ukbot/rules/new.py:16 -msgid "new page" -msgstr "uusi sivu" - -#: ukbot/rules/qualified.py:22 -msgid "qualified" -msgstr "hyväksytty" - -#: ukbot/rules/redirect.py:16 -msgid "redirect" -msgstr "uudelleenohjaus" - -#: ukbot/rules/ref.py:81 -msgid "references" -msgstr "" -"{{subst:PLURAL:%(num)d|Yksi lähde on lisätty|%(num)d lähdettä on lisätty}}" - -#: ukbot/rules/ref.py:85 -msgid "reference pointers" -msgstr "" -"{{subst:PLURAL:%(num)d|Yksi viittaus jo olemassa olevaan lähteeseen|%(num)d " -"viittausta jo olemassa oleviin lähteisiin}}" - -#: ukbot/rules/regexp.py:19 -msgid "regexp" -msgstr "" - -#: ukbot/rules/regexp.py:44 -msgid "section" -msgstr "" - -#: ukbot/rules/rule.py:76 -#, python-format -msgid "bonus %(words)d words" -msgstr "bonus %(words)d {{subst:PLURAL:%(words)d|sana|sanaa}}" - -#: ukbot/rules/templateremoval.py:88 -#, python-format -msgid "removal of {{tl|%(template)s}}" -msgstr "mallineen {{tl|%(template)s}} poisto" - -#: ukbot/rules/wikidata.py:47 -#, python-format -msgid "label (%(lang)s)" -msgstr "" - -#: ukbot/rules/wikidata.py:53 -#, python-format -msgid "description (%(lang)s)" -msgstr "" - -#: ukbot/rules/wikidata.py:59 -#, python-format -msgid "alias (%(lang)s)" -msgstr "" - -#: ukbot/rules/wikidata.py:72 -#, python-format -msgid "%(property)s statement" -msgstr "" - -#: ukbot/rules/wikidata.py:73 -#, python-format -msgid "%(count)d %(property)s statements" -msgstr "" - -#: ukbot/rules/word.py:20 -#, python-format -msgid "%(words).f words" -msgstr "%(words).f {{subst:PLURAL:%(words).f|sana|sanaa}}" - -#~ msgid "This contest is missing a {{tl|%(template)s}} template." -#~ msgstr "Tästä kilpailusta puuttuu {{tl|%(template)s}}-malline." - -#~ msgid "" -#~ "Did not find %(week)s+%(year)s or %(start)s+%(end)s in {{tl|" -#~ "%(templates)s}}." -#~ msgstr "" -#~ "Kohteesta {{tl|%(templates)s}} ei ole löydetty %(week)s+%(year)s eikä " -#~ "%(start)s+%(end)s." - -#~ msgid "" -#~ "Note that the contest this week is [[%(url)s|{{%(template)s|" -#~ "%(weekarg)s=%(week)s}}]]. Join in!" -#~ msgstr "" -#~ "Muista, että tämän viikon kilpailu on [[%(url)s|{{%(template)s|" -#~ "%(weekarg)s=%(week)s}}]]. Onnea matkaan!" - -#~ msgid "max" -#~ msgstr "maks" - -#~ msgid "added reference section" -#~ msgstr "yksi viittaus jo olemassaolevaan lähteeseen" - -#~ msgid "bonus %(bytes).f bytes" -#~ msgstr "bonus %(bytes).f {{subst:PLURAL:%(bytes).f|tavu|tavua}}" - -#~ msgid "" -#~ "No template (second argument) given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "" -#~ "Mallineita (toinen argumentti) ei ole annettu kohteeseen {{tlx|" -#~ "%(template)s|%(firstarg)s}}" - -#~ msgid "No categories given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "Kohteeseen {{tlx|%(template)s|%(firstarg)s}} ei ole annettu luokkia" - -#, fuzzy -#~ msgid "" -#~ "No \"%(query)s\" parameter given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "Kohteeseen {{tlx|%(template)s|%(firstarg)s}} ei ole annettu luokkia" - -#~ msgid "Unknown argument given to {{tl|%(template)s}}: %(argument)s" -#~ msgstr "" -#~ "Tuntematon argumentti on annettu kohteeseen {{tl|%(template)s}}: " -#~ "%(argument)s" - -#~ msgid "Found no \"%(section)s\" sections in the page \"%(page)s\"" -#~ msgstr "Ei löydettyjä \"%(section)s\"-osioita sivulla \"%(page)s\"" diff --git a/locale/gl_ES.po b/locale/gl_ES.po deleted file mode 100644 index 6cc1b34..0000000 --- a/locale/gl_ES.po +++ /dev/null @@ -1,427 +0,0 @@ -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# -# Francisco Prieto , 2025. -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-02 15:46+0200\n" -"PO-Revision-Date: 2020-11-24 20:36+0100\n" -"Last-Translator: Francisco Prieto \n" -"Language-Team: Galician \n" -"Language: gl_ES\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Lokalize 19.12.3\n" - -#: ukbot/contest.py:65 -#, python-format -msgid "The filter name \"%s\" was not understood" -msgstr "O nome de filtro \"%s\" non se entendeu" - -#: ukbot/contest.py:155 -msgid "Couldn't find the list of participants!" -msgstr "Non se atopou a lista de participantes!" - -#: ukbot/contest.py:183 -#, python-format -msgid "" -"There are no point rules defined for this contest. Point rules are defined " -"by {{tl|%(template)s}}." -msgstr "" -"Non hai regras de puntos definidas para este concurso. As regras de puntos " -"defínense con {{tl|%(template)s}}." - -#: ukbot/contest.py:228 -#, python-format -msgid "Could not parse {{tlx|%(template)s|%(firstarg)s}} template: %(err)s" -msgstr "" -"Non se puido analizar o modelo {{tlx|%(template)s|%(firstarg)s}}: %(err)s" - -#: ukbot/contest.py:258 -#, python-format -msgid "Unkown argument given to {{tl|%(template)s}}: %(argument)s" -msgstr "Argumento descoñecido pasado a {{tl|%(template)s}}: %(argumento)s" - -#: ukbot/contest.py:289 -#, python-format -msgid "Couldn't parse the date given to the {{tl|%(template)s}} template." -msgstr "Non se puido entender a data que se deu ao modelo {{tl|%(template)s}}." - -#: ukbot/contest.py:322 -#, python-format -msgid "" -"Could not find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" -"Non se puido atopar o usuario %(user)s que se deu ao modelo {{tl|" -"%(template)s}}." - -#: ukbot/contest.py:335 ukbot/contest.py:375 -#, python-format -msgid "" -"Failed to parse the %(template)s template: Did not find a site matching the " -"site prefix %(prefix)s" -msgstr "" -"Non se puido analizar o modelo %(template)s: non se atopou un site que " -"concorde co prefixo que temos: %(prefix)s" - -#: ukbot/contest.py:354 ukbot/contest.py:394 -#, python-format -msgid "" -"Couldn't find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" -"Non se puido atopar o usuario %(user)s que se pasou ao {{tl|%(template)s}} " -"modelo." - -#: ukbot/contest.py:529 -msgid "Day" -msgstr "Día" - -#: ukbot/contest.py:530 -msgid "Points" -msgstr "Puntos" - -#: ukbot/contest.py:533 ukbot/contest.py:748 ukbot/contest.py:935 -#: ukbot/contest.py:936 ukbot/contest.py:937 -msgid "%e. %B %Y, %H:%M" -msgstr "%e %B %Y, %H:%M" - -#: ukbot/contest.py:534 -#, python-format -msgid "Updated %(date)s" -msgstr "Actualizado %(date)s" - -#: ukbot/contest.py:569 -#, python-format -msgid "Weekly contest for week %(week)d" -msgstr "Concurso semanal da semana %(week)d" - -#: ukbot/contest.py:571 -#, python-format -msgid "Weekly contest for week %(startweek)d–%(endweek)d" -msgstr "Concurso semanal da semana %(startweek)d–%(endweek)d" - -#: ukbot/contest.py:649 -msgid "Regards" -msgstr "Atentamente" - -#: ukbot/contest.py:649 -msgid "and" -msgstr "e" - -#: ukbot/contest.py:679 -#, python-format -msgid "" -"Now you must check if the results look ok. If there are error messages at " -"the bottom of the [[%(page)s|contest page]], you should check that the " -"related contributions have been awarded the correct number of points. Also " -"check if there are comments or complaints on the discussion page. If " -"everything looks fine, [%(link)s click here] (and save) to indicate that I " -"can send out the awards at first occasion." -msgstr "" -"Agora tes que comprobar se os resultados semellan correctos. Se hai mensaxes " -"de erro ao final da [[%(page)s|páxina do concurso]], deberías comprobar que " -"as achegas relacionadas recibiron o número correcto de puntos. Comproba " -"tamén se hai comentarios ou queixas na páxina de conversa. Se todo ten boa " -"pinta, [%(link)s fai clic aquí] (e garda) para sinalar que podo enviar os " -"premios tan axiña como sexa posible." - -#: ukbot/contest.py:680 -msgid "Thanks, ~~~~" -msgstr "Grazas, ~~~~" - -#: ukbot/contest.py:691 -#, python-format -msgid "Awards have been [%(link)s sent out]." -msgstr "[%(link)s Enviáronse] os premios." - -#: ukbot/contest.py:880 ukbot/ukbot.py:148 ukbot/ukbot.py:151 -msgid "UKBot encountered a problem" -msgstr "UKBot atopou un problema" - -#: ukbot/contest.py:930 -msgid "" -"This contest is closed – thanks to everyone who participated! Awards will be " -"sent out as soon as the contest organizer has checked the results." -msgstr "" -"Este concurso rematou – grazas a todas as persoas que participaron! Os " -"premios enviaranse tan axiña como o organizador do concurso comprobe os " -"resultados." - -#: ukbot/contest.py:932 -msgid "This contest is closed – thanks to everyone who participated!" -msgstr "Este concurso rematou – grazas a todas as persoas que participaron!" - -#: ukbot/contest.py:939 -#, python-format -msgid "" -"Last updated %(lastupdate)s. The contest is open from %(startdate)s to " -"%(enddate)s." -msgstr "" -"Última actualización %(lastupdate)s. O concurso está aberto dende " -"%(startdate)s até %(enddate)s." - -#: ukbot/contest.py:960 -#, python-format -msgid "UKBot encountered the following problems with the page [[%s]]" -msgstr "UKBot atopou os seguintes problemas coa páxina [[%s]]" - -#: ukbot/contest.py:994 -#, python-format -msgid "Results markers %(start_marker)s and %(end_marker)s not found" -msgstr "" -"Os marcadores de resultados %(start_marker)s e %(end_marker)s non se atoparon" - -#: ukbot/contest.py:1005 -#, python-format -msgid "No \"%(section_name)s\" section found." -msgstr "Non se atopou a sección \"%(section_name)s\"." - -#: ukbot/contest.py:1015 -msgid "Updating with final results, the contest is now closed." -msgstr "Actualizando cos resultados finais, o concurso rematou." - -#: ukbot/contest.py:1017 -msgid "Checking results and handing out awards" -msgstr "Comprobando os resultados e repartindo os premios" - -#: ukbot/contest.py:1019 -msgid "Updating" -msgstr "Actualizando" - -#: ukbot/contest.py:1149 -#, python-format -msgid "The weekly contest is: %(link)s" -msgstr "O concurso semanal é: %(link)s" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "suspended since" -msgstr "suspendido dende" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "%A, %H:%M" -msgstr "%A, %H:%M" - -#: ukbot/contributions.py:178 ukbot/user.py:679 -msgid "No qualifying contributions registered yet" -msgstr "Aínda non se rexistraron achegas cualificadas" - -#: ukbot/contributions.py:181 -#, python-format -msgid "%d article" -msgid_plural "%d articles" -msgstr[0] "%d artigo" -msgstr[1] "%d artigos" - -#: ukbot/contributions.py:187 -msgid "{{Kolonner}}" -msgstr "{{Columnas}}" - -#: ukbot/contributions.py:221 -msgid "%d.%m, %H:%M" -msgstr "%d.%m, %H:%M" - -#: ukbot/contributions.py:229 -msgid "capped at max" -msgstr "limitado ao máximo" - -#: ukbot/contributions.py:265 -msgid "Category hit" -msgstr "Coincidencia de categoría" - -#: ukbot/contributions.py:278 -#, fuzzy, python-format -msgid "Total: %(bytecount)d bytes, %(wordcount)d words" -msgstr "Total: {{formatnum:%(bytecount)d}} bytes, %(wordcount)d palabras" - -#: ukbot/contributions.py:293 -msgid "" -"Note: The contributions to this article are currently " -"disqualified." -msgstr "" -"Nota: As achegas a este artigo están descualificadas " -"actualmente." - -#: ukbot/contributions.py:302 -msgid "N" -msgstr "N" - -#: ukbot/contributions.py:305 -msgid "W" -msgstr "W" - -#: ukbot/filters.py:150 -msgid "Too few arguments given to this template." -msgstr "Este modelo ten moi poucos argumentos." - -#: ukbot/filters.py:198 -#, python-format -msgid "" -"Could not analyze page %(article)s because the revision %(rev)d could not be " -"parsed: %(error)s" -msgstr "" -"Non se puido analizar a páxina %(article)s porque a revisión %(rev)d non se " -"puido entender: %(error)s" - -#: ukbot/filters.py:233 -msgid "Could not parse the catignore page" -msgstr "Non se puido entender a páxina catignore" - -#: ukbot/filters.py:238 -msgid "No category values given!" -msgstr "Non se deron valores de categoría!" - -#: ukbot/filters.py:444 -msgid "Encountered an infinite category loop: " -msgstr "Atopouse un bucle de categorías infinito:" - -#: ukbot/filters.py:483 -msgid "No byte limit (second argument) given" -msgstr "Non se deu o límite de bytes (segundo argumento)" - -#: ukbot/filters.py:720 -#, python-format -msgid "No \"%s\" parameter given" -msgstr "Non se deu o parámetro \"%s\"" - -#: ukbot/revision.py:132 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because no words were found in the " -"parent revision (%(parentid)s) of size %(size)d, possibly due to unclosed " -"tags or templates in that revision." -msgstr "" -"Revisión [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: a " -"diferenza no número de palabras pode estar trabucada, porque non se atoparon " -"palabras na revisión (%(parentid)s) de medida %(size)d, posiblemente porque " -"que hai tags ou modelos mal pechados naquela revisión." - -#: ukbot/revision.py:142 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because the word count increase " -"(%(words)d) is larger than the byte increase (%(bytes)d). Wrong word counts " -"can occur for invalid wiki text." -msgstr "" -"Revisión [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: a " -"diferenza no número de palabras pode estar trabucada, porque o aumento " -"(%(words)d) no número de palabras é meirande ca o aumento de bytes " -"(%(bytes)d). Poden saír recontos incorrectos se o wikitexto non é válido." - -#: ukbot/sites.py:63 -#, python-format -msgid "Page does not exist: [[%(pagename)s]]" -msgstr "A páxina non existe: [[%(pagename)s]]" - -#: ukbot/sites.py:80 -#, python-format -msgid "Could not find a site matching the prefix \"%(key)s\"" -msgstr "Non se atopou un site que concorde co prefixo \"%(key)s\"" - -#: ukbot/ukbot.py:169 -#, python-format -msgid "#REDIRECT [[%s]]" -msgstr "#REDIRECT [[%s]]" - -#: ukbot/ukbot.py:171 -#, python-format -msgid "Redirecting to %s" -msgstr "Redirixindo a %s" - -#: ukbot/user.py:681 -msgid "articles" -msgstr "artigos" - -#: ukbot/user.py:683 -msgid "{{Kolonner}}\n" -msgstr "{{Columnas}}\n" - -#: ukbot/rules/byte.py:20 -#, python-format -msgid "%(bytes).f bytes" -msgstr "%(bytes).f bytes" - -#: ukbot/rules/contrib.py:16 -msgid "contribution" -msgstr "achega" - -#: ukbot/rules/external_link.py:30 -msgid "links" -msgstr "ligazóns" - -#: ukbot/rules/image.py:142 -msgid "images" -msgstr "imaxes" - -#: ukbot/rules/new.py:16 -msgid "new page" -msgstr "páxina nova" - -#: ukbot/rules/qualified.py:22 -msgid "qualified" -msgstr "cualificado" - -#: ukbot/rules/redirect.py:16 -msgid "redirect" -msgstr "redirección" - -#: ukbot/rules/ref.py:81 -msgid "references" -msgstr "referencias" - -#: ukbot/rules/ref.py:85 -msgid "reference pointers" -msgstr "punteiros de referencia" - -#: ukbot/rules/regexp.py:19 -msgid "regexp" -msgstr "expresión regular" - -#: ukbot/rules/regexp.py:44 -msgid "section" -msgstr "sección" - -#: ukbot/rules/rule.py:76 -#, python-format -msgid "bonus %(words)d words" -msgstr "%(words)d palabras extra" - -#: ukbot/rules/templateremoval.py:88 -#, python-format -msgid "removal of {{tl|%(template)s}}" -msgstr "borrado de {{tl|%(template)s}}" - -#: ukbot/rules/wikidata.py:47 -#, python-format -msgid "label (%(lang)s)" -msgstr "etiqueta (%(lang)s)" - -#: ukbot/rules/wikidata.py:53 -#, python-format -msgid "description (%(lang)s)" -msgstr "descrición (%(lang)s)" - -#: ukbot/rules/wikidata.py:59 -#, python-format -msgid "alias (%(lang)s)" -msgstr "alcume (%(lang)s)" - -#: ukbot/rules/wikidata.py:72 -#, python-format -msgid "%(property)s statement" -msgstr "declaración de %(property)s" - -#: ukbot/rules/wikidata.py:73 -#, python-format -msgid "%(count)d %(property)s statements" -msgstr "%(count)d declaracións de %(property)s" - -#: ukbot/rules/word.py:20 -#, python-format -msgid "%(words).f words" -msgstr "%(words).f palabras" diff --git a/locale/messages.pot b/locale/messages.pot deleted file mode 100644 index 250b26b..0000000 --- a/locale/messages.pot +++ /dev/null @@ -1,395 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-02 15:46+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" - -#: ukbot/contest.py:65 -#, python-format -msgid "The filter name \"%s\" was not understood" -msgstr "" - -#: ukbot/contest.py:155 -msgid "Couldn't find the list of participants!" -msgstr "" - -#: ukbot/contest.py:183 -#, python-format -msgid "" -"There are no point rules defined for this contest. Point rules are defined " -"by {{tl|%(template)s}}." -msgstr "" - -#: ukbot/contest.py:228 -#, python-format -msgid "Could not parse {{tlx|%(template)s|%(firstarg)s}} template: %(err)s" -msgstr "" - -#: ukbot/contest.py:258 -#, python-format -msgid "Unkown argument given to {{tl|%(template)s}}: %(argument)s" -msgstr "" - -#: ukbot/contest.py:289 -#, python-format -msgid "Couldn't parse the date given to the {{tl|%(template)s}} template." -msgstr "" - -#: ukbot/contest.py:322 -#, python-format -msgid "" -"Could not find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" - -#: ukbot/contest.py:335 ukbot/contest.py:375 -#, python-format -msgid "" -"Failed to parse the %(template)s template: Did not find a site matching the " -"site prefix %(prefix)s" -msgstr "" - -#: ukbot/contest.py:354 ukbot/contest.py:394 -#, python-format -msgid "" -"Couldn't find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "" - -#: ukbot/contest.py:529 -msgid "Day" -msgstr "" - -#: ukbot/contest.py:530 -msgid "Points" -msgstr "" - -#: ukbot/contest.py:533 ukbot/contest.py:748 ukbot/contest.py:935 -#: ukbot/contest.py:936 ukbot/contest.py:937 -msgid "%e. %B %Y, %H:%M" -msgstr "" - -#: ukbot/contest.py:534 -#, python-format -msgid "Updated %(date)s" -msgstr "" - -#: ukbot/contest.py:569 -#, python-format -msgid "Weekly contest for week %(week)d" -msgstr "" - -#: ukbot/contest.py:571 -#, python-format -msgid "Weekly contest for week %(startweek)d–%(endweek)d" -msgstr "" - -#: ukbot/contest.py:649 -msgid "Regards" -msgstr "" - -#: ukbot/contest.py:649 -msgid "and" -msgstr "" - -#: ukbot/contest.py:679 -#, python-format -msgid "" -"Now you must check if the results look ok. If there are error messages at " -"the bottom of the [[%(page)s|contest page]], you should check that the " -"related contributions have been awarded the correct number of points. Also " -"check if there are comments or complaints on the discussion page. If " -"everything looks fine, [%(link)s click here] (and save) to indicate that I " -"can send out the awards at first occasion." -msgstr "" - -#: ukbot/contest.py:680 -msgid "Thanks, ~~~~" -msgstr "" - -#: ukbot/contest.py:691 -#, python-format -msgid "Awards have been [%(link)s sent out]." -msgstr "" - -#: ukbot/contest.py:880 ukbot/ukbot.py:148 ukbot/ukbot.py:151 -msgid "UKBot encountered a problem" -msgstr "" - -#: ukbot/contest.py:930 -msgid "" -"This contest is closed – thanks to everyone who participated! Awards will be " -"sent out as soon as the contest organizer has checked the results." -msgstr "" - -#: ukbot/contest.py:932 -msgid "This contest is closed – thanks to everyone who participated!" -msgstr "" - -#: ukbot/contest.py:939 -#, python-format -msgid "" -"Last updated %(lastupdate)s. The contest is open from %(startdate)s to " -"%(enddate)s." -msgstr "" - -#: ukbot/contest.py:960 -#, python-format -msgid "UKBot encountered the following problems with the page [[%s]]" -msgstr "" - -#: ukbot/contest.py:994 -#, python-format -msgid "Results markers %(start_marker)s and %(end_marker)s not found" -msgstr "" - -#: ukbot/contest.py:1005 -#, python-format -msgid "No \"%(section_name)s\" section found." -msgstr "" - -#: ukbot/contest.py:1015 -msgid "Updating with final results, the contest is now closed." -msgstr "" - -#: ukbot/contest.py:1017 -msgid "Checking results and handing out awards" -msgstr "" - -#: ukbot/contest.py:1019 -msgid "Updating" -msgstr "" - -#: ukbot/contest.py:1149 -#, python-format -msgid "The weekly contest is: %(link)s" -msgstr "" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "suspended since" -msgstr "" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "%A, %H:%M" -msgstr "" - -#: ukbot/contributions.py:178 ukbot/user.py:679 -msgid "No qualifying contributions registered yet" -msgstr "" - -#: ukbot/contributions.py:181 -#, python-format -msgid "%d article" -msgid_plural "%d articles" -msgstr[0] "" -msgstr[1] "" - -#: ukbot/contributions.py:187 -msgid "{{Kolonner}}" -msgstr "" - -#: ukbot/contributions.py:221 -msgid "%d.%m, %H:%M" -msgstr "" - -#: ukbot/contributions.py:229 -msgid "capped at max" -msgstr "" - -#: ukbot/contributions.py:265 -msgid "Category hit" -msgstr "" - -#: ukbot/contributions.py:278 -#, python-format -msgid "Total: %(bytecount)d bytes, %(wordcount)d words" -msgstr "" - -#: ukbot/contributions.py:293 -msgid "" -"Note: The contributions to this article are currently " -"disqualified." -msgstr "" - -#: ukbot/contributions.py:302 -msgid "N" -msgstr "" - -#: ukbot/contributions.py:305 -msgid "W" -msgstr "" - -#: ukbot/filters.py:150 -msgid "Too few arguments given to this template." -msgstr "" - -#: ukbot/filters.py:198 -#, python-format -msgid "" -"Could not analyze page %(article)s because the revision %(rev)d could not be " -"parsed: %(error)s" -msgstr "" - -#: ukbot/filters.py:233 -msgid "Could not parse the catignore page" -msgstr "" - -#: ukbot/filters.py:238 -msgid "No category values given!" -msgstr "" - -#: ukbot/filters.py:444 -msgid "Encountered an infinite category loop: " -msgstr "" - -#: ukbot/filters.py:483 -msgid "No byte limit (second argument) given" -msgstr "" - -#: ukbot/filters.py:720 -#, python-format -msgid "No \"%s\" parameter given" -msgstr "" - -#: ukbot/revision.py:132 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because no words were found in the " -"parent revision (%(parentid)s) of size %(size)d, possibly due to unclosed " -"tags or templates in that revision." -msgstr "" - -#: ukbot/revision.py:142 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because the word count increase " -"(%(words)d) is larger than the byte increase (%(bytes)d). Wrong word counts " -"can occur for invalid wiki text." -msgstr "" - -#: ukbot/sites.py:63 -#, python-format -msgid "Page does not exist: [[%(pagename)s]]" -msgstr "" - -#: ukbot/sites.py:80 -#, python-format -msgid "Could not find a site matching the prefix \"%(key)s\"" -msgstr "" - -#: ukbot/ukbot.py:169 -#, python-format -msgid "#REDIRECT [[%s]]" -msgstr "" - -#: ukbot/ukbot.py:171 -#, python-format -msgid "Redirecting to %s" -msgstr "" - -#: ukbot/user.py:681 -msgid "articles" -msgstr "" - -#: ukbot/user.py:683 -msgid "{{Kolonner}}\n" -msgstr "" - -#: ukbot/rules/byte.py:20 -#, python-format -msgid "%(bytes).f bytes" -msgstr "" - -#: ukbot/rules/contrib.py:16 -msgid "contribution" -msgstr "" - -#: ukbot/rules/external_link.py:30 -msgid "links" -msgstr "" - -#: ukbot/rules/image.py:142 -msgid "images" -msgstr "" - -#: ukbot/rules/new.py:16 -msgid "new page" -msgstr "" - -#: ukbot/rules/qualified.py:22 -msgid "qualified" -msgstr "" - -#: ukbot/rules/redirect.py:16 -msgid "redirect" -msgstr "" - -#: ukbot/rules/ref.py:81 -msgid "references" -msgstr "" - -#: ukbot/rules/ref.py:85 -msgid "reference pointers" -msgstr "" - -#: ukbot/rules/regexp.py:19 -msgid "regexp" -msgstr "" - -#: ukbot/rules/regexp.py:44 -msgid "section" -msgstr "" - -#: ukbot/rules/rule.py:76 -#, python-format -msgid "bonus %(words)d words" -msgstr "" - -#: ukbot/rules/templateremoval.py:88 -#, python-format -msgid "removal of {{tl|%(template)s}}" -msgstr "" - -#: ukbot/rules/wikidata.py:47 -#, python-format -msgid "label (%(lang)s)" -msgstr "" - -#: ukbot/rules/wikidata.py:53 -#, python-format -msgid "description (%(lang)s)" -msgstr "" - -#: ukbot/rules/wikidata.py:59 -#, python-format -msgid "alias (%(lang)s)" -msgstr "" - -#: ukbot/rules/wikidata.py:72 -#, python-format -msgid "%(property)s statement" -msgstr "" - -#: ukbot/rules/wikidata.py:73 -#, python-format -msgid "%(count)d %(property)s statements" -msgstr "" - -#: ukbot/rules/word.py:20 -#, python-format -msgid "%(words).f words" -msgstr "" diff --git a/locale/nb_NO.po b/locale/nb_NO.po deleted file mode 100644 index a12e82a..0000000 --- a/locale/nb_NO.po +++ /dev/null @@ -1,482 +0,0 @@ -# Norwegian Bokmål translation for UKBot -# Copyright (C) 2013 -# This file is distributed under the same license as the UKBot package. -# -# Dan Michael Heggø , 2013. -# Jon Harald Søby , 2025. -msgid "" -msgstr "" -"Project-Id-Version: UKBot\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-02 15:46+0200\n" -"PO-Revision-Date: 2025-03-29 13:18+0100\n" -"Last-Translator: Jon Harald Søby \n" -"Language-Team: Norwegian Bokmal \n" -"Language: nb\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Lokalize 21.12.3\n" - -#: ukbot/contest.py:65 -#, python-format -msgid "The filter name \"%s\" was not understood" -msgstr "Filternavnet «%s» ble ikke forstått" - -#: ukbot/contest.py:155 -msgid "Couldn't find the list of participants!" -msgstr "Fant ikke deltakerlisten!" - -#: ukbot/contest.py:183 -#, python-format -msgid "" -"There are no point rules defined for this contest. Point rules are defined " -"by {{tl|%(template)s}}." -msgstr "" -"Denne konkurransen har ingen poengregler. Poengregler defineres med {{tl|" -"%(template)s}}." - -#: ukbot/contest.py:228 -#, fuzzy, python-format -msgid "Could not parse {{tlx|%(template)s|%(firstarg)s}} template: %(err)s" -msgstr "Klarte ikke å tolke {{tl|%(template)s}}-malen." - -#: ukbot/contest.py:258 -#, python-format -msgid "Unkown argument given to {{tl|%(template)s}}: %(argument)s" -msgstr "Ukjent argument gitt til {{ml|%(template)s}}: %(argument)s" - -#: ukbot/contest.py:289 -#, python-format -msgid "Couldn't parse the date given to the {{tl|%(template)s}} template." -msgstr "Klarte ikke å tolke datoen gitt til {{ml|%(template)s}}-malen." - -#: ukbot/contest.py:322 -#, python-format -msgid "" -"Could not find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "Fant ikke brukeren %(user)s gitt til {{ml|%(template)s}}-malen." - -#: ukbot/contest.py:335 ukbot/contest.py:375 -#, python-format -msgid "" -"Failed to parse the %(template)s template: Did not find a site matching the " -"site prefix %(prefix)s" -msgstr "" -"Kunne ikke tolke malen %(template)s: Fant ikke wiki som matcher prefikset " -"%(prefix)s" - -#: ukbot/contest.py:354 ukbot/contest.py:394 -#, python-format -msgid "" -"Couldn't find the user %(user)s given to the {{tl|%(template)s}} template." -msgstr "Fant ikke brukeren %(user)s gitt til {{ml|%(template)s}}-malen." - -#: ukbot/contest.py:529 -msgid "Day" -msgstr "Dag" - -#: ukbot/contest.py:530 -msgid "Points" -msgstr "Poeng" - -#: ukbot/contest.py:533 ukbot/contest.py:748 ukbot/contest.py:935 -#: ukbot/contest.py:936 ukbot/contest.py:937 -msgid "%e. %B %Y, %H:%M" -msgstr "%e. %B %Y, %H:%M" - -#: ukbot/contest.py:534 -#, python-format -msgid "Updated %(date)s" -msgstr "Oppdatert %(date)s" - -#: ukbot/contest.py:569 -#, python-format -msgid "Weekly contest for week %(week)d" -msgstr "Ukens konkurranse uke %(week)d" - -#: ukbot/contest.py:571 -#, python-format -msgid "Weekly contest for week %(startweek)d–%(endweek)d" -msgstr "Ukens konkurranse uke %(startweek)d–%(endweek)d" - -#: ukbot/contest.py:649 -msgid "Regards" -msgstr "Hilsen" - -#: ukbot/contest.py:649 -msgid "and" -msgstr "og" - -#: ukbot/contest.py:679 -#, python-format -msgid "" -"Now you must check if the results look ok. If there are error messages at " -"the bottom of the [[%(page)s|contest page]], you should check that the " -"related contributions have been awarded the correct number of points. Also " -"check if there are comments or complaints on the discussion page. If " -"everything looks fine, [%(link)s click here] (and save) to indicate that I " -"can send out the awards at first occasion." -msgstr "" -"Du må nå sjekke resultatene. Hvis det er feilmeldinger nederst på [[%(page)s|" -"konkurransesiden]] må du sjekke om de relaterte bidragene har fått poengene " -"de skal ha. Se også etter om det er kommentarer eller klager på " -"diskusjonssiden. Hvis alt ser greit ut kan du trykke [%(link)s her] (og " -"lagre), så sender jeg ut rosetter ved første anledning." - -#: ukbot/contest.py:680 -msgid "Thanks, ~~~~" -msgstr "Hilsen ~~~~" - -#: ukbot/contest.py:691 -#, python-format -msgid "Awards have been [%(link)s sent out]." -msgstr "Rosetter er nå [%(link)s sendt ut]." - -#: ukbot/contest.py:880 ukbot/ukbot.py:148 ukbot/ukbot.py:151 -msgid "UKBot encountered a problem" -msgstr "UKBot støtte på et problem" - -#: ukbot/contest.py:930 -msgid "" -"This contest is closed – thanks to everyone who participated! Awards will be " -"sent out as soon as the contest organizer has checked the results." -msgstr "" -"Konkurransen er avsluttet – takk til alle som deltok! Rosetter vil sendes ut " -"så snart konkurransearrangøren har sjekket resultatene." - -#: ukbot/contest.py:932 -msgid "This contest is closed – thanks to everyone who participated!" -msgstr "Denne konkurransen er avsluttet – takk til alle som deltok!" - -#: ukbot/contest.py:939 -#, python-format -msgid "" -"Last updated %(lastupdate)s. The contest is open from %(startdate)s to " -"%(enddate)s." -msgstr "" -"Sist oppdatert %(lastupdate)s. Konkurransen er åpen fra %(startdate)s til " -"%(enddate)s." - -#: ukbot/contest.py:960 -#, python-format -msgid "UKBot encountered the following problems with the page [[%s]]" -msgstr "UKBot støtte på problemer med siden [[:%s]]" - -#: ukbot/contest.py:994 -#, python-format -msgid "Results markers %(start_marker)s and %(end_marker)s not found" -msgstr "Resultatmarkørene %(start_marker)s og %(end_marker)s ble ikke funnet" - -#: ukbot/contest.py:1005 -#, python-format -msgid "No \"%(section_name)s\" section found." -msgstr "Ingen seksjon med navn «%(section_name)s» funnet." - -#: ukbot/contest.py:1015 -msgid "Updating with final results, the contest is now closed." -msgstr "" -"Oppdaterer med endelige resultater og merker konkurransen som avsluttet." - -#: ukbot/contest.py:1017 -msgid "Checking results and handing out awards" -msgstr "Sjekker resultater og deler ut rosetter" - -#: ukbot/contest.py:1019 -msgid "Updating" -msgstr "Oppdaterer" - -#: ukbot/contest.py:1149 -#, python-format -msgid "The weekly contest is: %(link)s" -msgstr "Ukens konkurranse er: %(link)s" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "suspended since" -msgstr "suspendert siden" - -#: ukbot/contributions.py:164 ukbot/user.py:674 -msgid "%A, %H:%M" -msgstr "%A klokka %H.%M" - -#: ukbot/contributions.py:178 ukbot/user.py:679 -msgid "No qualifying contributions registered yet" -msgstr "Ingen kvalifiserte bidrag har blitt registrert enda" - -#: ukbot/contributions.py:181 -#, fuzzy, python-format -msgid "%d article" -msgid_plural "%d articles" -msgstr[0] "" -"%(articlecount)d {{subst:PLURAL:%(articlecount)d|artikkel|artikler}}" -msgstr[1] "" -"%(articlecount)d {{subst:PLURAL:%(articlecount)d|artikkel|artikler}}" - -#: ukbot/contributions.py:187 -msgid "{{Kolonner}}" -msgstr "{{Kolonner}}" - -#: ukbot/contributions.py:221 -msgid "%d.%m, %H:%M" -msgstr "%e. %B %Y, %H:%M" - -#: ukbot/contributions.py:229 -msgid "capped at max" -msgstr "avgrenset til maks" - -#: ukbot/contributions.py:265 -msgid "Category hit" -msgstr "Kategoritreff" - -#: ukbot/contributions.py:278 -#, fuzzy, python-format -msgid "Total: %(bytecount)d bytes, %(wordcount)d words" -msgstr "" -"Totalt: {{formatnum:%(bytecount)d}} {{subst:PLURAL:%(bytecount)d|byte}}, " -"%(wordcount)d {{subst:PLURAL:%(wordcount)d|ord}}" - -#: ukbot/contributions.py:293 -msgid "" -"Note: The contributions to this article are currently " -"disqualified." -msgstr "" -"Merk: Bidragene til denne artikkelen er for tiden " -"diskvalifisert." - -#: ukbot/contributions.py:302 -msgid "N" -msgstr "N" - -#: ukbot/contributions.py:305 -#, fuzzy -msgid "W" -msgstr "N" - -#: ukbot/filters.py:150 -msgid "Too few arguments given to this template." -msgstr "For få argumenter sendt til denne malen." - -#: ukbot/filters.py:198 -#, python-format -msgid "" -"Could not analyze page %(article)s because the revision %(rev)d could not be " -"parsed: %(error)s" -msgstr "" -"Kunne ikke analysere siden %(article)s fordi sideversjon %(rev)d ikke kunne " -"tolkes: %(error)s" - -#: ukbot/filters.py:233 -msgid "Could not parse the catignore page" -msgstr "Klarte ikke å tolke catignore-siden" - -#: ukbot/filters.py:238 -msgid "No category values given!" -msgstr "Ingen kategoriverdier gitt!" - -#: ukbot/filters.py:444 -msgid "Encountered an infinite category loop: " -msgstr "Havnet i en endeløs kategoriløkke: " - -#: ukbot/filters.py:483 -msgid "No byte limit (second argument) given" -msgstr "Ingen bytegrense (argument nr. 2) gitt" - -#: ukbot/filters.py:720 -#, python-format -msgid "No \"%s\" parameter given" -msgstr "Ingen parameter med navn «%s» gitt" - -#: ukbot/revision.py:132 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because no words were found in the " -"parent revision (%(parentid)s) of size %(size)d, possibly due to unclosed " -"tags or templates in that revision." -msgstr "" -"Sideversjon [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: " -"Ingen ord ble funnet i foreldrerevisjonen (%(parentid)s) med størrelse " -"%(size)d. Dette kan skyldes uavsluttede tagger eller maler, som vil medføre " -"at ordtellingen blir feil, men det kan også skyldes lagring av et " -"arbeidsutkast." - -#: ukbot/revision.py:142 -#, python-format -msgid "" -"Revision [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: The " -"word count difference might be wrong, because the word count increase " -"(%(words)d) is larger than the byte increase (%(bytes)d). Wrong word counts " -"can occur for invalid wiki text." -msgstr "" -"Sideversjon [//%(host)s/w/index.php?diff=prev&oldid=%(revid)s %(revid)s]: " -"Økningen i antall ord (%(words)d) er større enn økningen i antall byte " -"(%(bytes)d). Det bør sjekkes om ordtellingen er riktig." - -#: ukbot/sites.py:63 -#, python-format -msgid "Page does not exist: [[%(pagename)s]]" -msgstr "Siden finnes ikke: [[%(pagename)s]]" - -#: ukbot/sites.py:80 -#, python-format -msgid "Could not find a site matching the prefix \"%(key)s\"" -msgstr "Kunne ikke finne en wiki som matcher prefikset «%(key)s»" - -#: ukbot/ukbot.py:169 -#, python-format -msgid "#REDIRECT [[%s]]" -msgstr "#OMDIRIGERING [[%s]]" - -#: ukbot/ukbot.py:171 -#, python-format -msgid "Redirecting to %s" -msgstr "Omdirigerer til %s" - -#: ukbot/user.py:681 -msgid "articles" -msgstr "%(articlecount)d {{subst:PLURAL:%(articlecount)d|artikkel|artikler}}" - -#: ukbot/user.py:683 -msgid "{{Kolonner}}\n" -msgstr "{{Kolonner}}\n" - -#: ukbot/rules/byte.py:20 -#, python-format -msgid "%(bytes).f bytes" -msgstr "%(bytes).f {{subst:PLURAL:%(bytes).f|byte}}" - -#: ukbot/rules/contrib.py:16 -msgid "contribution" -msgstr "bidrag" - -#: ukbot/rules/external_link.py:30 -msgid "links" -msgstr "%(links).f {{subst:PLURAL:%(links).f|lenke|lenker}}" - -#: ukbot/rules/image.py:142 -msgid "images" -msgstr "%(images).f {{subst:PLURAL:%(images).f|bilde|bilder}}" - -#: ukbot/rules/new.py:16 -msgid "new page" -msgstr "ny side" - -#: ukbot/rules/qualified.py:22 -msgid "qualified" -msgstr "kvalifisert" - -#: ukbot/rules/redirect.py:16 -msgid "redirect" -msgstr "omdirigering" - -#: ukbot/rules/ref.py:81 -msgid "references" -msgstr "{{subst:PLURAL:%(num)d|én kilde|%(num)d kilder}}" - -#: ukbot/rules/ref.py:85 -msgid "reference pointers" -msgstr "" -"{{subst:PLURAL:%(num)d|én henvisning til navngitt kilde|%(num)d henvisninger " -"til navngitte kilder}}" - -#: ukbot/rules/regexp.py:19 -msgid "regexp" -msgstr "regulært uttrykk" - -#: ukbot/rules/regexp.py:44 -msgid "section" -msgstr "seksjon" - -#: ukbot/rules/rule.py:76 -#, python-format -msgid "bonus %(words)d words" -msgstr "bonus %(words)d {{subst:PLURAL:%(words)d|ord}}" - -#: ukbot/rules/templateremoval.py:88 -#, python-format -msgid "removal of {{tl|%(template)s}}" -msgstr "fjerning av {{ml|%(template)s}}" - -#: ukbot/rules/wikidata.py:47 -#, python-format -msgid "label (%(lang)s)" -msgstr "etikett (%(lang)s)" - -#: ukbot/rules/wikidata.py:53 -#, python-format -msgid "description (%(lang)s)" -msgstr "beskrivelse (%(lang)s)" - -#: ukbot/rules/wikidata.py:59 -#, python-format -msgid "alias (%(lang)s)" -msgstr "alias (%(lang)s)" - -#: ukbot/rules/wikidata.py:72 -#, python-format -msgid "%(property)s statement" -msgstr "%(property)s-påstand" - -#: ukbot/rules/wikidata.py:73 -#, python-format -msgid "%(count)d %(property)s statements" -msgstr "%(count)d %(property)-{{subst:PLURAL:%(count)d|påstand|påstander}}" - -#: ukbot/rules/word.py:20 -#, python-format -msgid "%(words).f words" -msgstr "%(words).f {{subst:PLURAL:%(words).f|ord}}" - -#~ msgid "" -#~ "No template (second argument) given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "" -#~ "Ingen mal (andre argument) ble gitt til {{mlp|%(template)s|%(firstarg)s}}" - -#, fuzzy -#~| msgid "" -#~| "No template (second argument) given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgid "" -#~ "No byte limit (second argument) given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "" -#~ "Ingen mal (andre argument) ble gitt til {{mlp|%(template)s|%(firstarg)s}}" - -#~ msgid "No categories given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "Ingen kategorier gitt til {{mlp|%(template)s|%(firstarg)s}}" - -#, fuzzy -#~ msgid "" -#~ "No \"%(query)s\" parameter given to {{tlx|%(template)s|%(firstarg)s}}" -#~ msgstr "Ingen kategorier gitt til {{mlp|%(template)s|%(firstarg)s}}" - -#~ msgid "Unknown argument given to {{tl|%(template)s}}: %(argument)s" -#~ msgstr "Ukjent argument gitt til {{tl|%(template)s}}: %(argument)s" - -#~ msgid "This contest is missing a {{tl|%(template)s}} template." -#~ msgstr "Denne konkurransen mangler en {{tl|%(template)s}}-mal." - -#~ msgid "" -#~ "Did not find %(week)s+%(year)s or %(start)s+%(end)s in {{tl|" -#~ "%(templates)s}}." -#~ msgstr "" -#~ "Fant ikke %(week)s+%(year)s eller %(start)s+%(end)s i {{tl|" -#~ "%(templates)s}}." - -#~ msgid "" -#~ "Note that the contest this week is [[%(url)s|{{%(template)s|" -#~ "%(weekarg)s=%(week)s}}]]. Join in!" -#~ msgstr "" -#~ "Husk at denne ukens konkurranse er [[%(url)s|{{%(template)s|" -#~ "%(weekarg)s=%(week)s}}]]. Lykke til!" - -#~ msgid "max" -#~ msgstr "maks" - -#~ msgid "added reference section" -#~ msgstr "la til referanseavsnitt" - -#~ msgid "bonus %(bytes).f bytes" -#~ msgstr "bonus %(bytes).f {{subst:PLURAL:%(bytes).f|byte}}" - -#~ msgid "Found no \"%(section)s\" sections in the page \"%(page)s\"" -#~ msgstr "Fant ingen \"%(section)s\"-seksjoner på siden \"%(page)s\"" From 3fd0dea2dd8bb5c4efab6f9f60a7d02035e2fe78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Harald=20S=C3=B8by?= Date: Wed, 9 Apr 2025 14:59:28 +0200 Subject: [PATCH 13/23] Fix .gitignore --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index d5058bd..86a8d86 100644 --- a/.gitignore +++ b/.gitignore @@ -20,9 +20,6 @@ pip-log.txt .coverage .tox -#Translations -cache/* - #Other wp_private.py *.swp From a4f80448e12ec155f28ea44023ff94d1d6cf87b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Harald=20S=C3=B8by?= Date: Thu, 10 Apr 2025 15:00:38 +0200 Subject: [PATCH 14/23] Fixes from code review Clarify message and fix typo discovered by Copilot, change bot's contact email in user agent per @DiFronzo. --- ukbot/contest.py | 2 +- ukbot/revision.py | 2 +- ukbot/site.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ukbot/contest.py b/ukbot/contest.py index b036e11..da289f4 100644 --- a/ukbot/contest.py +++ b/ukbot/contest.py @@ -661,7 +661,7 @@ def deliver_receipt_to_leaders(self): mld = '\n:' + i18n('bot-awards-sent', link ) for u in self.ledere: page = self.sites.homesite.pages['%s:%s' % (usertalkprefix, u)] - logger.info('Sending %s a deliver_receipt_to_leaders', page.name) + logger.info('Sending leader delivery receipt to %s', page.name) # Find section number txt = page.text() diff --git a/ukbot/revision.py b/ukbot/revision.py index 4b23eaf..43b4342 100644 --- a/ukbot/revision.py +++ b/ukbot/revision.py @@ -134,7 +134,7 @@ def words(self): self.errors.append(w) elif self._wordcount > 10 and self._wordcount > self.bytes: - w = i18n('bot-word-count-incorrect', '[//%s/w/index.php?diff=prev&oldid=%s %s]' % (self.article().sit().host, self.revid, self.revid), self._wordcount, self.bytes) + w = i18n('bot-word-count-incorrect', '[//%s/w/index.php?diff=prev&oldid=%s %s]' % (self.article().site().host, self.revid, self.revid), self._wordcount, self.bytes) logger.warning(w) self.errors.append(w) diff --git a/ukbot/site.py b/ukbot/site.py index 1b2e2ea..037d93e 100644 --- a/ukbot/site.py +++ b/ukbot/site.py @@ -27,7 +27,7 @@ def __init__(self, host, prefixes, **kwargs): access_token = os.getenv('MW_ACCESS_TOKEN') access_secret = os.getenv('MW_ACCESS_SECRET') session.auth = OAuth1(consumer_token, consumer_secret, access_token, access_secret) - session.headers['User-Agent'] = 'UKBot (https://ukbot.toolforge.org/; danmichaelo+wikipedia@gmail.com)' + session.headers['User-Agent'] = 'UKBot (https://ukbot.toolforge.org/; ukbot@wikimedia.no)' self.errors = [] self.name = host From b3cd0de278fad297d9ab12a3ee0d7012a589d0f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Harald=20S=C3=B8by?= Date: Thu, 10 Apr 2025 15:00:38 +0200 Subject: [PATCH 15/23] Fixes from code review Clarify message and fix typo discovered by Copilot, change bot's contact email in user agent per @DiFronzo. --- ukbot/site.py | 6 ----- ukbot/sites.py | 10 ++------ ukbot/user.py | 63 +++++++++++++++++++++++++------------------------- ukbot/util.py | 15 ++++++++---- 4 files changed, 43 insertions(+), 51 deletions(-) diff --git a/ukbot/site.py b/ukbot/site.py index 037d93e..c6ed224 100644 --- a/ukbot/site.py +++ b/ukbot/site.py @@ -60,12 +60,6 @@ def __str__(self): def __hash__(self): return hash(self.__repr__()) - def get_revertpage_regexp(self): - msg = self.pages['MediaWiki:Revertpage'].text() - msg = re.sub(r'\[\[[^\]]+\]\]', '.*?', msg) - msg = re.sub(r'(?i)\{\{PLURAL:\$\d\|(.+)\}\}', '(\1)', msg) - return msg - def match_prefix(self, prefix): return prefix in self.prefixes or prefix == self.key diff --git a/ukbot/sites.py b/ukbot/sites.py index 2002a83..2e7c297 100644 --- a/ukbot/sites.py +++ b/ukbot/sites.py @@ -83,8 +83,8 @@ def only(self, sites): def init_sites(config): - if 'ignore' not in config: - config['ignore'] = [] + if 'ignoreTags' not in config: + config['ignoreTags'] = [] # Configure home site (where the contests live) host = config['homesite'] @@ -106,10 +106,4 @@ def init_sites(config): prefixes = [k for k, v in iwmap.items() if v == host] sites[host] = Site(host, prefixes=prefixes) - for site in sites.values(): - msg = site.get_revertpage_regexp() - if msg != '': - logger.debug('Revert page regexp: %s', msg) - config['ignore'].append(msg) - return SiteManager(sites, homesite), sql diff --git a/ukbot/user.py b/ukbot/user.py index b3d4a74..e199110 100644 --- a/ukbot/user.py +++ b/ukbot/user.py @@ -86,6 +86,8 @@ def add_contribs_from_wiki(self, site, start, end, fulltext=False, **kwargs): args['namespace'] = kwargs['namespace'] logger.debug('Limiting to namespaces: %s', args['namespace']) + ignore_tags = set(self.contest().config['ignoreTags']) + logger.debug('Edit tags that should be ignored: %s', ', '.join(sorted(ignore_tags))) new_revisions = [] stored_revisions = set([rev.revid for rev in self.revisions.values() if rev.article().site() == site]) current_revisions = set() @@ -93,7 +95,7 @@ def add_contribs_from_wiki(self, site, start, end, fulltext=False, **kwargs): t1 = time.time() tnr = 0 n_articles = len(self.articles) - for c in site.usercontributions(self.name, ts_start, ts_end, 'newer', prop='ids|title|timestamp|comment', **args): + for c in site.usercontributions(self.name, ts_start, ts_end, 'newer', prop='ids|title|timestamp|comment|tags', **args): tnr += 1 dt1 = time.time() - t1 @@ -103,40 +105,37 @@ def add_contribs_from_wiki(self, site, start, end, fulltext=False, **kwargs): logger.info('Found %d new revisions from API so far (%.0f secs elapsed)', len(new_revisions), dt0) - if 'comment' in c: - article_comment = c['comment'] - - ignore = False - for pattern in self.contest().config['ignore']: - if re.search(pattern, article_comment): - ignore = True - logger.info('Ignoring revision %d of %s:%s because it matched /%s/', c['revid'], site_key, c['title'], pattern) - break - - if not ignore: - rev_id = c['revid'] - article_title = c['title'] - article_key = site_key + ':' + article_title - current_revisions.add(rev_id) - - if rev_id in self.revisions: - # We check self.revisions instead of article.revisions, because the revision may - # already belong to "another article" (another title) if the article has been moved - - if self.revisions[rev_id].article().name != article_title: - rev = self.revisions[rev_id] - logger.info('Moving revision %d from "%s" to "%s"', rev_id, rev.article().name, article_title) - article = self.add_article_if_necessary(site, article_title, c['ns']) - rev.article().revisions.pop(rev_id) # remove from old article - article.revisions[rev_id] = rev # add to new article - rev.article = weakref.ref(article) # and update reference + ignored_tags_present = set(c['tags']) & ignore_tags - else: + logger.debug('Revision %d has the following tags: %s', c['revid'], ', '.join(sorted(c['tags']))) + if ignored_tags_present: + logger.info('Ignoring revision %d of %s:%s because it has the following edit tags: %s', c['revid'], site_key, c['title'], ', '.join(ignored_tags_present)) + break + else: + rev_id = c['revid'] + article_title = c['title'] + article_key = site_key + ':' + article_title + current_revisions.add(rev_id) + + if rev_id in self.revisions: + # We check self.revisions instead of article.revisions, because the revision may + # already belong to "another article" (another title) if the article has been moved + + if self.revisions[rev_id].article().name != article_title: + rev = self.revisions[rev_id] + logger.info('Moving revision %d from "%s" to "%s"', rev_id, rev.article().name, article_title) article = self.add_article_if_necessary(site, article_title, c['ns']) - rev = article.add_revision(rev_id, timestamp=time.mktime(c['timestamp']), username=self.name) - rev.saved = False # New revision that should be stored in DB - new_revisions.append(rev) + rev.article().revisions.pop(rev_id) # remove from old article + article.revisions[rev_id] = rev # add to new article + rev.article = weakref.ref(article) # and update reference + + else: + + article = self.add_article_if_necessary(site, article_title, c['ns']) + rev = article.add_revision(rev_id, timestamp=time.mktime(c['timestamp']), username=self.name) + rev.saved = False # New revision that should be stored in DB + new_revisions.append(rev) # Check if revisions have been deleted logger.info('Site: %s, stored revisions: %d, current revisions: %d', site.key, len(stored_revisions), len(current_revisions)) diff --git a/ukbot/util.py b/ukbot/util.py index 507773d..8c5db06 100644 --- a/ukbot/util.py +++ b/ukbot/util.py @@ -68,20 +68,25 @@ def merge(base, current): def load_config(fp): folder = os.path.split(fp.name)[0] + logger.info('Loading config %s', fp.name) + + config = {} + base_config = {} main_config = yaml.safe_load(fp) if '_extends' in main_config: filename = os.path.join(folder, main_config['_extends']) with open(filename, encoding='utf-8') as fp2: - base_config = yaml.safe_load(fp2) - else: - base_config = {} + base_config = load_config(fp2) config = merge(base_config, main_config) - config['wiki_timezone'] = pytz.timezone(config['wiki_timezone']) - config['server_timezone'] = pytz.timezone(config['server_timezone']) + if isinstance(config.get('wiki_timezone'), str): + config['wiki_timezone'] = pytz.timezone(config['wiki_timezone']) + if isinstance(config.get('server_timezone'), str): + config['server_timezone'] = pytz.timezone(config['server_timezone']) + logger.debug('Config: %s', config) return config From 2204cf905acf06622db64271c338a73b1e865ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Harald=20S=C3=B8by?= Date: Mon, 21 Jul 2025 17:05:03 +0200 Subject: [PATCH 16/23] Exchange setup.py for pyproject.toml (#64) Exchange setup.py for the more modern approach, pyproject.toml, update requirements.txt based on current requirements, and add bot version to ukbot.py output. This fixes #59. --- pyproject.toml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 25 +++++++++++++++++++++---- ukbot/ukbot.py | 5 ++++- 3 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..12d31a6 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,47 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "ukbot" +version = "1.1.0" +description = "Wikipedia writing contest bot" +authors = [ + { name = "Dan Michael O. Heggø", email = "danmichaelo@gmail.com" }, + { name = "Jon Harald Søby", email = "jhsoby@wikimedia.no" } +] +license = { text = "MIT" } +readme = "README.md" +requires-python = ">=3.7" +keywords = ["wikipedia"] +dependencies = [ + "Flask", + "isoweek", + "jsonpath-rw", + "lxml", + "matplotlib", + "more-itertools", + "mwclient", + "mwtemplates", + "mwtextextractor", + "numpy", + "psutil", + "pydash", + "PyMySQL", + "python-dotenv", + "pytz", + "PyYAML", + "requests", + "requests-oauthlib", +] + +classifiers = [ + "Programming Language :: Python", + "Programming Language :: Python :: 3.9" +] + +[project.scripts] +ukbot = "ukbot.ukbot:main" + +[tool.setuptools.packages.find] +where = ["."] diff --git a/requirements.txt b/requirements.txt index bc1f3b9..f855f71 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,22 @@ -. -pytest -responses +Faker +Flask +isoweek +jsonpath_rw +lxml +matplotlib mock -faker +more_itertools +mwclient +mwtemplates +mwtextextractor +numpy +psutil +pydash +PyMySQL +python-dotenv +pytz +PyYAML +Requests +requests_oauthlib +setuptools +uwsgi diff --git a/ukbot/ukbot.py b/ukbot/ukbot.py index 0e74239..14f2014 100644 --- a/ukbot/ukbot.py +++ b/ukbot/ukbot.py @@ -17,6 +17,7 @@ from mwtemplates import TemplateEditor import platform from dotenv import load_dotenv +from importlib.metadata import version from .common import get_mem_usage, STATE_NORMAL, InvalidContestPage, Localization, i18n, fetch_parsed_i18n from .util import load_config @@ -26,6 +27,7 @@ matplotlib.use('svg') +__version__ = version('ukbot') class AppFilter(logging.Filter): @@ -119,8 +121,9 @@ def main(): mainstart.strftime('%F %T'), mainstart.astimezone(config['wiki_timezone']).strftime('%F %T')) logger.info( - 'Platform: Python %s, Mwclient %s, %s', + 'Platform: Python %s, UKBot %s, Mwclient %s, %s', platform.python_version(), + __version__, mwclient.__version__, platform.platform() ) From 9d583f956a78d71be78a7f578cb14cdc39094ffa Mon Sep 17 00:00:00 2001 From: Juan Ceballos Date: Fri, 30 May 2025 04:28:34 -0600 Subject: [PATCH 17/23] feature:Unit Tests for Site.py --- test/test_site.py | 118 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 test/test_site.py diff --git a/test/test_site.py b/test/test_site.py new file mode 100644 index 0000000..40f7b96 --- /dev/null +++ b/test/test_site.py @@ -0,0 +1,118 @@ +import os +import unittest +from unittest import TestCase +from unittest.mock import patch, MagicMock +from ukbot.site import Site, WildcardPage + +class TestSiteClass(TestCase): + def mock_metadata(self, mock_api: MagicMock) -> None: + # Mocks the API response for site metadata (magicwords, namespaces, interwikimap, etc.) + mock_api.return_value = { + 'query': { + 'magicwords': [{'name': 'redirect', 'aliases': ['REDIRECT', '#REDIRECT']}], + 'namespaces': {'6': {'*': 'File', 'canonical': 'File'}}, + 'namespacealiases': [{'id': 6, '*': 'F'}], + 'interwikimap': [ + {'prefix': 'en', 'url': 'https://en.wikipedia.org/wiki/$1'}, + {'prefix': 'de', 'url': 'https://de.wikipedia.org/wiki/$1'}, + {'prefix': None, 'url': 'https://none.wikimedia.org/wiki/$1'}, + {'prefix': 'UPPERcase', 'url': 'https://uppercase.wikimedia.org/wiki/$1'}, + {'prefix': ' en ', 'url': 'https://whitespace.wikimedia.org/wiki/$1'}, + {'prefix': '', 'url': 'https://en.wikipedia.org/wiki/$1'} + ] + } + } + + @patch.dict(os.environ, { + 'MW_CONSUMER_TOKEN': 'dummy_consumer', + 'MW_CONSUMER_SECRET': 'dummy_secret', + 'MW_ACCESS_TOKEN': 'dummy_access', + 'MW_ACCESS_SECRET': 'dummy_secret' + }) + + @patch('ukbot.site.mwclient.Site.__init__', return_value=None) + @patch('ukbot.site.mwclient.Site.api') + def test_prefix_handling(self, mock_api, mock_super_init): + # Tests that Site initializes correctly with various prefix formats and that + # all provided prefixes are present in the interwikimap. + self.mock_metadata(mock_api) + cases = [ + ('en.wikipedia.org', ['en']), + ('de.wikipedia.org', ['en', '', 'UPPERcase', ' en ', 'de']), + ('none.wikimedia.org', [None]), + ('uppercase.wikimedia.org', ['UPPERcase']), + ('whitespace.wikimedia.org', [' en ']), + ] + + for host, prefixes in cases: + with self.subTest(case='normal', host=host): + site = Site(host=host, prefixes=prefixes) + self.assertEqual(site.name, host) + self.assertEqual(site.prefixes, prefixes) + for prefix in prefixes: + self.assertIn(prefix, site.interwikimap) + + @patch.dict(os.environ, { + 'MW_CONSUMER_TOKEN': 'dummy_consumer', + 'MW_CONSUMER_SECRET': 'dummy_secret', + 'MW_ACCESS_TOKEN': 'dummy_access', + 'MW_ACCESS_SECRET': 'dummy_secret' + }) + + @patch('ukbot.site.mwclient.Site.__init__', return_value=None) + @patch('ukbot.site.mwclient.Site.api') + def test_prefix_handling_with_unknown_prefixes(self, mock_api, mock_super_init): + # Tests that Site does not crash when prefixes are not present in the interwikimap. + self.mock_metadata(mock_api) + unknown_prefixes = ['zz', 'not_in_map', 42] + site = Site(host='en.wikipedia.org', prefixes=unknown_prefixes) + self.assertEqual(site.name, 'en.wikipedia.org') + self.assertEqual(site.prefixes, unknown_prefixes) + for prefix in unknown_prefixes: + self.assertNotIn(prefix, site.interwikimap) + + + def test_match_prefix(self): + # Tests that match_prefix returns True for valid prefixes and False otherwise. + site = Site.__new__(Site) + site.key = 'en' + site.prefixes = ['en', 'enwiki'] + self.assertTrue(site.match_prefix('en')) + self.assertTrue(site.match_prefix('enwiki')) + self.assertFalse(site.match_prefix('fr')) + + def test_link_to_with_blank_prefix(self): + # Tests link_to returns the correct format when the prefix is blank. + site = Site.__new__(Site) + site.prefixes = [''] + mock_page = MagicMock() + mock_page.name = 'ExamplePage' + self.assertEqual(site.link_to(mock_page), ':ExamplePage') + + def test_link_to_with_prefix(self): + # Tests link_to returns the correct format when a prefix is present. + site = Site.__new__(Site) + site.prefixes = ['en'] + mock_page = MagicMock() + mock_page.name = 'ExamplePage' + self.assertEqual(site.link_to(mock_page), ':en:ExamplePage') + + def test_repr_str_hash(self): + # Tests __repr__, __str__, and __hash__ methods for correct output. + site = Site.__new__(Site) + site.host = 'en.wikipedia.org' + self.assertEqual(str(site), 'Site(en.wikipedia.org)') + self.assertEqual(repr(site), 'Site(en.wikipedia.org)') + self.assertEqual(hash(site), hash('Site(en.wikipedia.org)')) + + +class TestWildcardPage(unittest.TestCase): + def test_wildcard_page_init(self): + # Tests that WildcardPage initializes with the correct site. + site = MagicMock() + wp = WildcardPage(site) + self.assertEqual(wp.site, site) + + +if __name__ == '__main__': + unittest.main() From 6f94b56857fa48edc39465c527e628d30efdb886 Mon Sep 17 00:00:00 2001 From: Andreas Lien <30557582+DiFronzo@users.noreply.github.com> Date: Sun, 8 Jun 2025 22:02:25 +0200 Subject: [PATCH 18/23] feature:Unit Tests for Site.py (#85) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It confirms that standard prefixes like 'en' and 'de' are properly registered, while also validating the behavior with edge cases such as an empty string (''), None, capitalized forms like 'UPPERcase', and prefixes with leading/trailing whitespace like ' en '. The tests also verify that the class remains working when unknown or invalid prefixes (like 'zz', 'not_in_map', or the integer 42) are passed and they are not added to the interwikimap. - [x] 🍕 Feature - [x] ✅ Test Fixes #79 - [x] 👍 yes - [ ] 📜 README.md - [ ] 📖 own file under the docs folder - [x] 🙅 no documentation needed From 1421b8b3f69dea625fe40f784f79680d637d9881 Mon Sep 17 00:00:00 2001 From: Andreas Lien <30557582+DiFronzo@users.noreply.github.com> Date: Tue, 22 Apr 2025 11:35:45 +0200 Subject: [PATCH 19/23] docs: Add issue templates, contributing guidelines, and code of conduct (#56) First draft to issue templates, contributing guidelines, and code of conduct. --- .github/ISSUE_TEMPLATE/bug_report.md | 27 +++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++ .github/PULL_REQUEST_TEMPLATE.md | 44 ++++++++ CODE_OF_CONDUCT.md | 127 ++++++++++++++++++++++ CONTRIBUTING.md | 24 ++++ ISSUES.md | 17 +++ README.md | 8 +- docs/Code_Contributions_Guidelines.md | 18 +++ 8 files changed, 283 insertions(+), 2 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 ISSUES.md create mode 100644 docs/Code_Contributions_Guidelines.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..e5091c5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,27 @@ +--- +name: 🐛 Bug report +about: Create a report to help us improve +title: "[BUG] Untitled Bug Issue" +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**Steps to replicate the issue** (include links if applicable): +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See an error + +**What happens?**: +Describe what happens when you follow the steps above. + +**What should have happened instead?** +A clear and concise description of what you expected to happen. + +**Additional context** +Add any other context about the problem here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..b5c925c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: 🛠 Feature request +about: Suggest an idea for this project +title: "[FR] Untitled Feature Request Issue" +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe 1~3 use cases of the purposed feature** +A clear and concise description of one or more use cases. Ex. As a ..., I want to ... + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..44b0437 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,44 @@ +## Description + + + +## What type of PR is this? (check all applicable) + +- [ ] 🍕 Feature +- [ ] 🐛 Bug Fix +- [ ] 📝 Documentation Update +- [ ] 🎨 Style +- [ ] 🧑‍💻 Code Refactor +- [ ] 🔥 Performance Improvements +- [ ] ✅ Test +- [ ] 🤖 Build +- [ ] 🔁 CI +- [ ] 📦 Chore +- [ ] ⏩ Revert + +## Related Tickets & Documents + + + +## Tested? + +- [ ] 👍 yes +- [ ] 🙅 no, because they aren't needed +- [ ] 🙋 no, because I need help + +## Added to documentation? + +- [ ] 📜 README.md +- [ ] 📖 own file under the docs folder +- [ ] 🙅 no documentation needed + +## [optional] Are there any pre- or post-deployment tasks we need to perform? + + \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..576429f --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,127 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at... +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..0017290 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,24 @@ +# Contributing to UKBot + +Thank you for your interest in `UKBot` and for taking the time to contribute to this project. ``UKBot` software behind the weekly contest bot for Wikipedia, and there are many ways you can contribute. + +## Code of conduct + +Can be found [here](/CODE_OF_CONDUCT.md) + +## How can I contribute? + +There are many ways in which you can contribute to `UKBot`. + +### 🐛 Report a bug + +Report bug issues using the [Bug Report](https://github.com/WikimediaNorge/UKBot/issues/new?assignees=&labels=bug&template=bug_report.md&title=%5BBUG%5D+Untitled+Bug+Issue) template. +To help resolve your issue as quickly as possible, read the template and provide the requested information. + +### 🛠 File a feature request + +We welcome all feature requests, whether to add new functionality to `UKBot` or to offer an idea for modifying existing functionality. File your feature request using the [Feature Request](https://github.com/WikimediaNorge/UKBot/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=%5BFR%5D+Untitled+Feature+Request+Issue) template. + +### ⚙️ Close a Bug / Feature issue + +We welcome contributions that help make `UKBot` bug free & improve the experience of our users. You can also find issues tagged `bug` or `enhancement`. Check out our [Code Contribution Guide](docs/Code_Contributions_Guidelines.md) to begin. \ No newline at end of file diff --git a/ISSUES.md b/ISSUES.md new file mode 100644 index 0000000..0b63d02 --- /dev/null +++ b/ISSUES.md @@ -0,0 +1,17 @@ +# How to file an issue + +We encourage you to ask for help whenever you think it's needed! We are happy about every question we get because it allows us to better understand your needs, possible misunderstandings, and most importantly a way for you to help us improve `UKBot`. That being said, this document's main purpose is to provide guidelines on how you can report a bug or propose a feature request. + +## Filing issues + +Whether you are trying to report a bug or propose a feature request, [GitHub issues](https://github.com/WikimediaNorge/UKBot/issues) is for you! + +The `bug report` and `feature request` issue templates are ready for you! + +## The issue life-cycle + +1. User files an issue. +2. The `UKBot` member provides feedback as soon as possible. +3. A conversation or discussion between `UKBot` and the user. +4. A pull request related to the issue will close it. +5. Otherwise, we'll close the issue after seven days of no update. \ No newline at end of file diff --git a/README.md b/README.md index 339ec53..1bea66b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ -# ukbot +

UKBot

-Bot for updating results in writing contests at Wikipedia, deployed at [ukbot.wmflabs.org](https//ukbot.wmflabs.org). +

Bot for updating results in writing contests at Wikipedia, deployed at ukbot.toolforge.org.

+ +
+

Created by Dan Michael and maintained with ❤︎ by contributors

+
## Getting Started diff --git a/docs/Code_Contributions_Guidelines.md b/docs/Code_Contributions_Guidelines.md new file mode 100644 index 0000000..84faf4a --- /dev/null +++ b/docs/Code_Contributions_Guidelines.md @@ -0,0 +1,18 @@ +## Getting Started + +We use GitHub to host code, to track issues and feature requests, as well as accept pull requests. +Before raising a pull request, ensure you have raised a corresponding issue and discussed a possible solution with a maintainer. This gives your pull request the highest chance of getting merged quickly. + +## 🍴 Git Workflow + +We use [GitHub Flow](https://guides.github.com/introduction/flow/index.html), so all code changes happen through pull requests. + +1. Fork the repo and create a new branch from the `develop` branch. +2. Branches are named as `fix/fix-name` or `feature/feature-name` +3. Please test your changes. +4. Once you are confident in your code changes, create a pull request in your fork to the `develop` branch in the `WikimediaNorge/UKBot` base repository. +5. Link the issue of the base repository in your Pull request description. [Guide](https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) +6. When you raise a pull request, we automatically run tests on our CI. Please ensure that all the tests are passing for your code change. We will not be able to accept your change if the test suite doesn't pass. + +## 🏡 Setup for local development +- In progress \ No newline at end of file From 19fde7cb3c88e45c0752cf449653b430b792590e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Harald=20S=C3=B8by?= Date: Tue, 22 Apr 2025 11:38:02 +0200 Subject: [PATCH 20/23] Exchange setup.py for pyproject.toml (#64) Exchange setup.py for the more modern approach, pyproject.toml, update requirements.txt based on current requirements, and add bot version to ukbot.py output. This fixes #59. --- setup.py | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 setup.py diff --git a/setup.py b/setup.py deleted file mode 100644 index 0f9466a..0000000 --- a/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env python -# encoding=utf-8 -from setuptools import setup, find_packages -import os, sys - -setup(name='ukbot', - version='1.1.0', - description='Wikipedia writing contest bot', - keywords='wikipedia', - author='Dan Michael O. Heggø', - author_email='danmichaelo@gmail.com', - url='https://github.com/wikimedianorge/ukbot', - license='MIT', - packages=find_packages(), - include_package_data=True, - entry_points={ - 'console_scripts': [ - 'ukbot = ukbot.ukbot:main', - ], - }, - classifiers=[ - 'Programming Language :: Python', - 'Programming Language :: Python :: 3.9', - ], - install_requires=[ - 'Jinja2', - 'Werkzeug', - 'pytz', - 'isoweek', - 'pyyaml', - 'jsonpath-rw', - 'lxml', - 'beautifulsoup4', - 'numpy', - 'matplotlib', - 'mwclient', - 'mwtemplates', - 'mwtextextractor', - 'rollbar', - 'flipflop', - 'flask', - 'requests', - 'pymysql', - 'psutil', - 'python-dotenv', - 'pydash', - 'retry', - 'more-itertools', - ]) From 44847f099617ff5731f4ce064ed1f0c86b20e05a Mon Sep 17 00:00:00 2001 From: zache-fi Date: Fri, 1 Aug 2025 17:58:57 +0300 Subject: [PATCH 21/23] =?UTF-8?q?Returned=20Elokuun=20kuvitustalkoot=20con?= =?UTF-8?q?fig=20back=20to=20"fi-ek"=20from=20"fi-ek202=E2=80=A6=20(#88)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …3" in jobs.yaml ## Description There was a custom Elokuun kuvitustalkoot config in 2023, probably because of incorrect competition settings, and it was worked around by using a different competition ID. However, since it only worked in 2023, I have now reverted the jobs.yaml back to the multiyear config. NOTE: This is also updated now directly to production as the competition is already started. --- jobs.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jobs.yaml b/jobs.yaml index adc4bf5..e564d08 100644 --- a/jobs.yaml +++ b/jobs.yaml @@ -73,18 +73,18 @@ schedule: "45 22 * * *" emails: onfailure # fi-ek -- name: fi-ek2023 - command: ./jobs/run.sh fi-ek2023 +- name: fi-ek + command: ./jobs/run.sh fi-ek image: python3.11 schedule: "29 * * * *" emails: onfailure mem: 2Gi -- name: upload-plot-fi-ek2023 - command: ./jobs/upload.sh fi-ek2023 +- name: upload-plot-fi-ek + command: ./jobs/upload.sh fi-ek image: python3.11 schedule: "50 22 * * *" emails: onfailure -# fi-ek +# fi-wsc - name: fi-wsc command: ./jobs/run.sh fi-wsc image: python3.11 From a284241df03faf9947b11e124e0d5e0d7b3610da Mon Sep 17 00:00:00 2001 From: zache-fi Date: Wed, 17 Sep 2025 20:06:54 +0300 Subject: [PATCH 22/23] add webp and xcf suffix to rules/image.py regexp (#89) Note: I did the change already directly to production to test it so it needs to be reverted from ukbot/rules/image.py before pulling it. --- ukbot/rules/image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ukbot/rules/image.py b/ukbot/rules/image.py index f2cfe31..9307ba3 100644 --- a/ukbot/rules/image.py +++ b/ukbot/rules/image.py @@ -37,7 +37,7 @@ def __init__(self, sites, template, trans=None): # Compile regexps for match images prefixes = r'(?:%s)' % '|'.join(['%s:' % x for x in self.file_prefixes]) - suffixes = r'\.(?:svg|png|jpe?g|gif|tiff)' + suffixes = r'\.(?:svg|png|jpe?g|gif|tiff|webp|xcf)' imagematcher = r""" (?: (?:=|\||^)%(prefixes)s? # "=File:", "=", "|File:", "|", ... From 97705e0c5eca84f589de87fbd5e96fdda40388ca Mon Sep 17 00:00:00 2001 From: Andreas Lien <30557582+DiFronzo@users.noreply.github.com> Date: Fri, 21 Nov 2025 14:52:44 +0100 Subject: [PATCH 23/23] refactor: Enhance error handling in contest filters to log non-fatal warnings for missing categories and unrecognized wikis (#67) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR adds enhanced error handling in contest filters, logging non-fatal warnings for missing categories and unrecognized wikis. It has been tested, but there may still be edge cases I haven’t considered. It will show in console like this: ![Screenshot 2025-05-25 at 16 36 47](https://github.com/user-attachments/assets/4f5310d5-3b61-4b74-a692-428b0e7babfa) On wiki[[1](https://no.wikipedia.org/w/index.php?title=Bruker:Premeditated/Sandkasse5&oldid=25156842)]: ![Screenshot 2025-05-25 at 16 38 26](https://github.com/user-attachments/assets/d31482eb-8ce0-464b-a4e2-f919ed04d93d) - [ ] 🍕 Feature - [X] 🐛 Bug Fix - [ ] 📝 Documentation Update - [ ] 🎨 Style - [x] 🧑‍💻 Code Refactor - [ ] 🔥 Performance Improvements - [ ] ✅ Test - [ ] 🤖 Build - [ ] 🔁 CI - [ ] 📦 Chore - [ ] ⏩ Revert Fixes #62 - [X] 👍 yes - [ ] 🙅 no, because they aren't needed - [ ] 🙋 no, because I need help - [ ] 📜 README.md - [ ] 📖 own file under the docs folder - [X] 🙅 no documentation needed perform? No --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- ukbot/contest.py | 33 +++++++++++++++++++++++++-------- ukbot/filters.py | 42 ++++++++++++++++++++++++++++-------------- 2 files changed, 53 insertions(+), 22 deletions(-) diff --git a/ukbot/contest.py b/ukbot/contest.py index da289f4..9997791 100644 --- a/ukbot/contest.py +++ b/ukbot/contest.py @@ -216,14 +216,31 @@ def extract_rules(self, txt, catignore_page=''): try: filter_inst = filter_tpl.make(self) except RuntimeError as exp: - raise InvalidContestPage( - i18n( - 'bot-no-parse', - '{{subst:ns:10}}:' + filter_template_config['name'], - filter_tpl.anon_params[1], - str(exp) - ) - ) + # Only abort for truly fatal errors (like missing required arguments) + fatal_errors = [ + 'Too few arguments', + 'No category values given', + 'No byte limit', + 'No "%s" parameter given', + 'Could not parse the catignore page', + ] + msg = str(exp) + if any(fe in msg for fe in fatal_errors): + raise InvalidContestPage( + i18n( + 'bot-no-parse', + '{{subst:ns:10}}:' + filter_template_config['name'], + filter_tpl.anon_params[1], + msg + ) + ) + # Otherwise, treat as warning and continue + logger.warning('Non-fatal filter error: %s', msg) + try: + self.sites.homesite.errors.append(i18n('bot-warning', msg)) + except Exception as e: + logger.warning('Could not attach warning to homesite: %s', e) + continue nfilters += 1 if op == 'OR': diff --git a/ukbot/filters.py b/ukbot/filters.py index 833f5d4..49e78d7 100644 --- a/ukbot/filters.py +++ b/ukbot/filters.py @@ -179,24 +179,38 @@ def make(cls, tpl: 'FilterTemplate', **kwargs): if len(tpl.anon_params) < 3: raise RuntimeError(i18n('bot-no-category-values')) + # Build category list, catching missing categories as warnings + categories = [] + for cat_name in tpl.anon_params[2:]: + if cat_name.strip() == '': + continue + # Check for interwiki prefix + prefix = cat_name.split(':', 1)[0] if ':' in cat_name else None + # Use from_prefix to check if prefix is recognized + if prefix and tpl.sites.from_prefix(prefix) is None: + logger.warning('Site "%s" is not included in the contest configuration, so category "%s" was ignored.', prefix, cat_name) + try: + tpl.sites.homesite.errors.append(i18n('bot-warning-site-not-configured', prefix, cat_name)) + except Exception as ex: + logger.warning('Could not attach warning to homesite: %s', ex) + continue + try: + cat_page = tpl.sites.resolve_page(cat_name, 14, True) + categories.append(cat_page) + except InvalidContestPage as e: + logger.warning('Category does not exist: %s', cat_name) + try: + self_site = tpl.sites.homesite + self_site.errors.append(i18n('bot-warning-nonexistant-category', cat_name)) + except Exception as ex: + logger.warning('Could not attach warning to homesite: %s', ex) + # Do not abort, just skip this category + params = { 'sites': tpl.sites, 'ignore': cls.get_ignore_list(tpl, kwargs.get('cfg', {}).get('ignore_page')), - 'categories': [ - tpl.sites.resolve_page(cat_name, 14, True) - for cat_name in tpl.anon_params[2:] if cat_name.strip() != '' - ], + 'categories': categories, } - - if tpl.has_param('ignore'): - params['ignore'].extend([ - a.strip() - for a in tpl.get_param('ignore').split(',') - ]) - - if tpl.has_param('maxdepth'): - params['maxdepth'] = int(tpl.get_param('maxdepth')) - return cls(**params) def __init__(self, sites: 'SiteManager', categories: List[Union['Page', WildcardPage]], maxdepth: int = 5,