Multilingual development (jira testing)
---------------------------------------
Key: PYWP-2
URL: https://jira.ts.wikimedia.org/browse/PYWP-2
Project: pywikipedia
Issue Type: New Feature
Components: Framework
Reporter: Merlijn van Deen
(copied from the original report at http://sourceforge.net/tracker/index.php?func=detail&aid=1768728&group_id=9… )
English speaking at end
==Francais== Texte d'origine
Bonjour
Je voudrais vous proposer un système qui permet de rendre le robot
multilingue. En effet, tous les messages envoyé à la console sont
anglophone. Or le but d'un robot est de s'adapter à la multitude des
languages pouvant exister de la part des utilisateurs. C'est pour cela que
je vous propose le système suivant :
Création d'un nouveau répertoire 'lang'. Dans ce répertoire s'y
trouverait des fichiers de type XX.py (XX étant le code ISO 639 de la
langue). Donc ce répertoire contiendra 1 ficher par code de langue
existant.
Lorsque les différents programmes veulent afficher un message sur la
console, la commande utilisé est très souvent 'wikipedia.output' ou
'wikipedia.input'. Le travail de cette commande serait d'appeller le
fichier xx.py avec le numéro du message à renvoyer en paramètre, le
choix du xx serait donnée par la variable mylang de user-config.py. le
fichier xx.py enverrais alors le message à afficher en tenant compte des
différentes variables de type %s (ou autre) bien entendu
Exemple :
dans user-config.py, j'ai "mylang = 'fr'"
Replace.py à la ligne 375 contient la commande "wikipedia.input(u'Please
enter the new text:')",
Le nouveau système coderait "wikipedia.input(u'Please enter the new
text:')" par "wikipedia.input.message(284)"
appelerait donc lang/fr.py et lui demanderais de lui retourner le message
n° 284 qui serait "s'il vous plais, entrez le nouveaux texte :" et le lui
retourne.
Voila, en esperant avoir compris ma demande.
Je vous remercie de votre écoute
==English== Text translates since French by a machine translation system
Hello
I would like to propose you a system which allows to return the
multilingual robot. Indeed, all the messages messenger in the console are
English-speaking. Now the purpose of a robot is to adapt itself to the
multitude of the languages which can exist on behalf of the users. It is
for it that I propose you the following system:
Creation of a new directory ' lang '. In this directory would be files of
type XX.py (XX there being the code ISO 639 of the language). Thus this
directory will contain 1 file by existing code of language.
When the various programs want to post a message on the console, the order
used is very often ' wikipedia.output ' or ' wikipedia.input '. The work of
this order would be to call the xx.py file with the number of the message
to be sent back in parameter, the choice of the xx would be given by the
mylang variable to user-config.py
The xx.py file would send then the message to be posted(shown) by taking
into account various variables of type %s (or other) naturally
Example:
In user-config.py, I have " mylang = ' fr ' "
Replace.py in the line 375 contains the command " wikipedia.input (u'
Please enter the new text: ') ",
The new system would code " wikipedia.input (u' Please enter the new text:
') "by" wikipedia.input.message (284) " call thus lang/fr.py and would ask
it to return it the message n° 284 which would be " s'il vous plais,
entrez le nouveaux texte : ".
Here we are, by hoping to have understood my demand.
I thank you for your listening
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.ts.wikimedia.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
Patches item #1814580, was opened at 2007-10-16 09:36
Message generated for change (Comment added) made by sf-robot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1814580&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: John Vandenberg (zeroj)
Assigned to: Nobody/Anonymous (nobody)
Summary: save page generator output
Initial Comment:
When calling pagegenerators.py directly from the command line, it is handy to save the output for post-processing or use as input into replace.py -file page generator. This patch provides a -output argument.
As this patch does not handle unicode page names, it needs improvement before it should be committed.
----------------------------------------------------------------------
>Comment By: SourceForge Robot (sf-robot)
Date: 2007-11-29 19:20
Message:
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
----------------------------------------------------------------------
Comment By: Daniel Herding (wikipedian)
Date: 2007-10-17 02:10
Message:
Logged In: YES
user_id=880694
Originator: NO
Is this really needed? I mean, you can do this:
daniel@localhost:~/projekte/pywikipedia> python pagegenerators.py
-ref:Wikipedia:Pywikipediabot > output.txt
Checked for running processes. 2 processes currently running, including
the current process.
Getting references to [[Wikipedia:Pywikipediabot]]
daniel@localhost:~/projekte/pywikipedia> cat output.txt
Benutzer:Head
Wikipedia:Selbstlinks
Benutzer:Zwobot
Benutzer Diskussion:Waugsberg/Archiv/2006-8
Wikipedia:Bots
[etc.]
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1814580&group_…
Bugs item #1809991, was opened at 2007-10-09 00:39
Message generated for change (Comment added) made by sf-robot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1809991&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: other
Group: None
>Status: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: shizhao (wikishizhao)
Assigned to: Leonardo Gregianin (leogregianin)
Summary: welcome.py time bug
Initial Comment:
welcome.py use localtime() add welcome log sub page. plese use gmtime(), is UTC time.
----------------------------------------------------------------------
>Comment By: SourceForge Robot (sf-robot)
Date: 2007-11-29 19:20
Message:
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
----------------------------------------------------------------------
Comment By: Leonardo Gregianin (leogregianin)
Date: 2007-11-15 03:05
Message:
Logged In: YES
user_id=1136737
Originator: NO
wikipedia.py and all bots using localtime()
----------------------------------------------------------------------
Comment By: shizhao (wikishizhao)
Date: 2007-10-17 17:22
Message:
Logged In: YES
user_id=1853316
Originator: YES
localtime() => gmtime()
File Added: welcome.patch
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1809991&group_…
Bugs item #1835863, was opened at 2007-11-21 17:04
Message generated for change (Comment added) made by valhallasw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1835863&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: other
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Link error in http://pywikipediabot.sourceforge.net page
Initial Comment:
Link error in:
http://pywikipediabot.sourceforge.net/
In
<<
Snapshots
If you don't have a way to access SVN and the nightlies are not an option, you can use a snapshot, available from the sourceforge download page
>>
the link to sourceforge point to an old release (2004) instead of generic download page:
http://sourceforge.net/project/showfiles.php?group_id=93107&package_id=98691
----------------------------------------------------------------------
>Comment By: Merlijn S. van Deen (valhallasw)
Date: 2007-11-30 01:18
Message:
Logged In: YES
user_id=687283
Originator: NO
fixed
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1835863&group_…
Bugs item #1841155, was opened at 2007-11-29 18:12
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1841155&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Filnik (filnik)
Assigned to: Nobody/Anonymous (nobody)
Summary: Page's function, removeImage doesn't work.
Initial Comment:
I've used that function, here: http://it.wikipedia.org/w/index.php?title=Massagno&diff=prev&oldid=12586322 but seems to be a really big bug... some help? :-)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1841155&group_…
Revision: 4618
Author: leogregianin
Date: 2007-11-29 16:16:45 +0000 (Thu, 29 Nov 2007)
Log Message:
-----------
+quit..
Modified Paths:
--------------
trunk/pywikipedia/catall.py
Modified: trunk/pywikipedia/catall.py
===================================================================
--- trunk/pywikipedia/catall.py 2007-11-29 16:16:13 UTC (rev 4617)
+++ trunk/pywikipedia/catall.py 2007-11-29 16:16:45 UTC (rev 4618)
@@ -45,6 +45,7 @@
print ("?: Give the text of the page with GUI.")
print ("??: Give the text of the page in console.")
print ("xx: if the first, remove all categories and add no new.")
+ print ("q: quit.")
while flag == False:
choice=wikipedia.input(u"?")
if choice=="":
@@ -62,6 +63,9 @@
elif choice=="xx" and chosen==[]:
chosen = None
flag=True
+ elif choice=="q":
+ print "quit..."
+ sys.exit()
else:
chosen.append(choice)
return chosen
Bugs item #1783572, was opened at 2007-08-28 14:41
Message generated for change (Comment added) made by russblau
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1783572&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: other
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Persian Gulf (persian_gulf)
Assigned to: Nobody/Anonymous (nobody)
Summary: Necessary translation for redirect in wikipedia_family.py
Initial Comment:
This translation should exist in wikipedia_family.py to make $redirect * double work.
The file with added translation is included.
added translation:
self.redirect{
'fa' : u'تغییرمسیر',
}
This works well after the following bug is solved:
[ pywikipediabot-Bugs-1783561 ] a regex bug on line
----------------------------------------------------------------------
Comment By: Russell Blau (russblau)
Date: 2007-11-29 11:15
Message:
Logged In: YES
user_id=855050
Originator: NO
It appears that this translation has been added to family.py so this bug
may be fixed (someone who actually reads Farsi should verify this).
----------------------------------------------------------------------
Comment By: Persian Gulf (persian_gulf)
Date: 2007-09-03 08:52
Message:
Logged In: YES
user_id=1710835
Originator: YES
This works very well for Persian wikipedia(I tested it for about 500 ones
and if you want to make advantage of this for Persian Wiktionary as well,
such this line has to be added to wiktionary_familly.py file
----------------------------------------------------------------------
Comment By: Daniel Herding (wikipedian)
Date: 2007-09-02 19:55
Message:
Logged In: YES
user_id=880694
Originator: NO
Does this really only work for the Farsi Wikipedia, not for the Farsi
Wiktionary etc.?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1783572&group_…