Support » Plugins and Hacks » [Resolved] [Plugin: Codestyling Localization] Problem with encoded tab character

[Resolved] [Plugin: Codestyling Localization] Problem with encoded tab character

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author codestyling


    Please provide a code snippet out of!
    It dependends on how it’s done.

    Sorry for the delay in replying. No, what I meant wasn’t in the code, but in the editing. For example, let’s say an original string is like this (I’ll type [tab] where a tab character should appear:

    [tab]Something something something.

    This appears in the CSL translatable string as:

    \tSomething something something.

    So, I translated it by typing these exact characters:

    \tTranslated text translated text.

    And save. But CSL, instead of storing the typed ‘\t’ as a tab character, saves it as a slash-followed-by-a-t, meaning internally it becomes this:

    \\tTranslated text translated text.

    And thus, when WordPress finally displays this string, it appears in the rendered output as:

    \tTranslated text translated text.

    And not as it should, which would be:

    [tab]Translated text translated text.

    The workaround then is to translate this:

    \tSomething something something.

    To this:

    Translated text translated text.

    What causes the output on, for example, pre-wrapped sections, to become misaligned. Or maybe to this:

            Something something something.

    Which, although it’ll appear right, isn’t semantically the same.

    I hope this helps!

    Plugin Author codestyling


    This is a known bug, not yet solved. The WordPress main file contains also a \t character but doesn’t meen [TAB] with it.
    It’s not that easy to solve this at all occurances, will be handled with later updates. Next update will fix some bugs introduced during WP 3.5 compatibility.

    Plugin Author codestyling


    Improved TAB charactor handling won’t make it into 1.x versions from now on because the 2.0 reaches beta state soon. This will be handled with scope of 2.0 version only.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] [Plugin: Codestyling Localization] Problem with encoded tab character’ is closed to new replies.