Last modified: 2014-11-17 09:44:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T28121, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26121 - Enable Language Converter for Portuguese in a testwiki
Enable Language Converter for Portuguese in a testwiki
Status: NEW
Product: Wikimedia
Classification: Unclassified
Site requests (Other open bugs)
unspecified
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: i18n, patch, patch-need-review
Depends on: 15161
Blocks: 30759
  Show dependency treegraph
 
Reported: 2010-11-25 18:59 UTC by Helder
Modified: 2014-11-17 09:44 UTC (History)
12 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Generated from http://pt.wikipedia.org/wiki/Wikipedia:Esplanada/propostas/Conversor_de_idiomas_para_as_variantes_do_português_(30mai2010)/PHP (12.99 KB, patch)
2010-12-24 12:36 UTC, Helder
Details
Updated patch (9.94 KB, patch)
2011-04-17 14:45 UTC, Helder
Details

Description Helder 2010-11-25 18:59:22 UTC
Some time ago it was proposed on Portuguese Wikipedia the use of LanguageConverter for dealing with differences among Portuguese variants. This was proposed on
http://pt.wikipedia.org/wiki/Wikipedia:Esplanada/propostas/Conversor_de_idiomas_para_as_variantes_do_portugu%C3%AAs_%2830mai2010%29
and discussed in its talk page. 

We already have some examples of conversion tables which could be used as basis for building the official tables:
http://pt.wikipedia.org/wiki/Wikipedia:Esplanada/propostas/Conversor_de_idiomas_para_as_variantes_do_portugu%C3%AAs_%2830mai2010%29/MediaWiki:Conversiontable/pt-pt
and
http://pt.wikipedia.org/wiki/Wikipedia:Esplanada/propostas/Conversor_de_idiomas_para_as_variantes_do_portugu%C3%AAs_%2830mai2010%29/MediaWiki:Conversiontable/pt-br

There is also a first version of the configuration files which should be needed to test it:
http://pt.wikipedia.org/wiki/Wikipedia:Esplanada/propostas/Conversor_de_idiomas_para_as_variantes_do_portugu%C3%AAs_%2830mai2010%29/PHP

Could someone add the corresponding code to a test wiki where the Portuguese comunity could try it in order to decide if they want or not the feature enabled on some Portuguese project? (and also, if it would need any further enhancement before that)

There was a thread about this on wikitech, but it is pending an answer to my previous question:
http://lists.wikimedia.org/pipermail/wikitech-l/2010-August/048809.html
Comment 1 Helder 2010-12-23 22:31:12 UTC
Any updates on this?
Is there anything we can do to accelerate the process?
Comment 2 Bawolff (Brian Wolff) 2010-12-24 06:17:57 UTC
Providing a unified diff of the code (And attaching it to this bug as a patch) will help significantly

Removing shell keyword. I can't imagine anyone is going to update the testwiki to use code not currently in svn.
Comment 3 Helder 2010-12-24 12:36:31 UTC
Created attachment 7926 [details]
Generated from http://pt.wikipedia.org/wiki/Wikipedia:Esplanada/propostas/Conversor_de_idiomas_para_as_variantes_do_português_(30mai2010)/PHP

