Changing approach to string translation?
-
Hello there,
I really like The Events Calendar. It is by far the best events plugin for WordPress. I would love to love The Events Calendar, but it’s not going to be possible until its approach to strings translation is brought in line with current best practices. I’m thinking in particular of:
Use entire sentences – in most languages word order is different than that in English.
as stated in the plugin developer handbook.
Unfortunately, everywhere where any of the four
tribe_get_event_label_*
functions are used, strings that should be presented to translators in one piece are split into two or more parts. In French, a language I have to work in, this leads to improper capitalization and, occasionally, “graphical” characters (” ? ” in a link, for example) ending up in the middle of a string.So for example, something like this:
$events_label_plural = tribe_get_event_label_plural(); [...] <?php printf( esc_html__( 'Next %s', 'the-events-calendar' ), $events_label_plural . ' <span>»</span>' ); ?>
should be as simple as:
<?php esc_html_e( 'Next Events <span>»</span>', 'the-events-calendar' ); ?>
This will mean more strings to translate, but it will allow translators to do their job properly. I understand this has far-reaching implications, but I wanted to know if this is something you would consider doing or accepting as a pull request if someone (e.g. me) took the time to do the work. Thanks!
- The topic ‘Changing approach to string translation?’ is closed to new replies.