WordPress.org

Ready to get started?Download WordPress

Forums

why are signs like ← and → included in translation (22 posts)

  1. lautreamont33
    Member
    Posted 7 months ago #

    Is there a good reason for keeping signs like ← and → in strings that are translated. They are SIGNS and they do not need translation. Their separation from text will enable easier manipulation with them with less, in my mind, cost.

  2. Andrew Nevins
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 7 months ago #

    Which theme or plugin is this regarding?
    Can you link to a page with the issue?

    It does make sense to provide textual identification of items that otherwise rely only on sensory information to be understood.

  3. lautreamont33
    Member
    Posted 7 months ago #

    Look for "←" and "→" in:


  4. lautreamont33
    Member
    Posted 7 months ago #

    I typed ← and →.

  5. Andrew Nevins
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 7 months ago #

    I can't see your website

  6. lautreamont33
    Member
    Posted 7 months ago #

    I am talking about original WP themes. (I do not know where links from third message has gone). Just look at .pot files in any WP theme.

  7. esmi
    Theme Diva & Forum Moderator
    Posted 7 months ago #

    Signs can, and sometimes do, need translating when moving from one language to another. There are also issues of positioning in, for example, right to left languages. If you have an issue with a specific theme, please post in that theme's dedicated sub-forum via its page in http://wordpress.org/themes/

  8. lautreamont33
    Member
    Posted 7 months ago #

    Ye it is very different message:
    Next post ←
    and
    → tsop txeN.
    I do not have problems with anything, I just ask question. Is there a good reason for this. Because there are many arrows in text and as I see there will be more (new theme 14). It will be good thing that they are defined in one place and used without translation. Because I do not treat anybody as idiot, I ask my self what reason made creators of WP to use this method. You did not provide answer. In real world signs are signs because they are not language, they do not need translation.

  9. catacaustic
    Member
    Posted 7 months ago #

    Is there a good reason for this.

    Because someone might need to do it like that. Really, that's going to be the reason behind it. If someone needed to translate these and it wasn't available they'd be on here pretty quick asking why the developers left out the functionality that they need. There's always two sides to every argument, and decisions like that aren't (normally) made without a lot of thought going into the process.

    If you don't want it translated in your own theme then it's easy - just don't translate that part of the text. Instead of:

    echo __('Next post ←')

    use:

    echo __('Next post').' ←';

    Easy. :)

  10. lautreamont33
    Member
    Posted 7 months ago #

    Thanks for trying to explain to me, whatever you trying to explain, but that is not answer to my very simple question.

  11. Andrew Nevins
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 7 months ago #

    Could you rephrase your question?

  12. lautreamont33
    Member
    Posted 7 months ago #

    It is very simple, like I said, sign are signs because they do not need translation. If you see arrow sign (or whatever) on airport you do not translate that sign, you just know what it means, in NY, in Tokio, everywere. If you want to change that signs (arrows) to something else in WP, eg. icons, you can do it like he done it and then you lose translation because in translation enters whole string. So you must change every translation. Other method is to filter every string that exit translation and search for signs that you want to change. I think that this is too much work for something that in the first place never have to enter translation proces. So, if there is a good reason.

  13. esmi
    Theme Diva & Forum Moderator
    Posted 7 months ago #

    As catacaustic said:

    Because someone might need to do it like that

  14. sign are signs because they do not need translation.

    Incorrect.

    Sign DIRECTION needs translation, especially if you switch from English (left to right) to Hebrew (right to left) and the arrows need to point the other way.

  15. esmi
    Theme Diva & Forum Moderator
    Posted 7 months ago #

    Which is the point I made above. :-) Generally speaking, it is far better to incorporate more into the translatable strings than less.

  16. lautreamont33
    Member
    Posted 7 months ago #

    I did not want to start discussion with this question because this question is kindoff strategic decision. When I post question I expected that (eventually) someone from WP team will cut&paste something from their strategy (or whatever) material. I do not showoff, trying to be smart or trying to make anybody else stupid. I am only interested in this question because of my work and impact that might have on it.
    I appreciate your posts but even if you are right that do me no good. You just guessing, like me.

  17. esmi
    Theme Diva & Forum Moderator
    Posted 7 months ago #

    I, for one, am not guessing. I've actually worked on many right-to-left language pages. So I can assure you that the positioning of these arrows is essential. And, I reiterate, that is not a guess.

    FYI: There is no "WP team" and there are no "strategy (or whatever)" materials.

  18. lautreamont33
    Member
    Posted 7 months ago #

    It is just expresion ("WP team" and "strategy (or whatever)").
    What did you mean when you sad "that the positioning of these arrows is essential"?

  19. esmi
    Theme Diva & Forum Moderator
    Posted 7 months ago #

    In right-to-left languages, directional symbols (like arrows) are reversed. So:

    echo __('Next post ←')

    would need to be changed to:

    echo __('→ Next post')

  20. lautreamont33
    Member
    Posted 7 months ago #

    if (LTR)
      echo __('Next post') . ' ←'
    else
      echo '→ ' . __('Next post');

    Arrows are free for replacement and strings are clean for translation.

  21. catacaustic
    Member
    Posted 7 months ago #

    But you've added another level of complexity where it's not needed. The translation function can do that for you and you don't need any if () statements which leaves your code a whole lot eadier to read.

  22. And arrows aren't standard in all languages. As weird as this is, it gets us more flexibility. :)

Reply

You must log in to post.

About this Topic