Last modified: 2014-09-24 00:06:08 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 T23582, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21582 - Transliteration of Crimean Wiki
Transliteration of Crimean Wiki
Status: NEW
Product: MediaWiki
Classification: Unclassified
Language converter (Other open bugs)
unspecified
All All
: Low enhancement with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
http://crh.wikipedia.org/
: i18n, patch, patch-reviewed
Depends on:
Blocks: 30759
  Show dependency treegraph
 
Reported: 2009-11-20 22:00 UTC by Timming
Modified: 2014-09-24 00:06 UTC (History)
13 users (show)

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


Attachments
Crimean Tatar writing system convertor (20.72 KB, application/x-rar-compressed)
2009-11-22 12:30 UTC, Timming
Details
Transliterator in ZIP format (22.28 KB, application/zip)
2010-11-03 20:53 UTC, Timming
Details
Don_Alessandro's code from comment 13 (90.21 KB, patch)
2010-11-04 00:40 UTC, Bawolff (Brian Wolff)
Details
Don Alessandro's code from comment 13 with some bugs fixed (92.00 KB, patch)
2010-11-04 12:45 UTC, Alexander
Details

Description Timming 2009-11-20 22:00:33 UTC
Crimean language has two writing systems - Cyrillic and Latin. The translator is written on php. How can this translator be included into Crimean Wiki, so that users can switch from one writing to another, such as in Kazakh Wiki (http://kk.wikipedia.org).

The example of translator is here: http://medeniye.org/transliterator/

Thank you in advance.
Comment 1 Roan Kattouw 2009-11-20 22:06:30 UTC
I assume this asks for variants to be enabled?
Comment 2 Eugene Zelenko 2009-11-20 23:21:50 UTC
Don Alessandro (http://ru.wikipedia.org/wiki/%D0%A3%D1%87%D0%B0%D1%81%D1%82%D0%BD%D0%B8%D0%BA:Don_Alessandro) tried to create support fro multiples writing systems for Crimean Tatar language based on Kazakh converter.

I don't know current  status. Probably developers help needed to update code to current MediaWiki code and other possible problems fixing.
Comment 3 Timming 2009-11-22 12:30:34 UTC
Created attachment 6814 [details]
Crimean Tatar writing system convertor
Comment 4 Timming 2009-11-22 12:36:04 UTC
(In reply to comment #2)
Yes, actually, he asked me to work on it.

I've attached the converter. It is written on php. Is it possible to update it to current MediaWiki code?
Comment 5 Alexander 2010-01-04 09:23:17 UTC
Really. I've asked Timming to help me with this problem.
So, nearly two months have passed, is there any progress?
Comment 6 Nikolay N. Pavlov 2010-05-04 04:38:17 UTC
It is the program it is important for many languages of the people of Russia and were the USSR at which alphabets varied. The experts having possibility to help, I ask to pay attention to this problem.
Comment 7 Ilnar Shaidullov 2010-10-25 13:42:47 UTC
Totally agree with you. To date, day, many representatives of these people live abroad and enjoy the Latin, Cyrillic and others, so this is a very big problem. The sooner we resolve it, the sooner these projects will develop.
Comment 8 Bawolff (Brian Wolff) 2010-11-03 11:36:25 UTC
remove keyword shell. I'm not exactly sure what its here for.

Note, the patch is in the wrong format (all patches should be in (uncompressed) unified diff format. Some of us don't have a rar decompression programs installed (and apparently there aren't any open source ones(?)).) Furthermore just providing the php files doesn't really give the context of where they are supposed to go.

To summarize, please provide patches in unified diff format.
Comment 9 амдф 2010-11-03 11:39:26 UTC
OK, I understand. The patch should be rewritten, to be something like http://svn.wikimedia.org/doc/LanguageTg_8php_source.html

So, I'll remove the shell keyword.
Comment 10 Bawolff (Brian Wolff) 2010-11-03 11:45:05 UTC
That(In reply to comment #9)
> OK, I understand. The patch should be rewritten, to be something like
> http://svn.wikimedia.org/doc/LanguageTg_8php_source.html
> 

That to, but more importantly, the patch should be generated by the diff program (svn diff if you're using svn, but really they're both the same program). For example (pulling a random example from bugzilla) http://bug-attachment.wikimedia.org/attachment.cgi?id=2634 notice how it has + signs at lines that are new, and - signs on lines that are removed. See [[Unified_diff#Unified_format]]

Thanks.
Comment 11 Timming 2010-11-03 20:33:45 UTC
(In reply to comment #10)
Maybe I didn't understand you well, but this is not a patch, this is a transliteration program example. And the question was if someone could make a patch for Wikipedia engine out of this example. 

So, should I make diff a files, which is not a patch?

Correct me if I am wrong. Thank you.

PS. Adding an archieve in ZIP format.
Comment 12 Bawolff (Brian Wolff) 2010-11-03 20:38:45 UTC
(In reply to comment #11)
> (In reply to comment #10)
> Maybe I didn't understand you well, but this is not a patch, this is a
> transliteration program example. And the question was if someone could make a
> patch for Wikipedia engine out of this example. 
> 
> So, should I make diff a files, which is not a patch?
> 
> Correct me if I am wrong. Thank you.
> 
> PS. Adding an archieve in ZIP format.

Sorry, someone added the patch keyword, and I assumed it was patch. The whole unified diff thing really only applies to patches (well I suppose you could make a diff for this entirely new program, but that does seem kind of silly).

Cheers.
Comment 13 Alexander 2010-11-03 20:44:20 UTC
I've tried to change our script using Kazakh one as a model. Here is the result - http://crh.wikipedia.org/wiki/User:Don_Alessandro/Translit Is there anybody who can help me to diff and test it? Unfortunately I have no opportunity to install MediaWiki on my localhost now.
Comment 14 Timming 2010-11-03 20:53:15 UTC
Created attachment 7783 [details]
Transliterator in ZIP format
Comment 15 Bawolff (Brian Wolff) 2010-11-04 00:40:58 UTC
Created attachment 7785 [details]
Don_Alessandro's code from comment 13

(In reply to comment #13)
> I've tried to change our script using Kazakh one as a model. Here is the result
> - http://crh.wikipedia.org/wiki/User:Don_Alessandro/Translit Is there anybody
> who can help me to diff and test it? Unfortunately I have no opportunity to
> install MediaWiki on my localhost now.

I tested it on my personal install (sorry, not publically available unfortunately).

Got a fatal error:


Notice: Undefined variable: mCyrl2Latn in /var/www/w/phase3/languages/classes/LanguageCrh.php on line 69

Fatal error: Cannot access empty property in /var/www/w/phase3/languages/classes/LanguageCrh.php on line 69

I presume thats due to the extra dollar sign on line 69. I got rid of the dollar sign, and got a whole bunch of warnings:



Notice: Undefined variable: crh2Latn in /var/www/w/phase3/languages/classes/LanguageCrh.php on line 60

Notice: Undefined variable: crh2Cyrl in /var/www/w/phase3/languages/classes/LanguageCrh.php on line 61

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /var/www/w/phase3/includes/StringUtils.php on line 294

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /var/www/w/phase3/includes/StringUtils.php on line 294

Warning: strtr() [function.strtr]: The second argument is not an array in /var/www/w/phase3/includes/StringUtils.php on line 324

Warning: strtr() [function.strtr]: The second argument is not an array in /var/www/w/phase3/includes/StringUtils.php on line 324


However, I do get the variant drop down menu, with two entries (Cryllic and latin). Unfortunately clicking on either of them causes the page contents to totally disappear (probably related to all the warnings).

I'm also unclear on how includes/CrhConversion.php is supposed to get included (but I'm totally unfamiliar with the lang convert stuff, so there might be magic I just don't know about).


Attached is a unified diff of the stuff at http://crh.wikipedia.org/wiki/User:Don_Alessandro/Translit (as of whatever time it is right now), but with the fatal error on line 70 of LanguageCrh.php fixed.

Cheers.

p.s. All in all, considering you never tested your code, and (I assume) you're rather new at this, having only a single fatal error is actually pretty good.
Comment 16 Alexander 2010-11-04 12:43:50 UTC
Thanks a lot!

I've fixed one little bug, maybe it will work now... Could you please test this
Comment 17 Alexander 2010-11-04 12:45:50 UTC
Created attachment 7789 [details]
Don Alessandro's code from comment 13 with some bugs fixed
Comment 18 Alexander 2010-11-04 12:49:01 UTC
Thanks a lot!

I've fixed one little bug, maybe it will work now... Could you please test this: https://bugzilla.wikimedia.org/attachment.cgi?id=7789&action=diff
Comment 19 Santhosh Thottingal 2011-11-10 07:29:10 UTC
(In reply to comment #18)
> Thanks a lot!
> 
> I've fixed one little bug, maybe it will work now... Could you please test
> this: https://bugzilla.wikimedia.org/attachment.cgi?id=7789&action=diff

Thanks a lot for your efforts on this, apologies for the delay in getting this applied to mediawiki.

I used the latest patch given, and to verify whether it actually works, I tried some test cases. But I could not get it passed.

I tried this combination : "алейкум" => "aleyküm"
I get preg_replace(): Compilation failed: assertion expected after (?( at offset 30
at regsConverter methods preg_replace call. This happens for Latin to Cyrillic and reverse. 

I am not sure in what way you tested the transliteration. I used phpunit. Created a class wiki/tests/phpunit/LanguageCrhTest with the following lines.

<?php
class LanguageCrhTest extends MediaWikiTestCase {
	private $lang;
	function setUp() {
		$this->lang = Language::factory( 'Crh' );
	}
	function tearDown() {
		unset( $this->lang );
	}
	function testTranslate() {
		$this->assertEquals($this->lang->mConverter->convertTo( 'aleyküm', 'crh-cyrl' ) ,'алейкум');
		$this->assertEquals($this->lang->mConverter->convertTo( 'алейкум', 'crh-latn' ) ,'aleyküm');
	}
}

and from phpunit folder,
php phpunit.php languages/LanguageCrhTest.php

Could you please follow this and expand the above test class with more test cases and attach here? From the errors I am getting I assume that some of the regular expressions constructed are not working.  But  the online tool http://medeniye.org/transliterator/index.php gave me correct results.
Comment 20 Sumana Harihareswara 2011-11-10 12:49:33 UTC
Alexander, I changed the keyword "need-review" to "reviewed" -- if you have time to upload a revised patch, please change that keyword back when you do.  Thanks!
Comment 21 Ata 2014-08-12 08:31:08 UTC
Can someone comment on this?
Comment 22 Andre Klapper 2014-08-12 09:01:12 UTC
(In reply to Ata from comment #21)
> Can someone comment on this?

What exactly is your question (as I guess you don't want some random comment for the sake of a comment)? 
It looks like the current situation is described in comment 19.
Comment 23 Ata 2014-08-13 16:21:31 UTC
(In reply to Andre Klapper from comment #22)
> It looks like the current situation is described in comment 19.

Something was not working -- back in 2011. I wonder if smth has changed since then.

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


Navigation
Links