Closed GoogleCodeExporter closed 9 years ago
Tagging... all good points.
Original comment by eugene.m...@gmail.com
on 14 Jun 2012 at 8:14
Ok so why wouldn't a translators note be enough?
It is there so translators know exactly what is translated
/* translators: home.php template file */
Maybe in this particular case it's no problem to include the substituted noun.
I just want to know best practices for future reference. From what I gather
from the answer the problem emerges when the same string is used in several
places to refer to different nouns.
Original comment by invistr...@gmail.com
on 4 Jul 2012 at 9:54
Didn't know in which of all our localization issues to put this patch, but here
goes. A first round of content-extensions.php. For reference I used Otto's
primer
http://ottopress.com/2012/internationalization-youre-probably-doing-it-wrong/
I have added some translators notes, as well as context in a few places.
A couple of uncertainties:
- If html markup should be removed from the nav-above and nav-below strings. I
kept them in for now.
- How to best handle the postfooter_postconnect strings. The best for
translation is to keep the sentences intact. I tried a couple of sprintf
versions but didn't really find a way that seemed good. In the comments to
Otto's article they discuss what to do with inline links, and he says basically
that with links embedded in paragraphs it might be necessary to include them in
the translated string. It would depend on the context.
I thought of something like this:
/* translators: 1: comment link, 2: Trackback URL */
$postconnect = sprintf( __( '<a %1$s>Post a comment</a> or leave a trackback:
%2$s.', 'thematic' ),
'class="comment-link" href="#respond" title ="' . __('Post a comment', 'thematic') . '"',
'<a class="trackback-link" href="' . get_trackback_url() . '" title ="' . __('Trackback URL for your post', 'thematic') . '" rel="trackback">' . __('Trackback URL', 'thematic') . '</a>'
);
Original comment by invistr...@gmail.com
on 4 Jul 2012 at 10:41
Attachments:
[deleted comment]
i agree it seems simpler, but by not splitting strings, karin is following the
advice of otto, who's in the wp core dev group
see the link she posted. maybe we should go straight to otto and ask his
opinion?
Original comment by helgathe...@gmail.com
on 6 Jul 2012 at 10:03
Sorry, I know too little about this and noticed my propoosal wouldn't work well
with other strings. I guess I'll let you people who know what they're doing
handle this ;)
Original comment by codec...@chokebore.net
on 6 Jul 2012 at 10:06
check out the link above to ottopress. pretty much those are the guidelines
we're following. some of us (me!) don't really know what we're doing on this
subject either.
Original comment by helgathe...@gmail.com
on 6 Jul 2012 at 10:25
I'm certainly not taking offence for different suggestions. :) I didn't include
any edits of the postconnect_postfooter in the patch for the very reason that I
wasn't really sure what the best solution would be.
The original code contains one of those strings with leading spaces that we are
trying to get rid of. Most of those strings come from the fact that sentences
are split up, and I am trying to connect the sentences together. With as little
markup as possible in the actual strings.
The nested sprintf's is something similar to what I've seen in twentyeleven,
for example in content-gallery.php. Took me a while to figure out what's going
on there. But if the priority is to have complete sentences and include
punctuation, I don't know any better way.
Original comment by invistr...@gmail.com
on 7 Jul 2012 at 6:18
Thanks for your kind reply. I guess I'll leave the coding to you and stick with
the translation :)
Btw your diff fixes a problem I was having with a fragmented string ("Browse
the %s archive"), so thanks a lot for that!
Original comment by codec...@chokebore.net
on 7 Jul 2012 at 10:12
[deleted comment]
I need to look over your diff.... but here's my stab at the
thematic_postfooter_postconnect(). i'm debating between 1: remove all leading
and trailing spaces from the individual functions and then add them to the
calling function, like so:
function thematic_postfooter(){
$postfooter = function1() . ' ' . function2() . ' ' . function3();
return $postfooter;
}
or 2:
leaving a trailing space in function1(), function2() and so on so that you
don't need any spaces in thematic_postfooter and filtering/overriding
function2() will leave functions 1 and 3 appropriately space.
am i making any sense? i'm inclined to think that 1 is easier? if you want to
remove function2 from the postfooter, you'd override/filter the postfooter, no?
Original comment by helgathe...@gmail.com
on 7 Jul 2012 at 7:23
Attachments:
weren't enough admin only strings to warrant splitting. but strings were
overhauled.
Original comment by helgathe...@gmail.com
on 28 Oct 2012 at 10:30
Original issue reported on code.google.com by
helgathe...@gmail.com
on 14 Jun 2012 at 12:16