Hi Tom,<div>thanks for pointing this out. I wrote the code snippet of your example and, when I was checking the translation (I moderate the Italian translations group), I had trouble myself :)</div><div>I'll fix it as soon as I get back from vacation.</div>
<div><br></div><div>Alessandro<span></span><br><br>On Saturday, September 1, 2012, Thomas Müller wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'd like to a point which will make the live of translators easier and ensure<br>
that the translations are correct.<br>
<br>
We shall never split sentences!<br>
<br>
Reason:<br>
Translators loose the context and they have no chance to possible re-arrange words.<br>
<br>
Example:<br>
<?php echo $l->t('Select file from') . ' '; ?><a href='#' class="settings" id="browselink"><?php echo $l->t('local filesystem');?></a><br>
<?php echo $l->t(' or '); ?><a href='#' class="settings" id="cloudlink"><?php echo $l->t('cloud');?></a>.<br>
<br>
Translators will translate:<br>
Select file from<br>
local filesystem<br>
or<br>
cloud<br>
<br>
By translating these individual strings for sure the case will be lost of "local filesystem" and "cloud".<br>
The two white spaces with the or will get lost while translating as well.<br>
<br>
In German this will look like this:<br>
"Wählen Sie eine Datei von lokales Dateisystem oderCloud. "<br>
<br>
(Sorry if you are not speaking German - feel free to double check this string in our languages.)<br>
<br>
I agree that html in strings for translation is ugly but usually translators can handle this.<br>
<br>
What about variable in the strings?<br>
In case you need to add variables to the translation strings do it like that:<br>
$l->t('%s is available. Get <a href="%s">more information</a>',array($data['versionstring'], $data['web']));<br>
<br>
May I ask you all to review your code to make sure this is done properly?<br>
<br>
We need to give the translations teams (50 teams!) enough time to update the translations until our rollout.<br>
<br>
Thanks a lot and take care,<br>
<br>
<br>
Tom aka DeepDiver<br>
<br>
<br>
PS: Thx to the devs working on the news app - looks really awesome. Don't take it personal that I grabbed your snippet for this exercise. ;-)<br>
<br>
<br>
_______________________________________________<br>
Owncloud mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'Owncloud@kde.org')">Owncloud@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/owncloud" target="_blank">https://mail.kde.org/mailman/listinfo/owncloud</a><br>
</blockquote></div>