Comments

drunken monkey’s picture

Version: 7.x-1.0-beta8 » 7.x-1.x-dev
Component: User interface » Plugins

The Google Transliteration API seems to have been deprecated almost simultaneously with your post. Talk about timing …

In general, such a preprocessor (or data alteration) could easily be added to the Search API, either directly or with an additional module. However, I don't really know anything about transliteration or transcription, so I'd rather not do this myself.
If you are interested, you're free to work on a patch yourself.

dropbydrop’s picture

If i knew coding, I would.

It could take transliteration from a text file

like a=α
etc

then the user would create this file

drunken monkey’s picture

As said, I'm not really familiar with the topic, so I don't know whether there are dedicated file formats for this that should supported. If not, your suggestion certainly makes sense, and shouldn't be too hard to implement.

However, I still don't have the time to do this myself, so you'll have to find someone to code this for you, or hope someone comes along.

lavoiesl’s picture

Assigned: Unassigned » lavoiesl
Status: Active » Needs review
StatusFileSize
new2.98 KB

Here !

I took the liberty to also modify search_api_update_7113 so it does not have the processors hard-coded anymore.

Cheers

Status: Needs review » Needs work

The last submitted patch, 0001-Added-Transliteration-processor-and-removed-hard-cod.patch, failed testing.

drunken monkey’s picture

As the test results says, your method body misses a semicolon. Apart from that, this seems an easy enough solution. If someone else could test a fixed version of the patch, I think I'd commit this.

I took the liberty to also modify search_api_update_7113 so it does not have the processors hard-coded anymore.

According to the documentation, we shouldn't use any API functions from .module files in update hooks, that's why I used a hard-coded array.
Additionally, it doesn't really make sense to include processors which weren't included in the module at the time the update hook was written – for people executing the update, the list should be comprehensive as far as possible previous settings are concerned.
So please remove that part from your patch, too.

dydave’s picture

Hi guys,

Thanks a lot for posting this issue and following up with it.

We have been running for over a year on our own/custom code with a hard-coded array of replacements (just for our particular cases) instead of using Transliteration and I personally think it would be a great improvement to have that integrated and rolled in the module.

Thanks @drunken monkey for your review and feedback, I certainly agree with your comments and as an attempt to try and keep things moving forward with this ticket, I couldn't wait for @cslavoie to re-rolled and directly went ahead, especially given the few adjustements you kindly suggested.

Please find attached to this comment the revised version of the patch proposed at #4, against search_api-7.x-1.x at 63208a8:
File named:search_api-transliteration-in search-strings-1169254-7.patch.

  • Added the semicolon in method's body.
  • Reverted change to .install file and added preprocessor search_api_transliteration in hard-coded array.

This patch has been tested and works as expected.

Feel free to let me know if you would have any further questions, comments, issues, concerns, suggestions, recommendations or objections on this feature request in general, I would be glad to provide more information or explain in further details.

Any further comments, feedback, testing, reviewing and reporting, would be highly appreciated.
Thanks again to all in advance for your support, comments, replies and feedback.
Cheers!

Status: Needs review » Needs work

The last submitted patch, search_api-transliteration-in search-strings-1169254-7.patch, failed testing.

dydave’s picture

Status: Needs work » Needs review
StatusFileSize
new2.71 KB

ah... looks like I missed a - in the file path.

Please find attached to this comment the updated patch with a correct file name, against search_api-7.x-1.x at 63208a8:
File named: search_api-transliteration-in-search-strings-1169254-9.patch.

Feel free to let me know if you would have any further questions, comments, issues, concerns, suggestions, recommendations or objections on this feature request in general, I would be glad to provide more information or explain in further details.

Any further comments, feedback, testing, reviewing and reporting, would be highly appreciated.
Thanks again to all in advance for your support, comments, replies and feedback.
Cheers!

drunken monkey’s picture

Thanks for re-rolling! Looks very good to me, and seems to work fine.

Reverted change to .install file and added preprocessor search_api_transliteration in hard-coded array.

That's not necessary. As said, we only have to consider the processors that existed before that update. We don't have to add our new ones now.

Attached is a simple re-roll with that change removed (and the transliteration processor moved a bit up, where I think it makes more sense). Anyone else want to test?

sensifreak’s picture

Path works for me!
Its the solution for #1826864: Umlauts

drunken monkey’s picture

Status: Needs review » Fixed

Great, thanks for testing!

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.