Jump to content

Important proposal for the next Suite 4.0


Recommended Posts



There are many places in all IPS products where language strings are going without the %s. So, translation to other languages can not be done correctly because in different languages it is not always proper to put the number before the word like on the attached screen. At least if you can not change the end of the word in each case (for different nubmers must be the different ends of the word in Russian, not only 2 like in English).

For example, there are 2 ends of the word only for the singular and plural form: donload and dowloads. But in Russian there are 3 ends of the translated word for the singular and plural form of the word.

If the language string will be always in the form of '%s donloads' then it will help to translate the string more accurate. For example, like this:

'Загрузок: %s'
Link to comment
Share on other sites

Kind of hand in hand with this IPS should start using placeholders. So %1$s and %2$s instead of %s so that any issues with languages which don't follow the same subject verb order as English can be completely avoided. Though I suppose the person editing the language bits can do it themselves...

Link to comment
Share on other sites

%s is actually a PHP thing, not something we control. We just do a simple sprintf() on the replacement, which is why %s is used (as we're typically using a string for the replacement).

http://www.php.net/manual/en/function.sprintf.php

Ryan, the suggestion is to use sprintf in more places. So in the IP.Downloads template instead of doing "{$numberOfDownloads} {$this->lang->words['downloads']}" it would be "{parse expression="sprintf($this->lang->words['downloads'], $numberOfDownloads)"}" where in the first one the langbit is "Downloads" and in the second one it's "%s Downloads". That way the bit can be translated to "Downloads: %s" without the need for template edits. Although I suppose in this example it would be %d. :smile:

Link to comment
Share on other sites

If you would like, when you come across something you can't translate for this reason, post a bug report. While I understand the point you're making is more attention should be paid to it anyway (which I agree with, and is something we will focus on in 4.0), we'll happily fix any cases pointed out.

Link to comment
Share on other sites

I am afraid I do not have enough time to report hundred places I saw while I was translating IP.Board and addons. Just change you programming style in Suite 4.0 once to not improve every single report in the future. And I am always being amazed that you do not have special testers team at present. Or they do not do their job in this direction (language strings).

Just change all 'Downloads' issues to '%s Downloads' in the future Suite 4.0. This is not very complicated considering that you are trying to present something completely new in Suite 4.0 as you are always advertising.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...