• Hi there and thank you for such a useful plugin!

    I have a small issue. The transliteration trims the first word of the title:
    π.χ. “καταστατικ? αναδοχ?? παιδιο?”
    becomes
    “anadochis-paidioy”
    which means that the first word “katastatiko” was completely lost in transliteration (pun indented).

    Any idea how to handle that?

    Wishing you all the bets

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Emil Gustafsson

    (@gesen)

    Hi!

    Thanks for using the plugin!

    It seems weird that an entire word would be trimmed from the filename, and I honestly have no idea why. The only trimming that is done is hyphens (-) at the beginning and end of filenames, for example -my-filename-.jpg would be trimmed to my-filename.jpg.

    Does that give you any clues? ??

    Thread Starter spytzo

    (@spytzo)

    I am no PHP developer myself and I also feel weird because the code is so well documented that even I can understand what is going on per step.

    I am guessing that the only way that a whole word is deleted is either on line 478 (Remove characters that are not a-z, 0-9, or – (dash)) or on line 481 (Remove multiple dashes in a row). This could be like, for some reason the whole first word is transformed into dashes and then multiple dashes are replaced with only one.

    I am on SiteGround running their version of Ultrafast PHP – version PHP 7.4.29. Could that help as well?

    • This reply was modified 2 years, 5 months ago by spytzo.
    Plugin Contributor Emil Gustafsson

    (@gesen)

    I renamed an image/jpeg file to καταστατικ? αναδοχ?? παιδιο? and uploaded it to my local test site. The plugin converted the filename to katastatiko-anadochis-paidioy.jpg. I guess this is correct since the first word is still there.

    I guess if the entire first word is deleted it would be because the core WordPress function remove_accents() can’t handle the characters in the first word. However, on line 469, some characters are replaced that are not handled well or at all by the core WordPress function remove_accents(), before the remove_accents() function is used. All characters in the first word are defined in the array starting at line 265, so they should all be translated. Which is what I am getting when I test it out.

    Thread Starter spytzo

    (@spytzo)

    Same thing, I spun out a fresh Local WP installation running on WordPress 6.0 and theme Twenty Twenty-Two with only your plugin installed and activated and everything went smoothly. (nginx, PHP 7.4.1, MySQL 8.0.16). I will do some more tests on my original installation and will get back with more information about this weird little bug ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘First transliterated word is lost’ is closed to new replies.