Talk:Editing audacityteam.org

From Audacity Wiki
Jump to: navigation, search

What to translate and segmentation of strings

I strongly believe that there is need for some guidelines as to how to segment the strings (in gettext's sense, i.e, block of text to be translated as a unit). IMO in the current audacity_website.pot there exists both strings that are too long and those that are too short; making translations of the website unnecessarily ardous.

Strings that are too long make it very hard to translate and fails to take full advantage of the capabilities of reuse that is inherent in the gettext system. Furthermore strings that are littered with html-tags are extremely confusing to translate.

I put an example of how that might look here:User:Sannab/msgstr_example_1. Note however that most editors will break at \n making the text mass slightly more scannable. However, all the html-tags need to be there or the page will not turn up right. I am not sure if breaking these kinds of text down into paragraphs (<p>...</p>) and headings (<h#>...</h#>) would be a feasible way to go. If that is done, these html-tags at least could be set outside the <? php echo.... call. The separation into smaller units of text however should not go as far as to encounter the problem described in the next paragraph.

The strings on the other hand that I find to short are those that in an attempt (?) to spare the translators from having to deal with f ex long hrefs that should not be translated, the sentence preceeding the href is stored as one msgstr and the string following it (often including the link text and the closing </a>) is stored as another. This easily leads to situations where one of these strings have been translated earlier, and you are left with a fragment of a sentence to try to make sense of..., which often forces you out of whatever editor you are using to instead look at the po-file in a plain text editor to find all the pieces.

An example: User:Sannab/msgstr_example_2

Is it really not possible to use some method similar to the c-format for c++ strings with php? Would it f ex not be possible to wrap the string in a sprintf, such as

<?php echo sprintf(_('Please %s contact us</a> early so we can work together to make your product a success.'), '<a href="[email protected]?subject=Bundlers Enquiry">');?>

In these cases it is of course also very important to put the content of %s in an i18n-hint for the translators. (And in this case the </a>-bit should most likely also be lifted out of the string given to the translators to translate.)--Sanna 08:06, 7 February 2009 (PST)