Just a note: I've also removed my old username from translation files MessagesPt_br.php and MessagesPt.php, as mentioned at
http://translatewiki.net/wiki/Thread:User_talk:Siebrand/Rename_user_accounts/reply_%285%29
Comment 4 Helder 2010-12-24 12:37:46 UTC
(In reply to comment #2)
> Providing a unified diff of the code (And attaching it to this bug as a patch)
> will help significantly

Done. Could you please confirm if I did it right, since this is my first patch?

Thanks
Comment 5 Bawolff (Brian Wolff) 2010-12-24 12:39:58 UTC
At a quick glance, the patch looks correctly posted.
Comment 6 Mark A. Hershberger 2011-02-12 07:25:05 UTC
Bawolff, could you apply this?
Comment 7 Helder 2011-04-04 01:26:39 UTC
Is there anything our community can do to accelerate the process?

It would be great to have this conversion system in use somewhere so that we can start trying to migrate from our gadget ( [[pt:MediaWiki:Gadget-LanguageConverter.js]], which is an adaptation of a script used at Wikisource for modernization of old texts) to the PHP implementation.
Comment 8 Mark A. Hershberger 2011-04-05 03:29:09 UTC
(In reply to comment #7)
> Is there anything our community can do to accelerate the process?

Sure:

1. Get the patch applied.  That means bugging someone with commit access.
2. Add the shell keyword and show community consensus for getting this deployed on the requested wiki.

If you've done that and you're still not getting anywhere post another query on this bug.
Comment 9 Bawolff (Brian Wolff) 2011-04-05 15:37:54 UTC
Unassigning from self. Sorry I'm not familiar with the languageConverter code at all, and at the moment don't have the time to look through it in great depth. Thus I don't feel comfortable committing the patch. (I'll probably have more time once exams are done and all that, I'll try to take another look at this bug after that if it hasn't been resolved yet. Hopefully it will already be resolved by then).

Also sorry for not responding earlier (I think some of my bugmail got lost).
Comment 10 Siebrand Mazeland 2011-04-06 15:50:16 UTC
This part doesn't appear to have a place in the patch: /* Should we use translated names for the flags, as in "Sr" language?

Missing file PtConversion.php.
Comment 11 Helder 2011-04-17 14:45:52 UTC
Created attachment 8410 [details]
Updated patch

(In reply to comment #10)
> This part doesn't appear to have a place in the patch: /* Should we use
> translated names for the flags, as in "Sr" language?
> 
> Missing file PtConversion.php.

Fixed in the updated patch.
Could you commit it for us?
Comment 12 Philip Tzou 2011-04-17 17:00:46 UTC
As I had mentioned before, I'm afraid the current LanguageConverter would disrupt the content written in Portuguese.

As we know, in Chinese we don't use space to separate words. Since the LanguageConverter was originally designed for languages like Chinese, it separate the text char by char, but not word by word. It fits for Serbian because they just need to convert charset between Latin and Cyrillic, also char by char.

In order to accomplish the Portuguese version LC, we need to implement a new feature to LC, which convert text word by word separated by space or punctuations. I don't think implement the feature in pure PHP is a good idea, perhaps we need an C extension to provide the function whose performance can be comparable to PHP's built-in strtr.
Comment 13 Sumana Harihareswara 2012-01-11 01:51:49 UTC
If you want to set up a test wiki, maybe you could use a labs instance?  https://www.mediawiki.org/wiki/WMF_Projects/Wikimedia_Labs
Comment 14 Liangent 2013-03-29 18:13:19 UTC
(In reply to comment #12)
> In order to accomplish the Portuguese version LC, we need to implement a new
> feature to LC, which convert text word by word separated by space or
> punctuations. I don't think implement the feature in pure PHP is a good idea,
> perhaps we need an C extension to provide the function whose performance can
> be
> comparable to PHP's built-in strtr.

I don't think strtr is enough for word-by-word conversion...
Comment 15 Milos Rancic 2013-05-13 09:24:13 UTC
Thanks to Liangent for noting this to the bug #15161.

Presently, this is not possible via standard conversion engine methods, as it assumes conversion inside of one script.

To have this working, we need either different method or generalized engine, which is now possible, thanks to the new Parser.

Will talk about it with Parsoid team during Amsterdam Hackathon.
Comment 16 Andre Klapper 2013-11-12 13:08:02 UTC
(In reply to comment #11 by Helder)
> Fixed in the updated patch.
> Could you commit it for us?

Helder: Is this still wanted? If so, could you put it into Gerrit for review?
Comment 17 Helder 2013-11-12 13:43:58 UTC
As far as I know, yes (and the gadget is still in use).
But I won't have the time to work on the patch again any time soon.

PS: There was also a related thread at
https://pt.wikipedia.org/wiki/WP:Esplanada/propostas/Uso_do_portugu%C3%AAs_de_Portugal,_pt-PT_%284mar2012%29
Comment 18 Tony Thomas 2013-12-22 12:37:15 UTC
If its necessary, I can prepare the gerrit patch for that. should I ?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links