Last modified: 2013-12-22 11:59:55 UTC
This issue was converted from https://jira.toolserver.org/browse/PYWP-2. Summary: Multilingual development (jira testing) Issue type: New Feature - A new feature of the product, which has yet to be developed. Priority: Minor Status: Open Assignee: Merlijn van Deen <valhallasw@arctus.nl> On Fri, 02 Nov 2007 23:35:58, Merlijn van Deen <valhallasw@arctus.nl> opened the following bug: > (copied from the original report at > http://sourceforge.net/tracker/index.php?func=detail&aid=1768728&group_id=93107&atid=603141 > ) 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
On Sat, 03 Nov 2007 08:47:53, Pietrodn <powerpdn@gmail.com> wrote: > This is a very good idea! I can help with the Italian translation. > :-) Pietrodn
On Wed, 16 Jan 2008 11:23:14, Purodha Blissenbach <sso.ts.wikimedia.org@publi.purodha.net> wrote: > This was a major task. I support it, only suggesting to maybe think > about naming, rather than numbering, the messages: - there should be > an easy way to determine that a message is, or messages are, not > being used any more. - there should be an easy way to find out, > where messages are being used (grep for a name is usually better > than grep for a number) I suggest to make the user-config variable > mylang a list: mylang='de', ''fr', 'it', e.g. would return German > (de) unless a message was not translated, else it would try Francais > (fr), else Italiano (it) and if all else fails use English by > default. I can add translations to de, ksh (native), nds (at least > parts) Should not this be treated on the pywikipediabot feature > request bug tracker at > https://sourceforge.net/tracker/?group_id=93107&atid=603141
On Sat, 22 Jan 2011 15:24:00, Merlijn van Deen <valhallasw@arctus.nl> wrote: > With the TranslateWiki i18n in place, we should be able to implement > this fairly simply. However, we might consider using a gettext-like > interface for this (i.e. using _("English sentence") instead of > i18n.twtranslate(lang, 'tw-code')). The _()-like interface is much > clearer when writing code. Additionally, we should have a way to > automatically, or at least easily, translate log files from, say, > French, to English. It makes debugging hard to impossible when > handling localized texts. Maybe a dual-language output? Last, but > not least, do we actually want this? How do we handle non-english > bug reports? Etc. It's a more philosophical question, though ;-)