Re: [Pywikipedia-l] [Pywikipedia-svn] SVN: [9448] trunk/pywikipedia/pywikibot/i18n.py
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 First thanks Merlijn and xqt for you answers!! In order to get one step further I tried to follow Merlijn hints: If this is possible, the most reasonable solution to me would be this: 1) follow the guide to translating (http://lists.wikimedia.org/pipermail/pywikipedia-l/2011-January/006632.html) Ok. BUT I did the migration by hands (since it's the first one) as visible in [1] and when going further to create and upload a script to i18n folder I got stuck: - - I'm using the trunk not the rewrite; the guide uses rewrite and I cannot find the files in i18n directory in trunk, just the i18n.py in pywikibot but not the mentioned 'i18n.package'... - - I do not have commit access - - I wonder what does happen now with the translations on TW? Do they get synced into the i18n folder? ...or what's the idea? 2) use keys starting with 'thirdparty-drtrigon'; i.e. thirdparty-drtrigon- As mentioned I created a bunch of keys, this works which is good! - you may recycle translations in the i18n folder if it fits Yes - in fact I though about something like this too. ;) But could become very tricky... ;) - if your script is able to be distributed we could commit (with i18n extension) In my opinion it is (more or less) since I am using it... ;) But I do not know what are your demands on quality... I think you have to decide whether my code fits or not... I have also to admit that I cannot spend the same amount of time in support and developpment as desirable. - I am implementing translated bot owner messages wich (hopefull) coming soon. If so, you may check whether there are messages to re-use - finally we could implement bot-specific messages as part of the pwb framework and port them to translatewiki like other messages. We could handle with drtrigonbot.py, xqbot.py valhallasw-bot.py as well. Maybe they should get a thirdparty-suffix. Both sound intressing, can you may be elaborate some further details on this? [1] http://translatewiki.net/w/i.php?title=Special%3APrefixIndexprefix=Thirdparty-drtrigonbotnamespace=1238 Thanks a lot for your detailed explanations and Greetings Dr. Trigon -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5iSYAACgkQAXWvBxzBrDAtuACgkCDRc+Bs/Utv+0EdmPvqlV6y smcAoJU/PvBZHkrdAQ8Biu6mRhKlA97+ =MCWB -END PGP SIGNATURE- ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
[Pywikipedia-l] SVN access request
Hi, I would like to get an SVN access and some help to start. I need it mainly for inserting and maintaining TOCbot that is under preparation (it has worked in huwiki for several months and is now being internationalized). Information about TOCbot: http://hu.wikipedia.org/wiki/Szerkeszt%C5%91:Bin%C3%A1ris/TOCbot Description, user guide and bot owners' guide and a collection of examples is ready as well as an auxilary script, while the main script is not yet public. It will soon be published for test and may need much care in the first time. I would also like to take part in maintenance of replace.py for what I worked a lot already. At the moment I am interested only in trunk version. My SF page: http://sourceforge.net/users/binbot/ -- I don't know how to list all my contributions, here appears a part of them since May 22, but there are much more. I have also been active on mailing list in the past years. Please support and give me technical help to use the system. -- Bináris ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] SVN access request
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I hope you are also aware of my bot [1] which is at least somehow related to yours. My bot provides an extension to the standard watchlist in order to help users to stay up2date in all discussions they participate(d). May be you want to have a look... ;) May be we could also work together at some points...? But I have to admit that I do not have commit access and this is why may bot is placed in [2]... It is using the trunk only (also). Greetings DrTrigon [1] http://de.wikipedia.org/wiki/Benutzer:DrTrigonBot [2] https://fisheye.toolserver.org/changelog/drtrigon Am 03.09.2011 20:09, schrieb Bináris: Hi, I would like to get an SVN access and some help to start. I need it mainly for inserting and maintaining TOCbot that is under preparation (it has worked in huwiki for several months and is now being internationalized). Information about TOCbot: http://hu.wikipedia.org/wiki/Szerkeszt%C5%91:Bin%C3%A1ris/TOCbot Description, user guide and bot owners' guide and a collection of examples is ready as well as an auxilary script, while the main script is not yet public. It will soon be published for test and may need much care in the first time. I would also like to take part in maintenance of replace.py for what I worked a lot already. At the moment I am interested only in trunk version. My SF page: http://sourceforge.net/users/binbot/ -- I don't know how to list all my contributions, here appears a part of them since May 22, but there are much more. I have also been active on mailing list in the past years. Please support and give me technical help to use the system. -- Bináris ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5ijCkACgkQAXWvBxzBrDChIgCeLvofiWAW4PspmwWwaRspwhsk eQEAoIOJfWbTzEb22dNw/rttkzAaQbAJ =tNCT -END PGP SIGNATURE- ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] [Pywikipedia-svn] SVN: [9494] trunk/pywikipedia/wikipedia.py
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 If this is also an issue with section detection within pages you could (if you like) also consider to use the code given in 'getSections' [1]... [1] https://fisheye.toolserver.org/browse/drtrigon/pywikipedia/dtbext/dtbext_wikipedia.py?hb=true Greetings DrTrigon Am 03.09.2011 13:58, schrieb x...@svn.wikimedia.org: http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9494 Revision: 9494 Author: xqt Date: 2011-09-03 11:58:48 + (Sat, 03 Sep 2011) Log Message: --- reverrevert r3147 due to bug #2989218; check for italic code in headings.TODO: use a better regex to find it. Modified Paths: -- trunk/pywikipedia/wikipedia.py Modified: trunk/pywikipedia/wikipedia.py === - --- trunk/pywikipedia/wikipedia.py2011-09-03 11:17:47 UTC (rev 9493) +++ trunk/pywikipedia/wikipedia.py2011-09-03 11:58:48 UTC (rev 9494) @@ -66,7 +66,6 @@ within a non-wiki-markup section of text decodeEsperantoX: decode Esperanto text using the x convention. encodeEsperantoX: convert wikitext to the Esperanto x-encoding. - sectionencode: encode text for use as a section title in wiki-links. findmarker(text, startwith, append): return a string which is not part of text expandmarker(text, marker, separator): return marker string expanded @@ -654,7 +653,7 @@ self._contents = contents hn = self.section() if hn: -m = re.search(=+ *%s *=+ % hn, self._contents) +m = re.search(=+[ ']*%s[ ']*=+ % hn, self._contents) if verbose and not m: output(uWARNING: Section does not exist: %s % self.aslink(forceInterwiki = True)) # Store any exceptions for later reference @@ -779,8 +778,8 @@ else: raise IsRedirectPage(redirtarget) if self.section(): -# TODO: What the hell is this? Docu please. -m = re.search(\.3D\_*(\.27\.27+)?(\.5B\.5B)?\_*%s\_*(\.5B\.5B)?(\.27\.27+)?\_*\.3D % re.escape(self.section()), sectionencode(pageInfo['revisions'][0]['*'],self.site().encoding())) +m = re.search(=+[ ']*%s[ ']*=+ % re.escape(self.section()), + pageInfo['revisions'][0]['*']) if not m: try: self._getexception @@ -920,8 +919,8 @@ else: raise IsRedirectPage(redirtarget) if self.section(): -# TODO: What the hell is this? Docu please. -m = re.search(\.3D\_*(\.27\.27+)?(\.5B\.5B)?\_*%s\_*(\.5B\.5B)?(\.27\.27+)?\_*\.3D % re.escape(self.section()), sectionencode(text,self.site().encoding())) +m = re.search(=+[ ']*%s[ ']*=+ % re.escape(self.section()), + text) if not m: try: self._getexception @@ -4140,8 +4139,7 @@ page2._startTime = time.strftime('%Y%m%d%H%M%S', time.gmtime()) if section: -m = re.search(\.3D\_*(\.27\.27+)?(\.5B\.5B)?\_*%s\_*(\.5B\.5B)?(\.27\.27+)?\_*\.3D - - % re.escape(section), sectionencode(text,page2.site().encoding())) +m = re.search(=+[ ']*%s[ ']*=+ % re.escape(section), text) if not m: try: page2._getexception @@ -4302,7 +4300,7 @@ # Use the data loading time. page2._startTime = time.strftime('%Y%m%d%H%M%S', time.gmtime()) if section: - m = re.search(\.3D\_*(\.27\.27+)?(\.5B\.5B)?\_*%s\_*(\.5B\.5B)?(\.27\.27+)?\_*\.3D % re.escape(section), sectionencode(text,page2.site().encoding())) +m = re.search(=+[ ']*%s[ ']*=+ % re.escape(section), text) if not m: try: page2._getexception @@ -4531,10 +4529,6 @@ break return text -def sectionencode(text, encoding): -Encode text so that it can be used as a section title in wiki-links. -return urllib.quote(text.replace( ,_).encode(encoding)).replace(%,.) - Unicode library functions def UnicodeToAsciiHtml(s): ___ Pywikipedia-svn mailing list pywikipedia-...@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-svn -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5ijR8ACgkQAXWvBxzBrDBNNQCgve2/z/SUa3bUNd625ibUKG/G sEMAn2/LtRfr9kvdV1UX+aVKL9MQZwl8 =9anJ -END PGP SIGNATURE- ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l