Habari is not easy for translators

4 views
Skip to first unread message

msi

unread,
Jun 1, 2008, 5:26:04 AM6/1/08
to habari-users
As you maybe know I'm using Habari. You guys (@Habari developers) are
doing a good job but my "job" to translate it is not so easy. Just
look at that

_n( '%1$d ' . _t( 'month' ), '%1$d ' . _t( 'months' )

The language file now contains "%$1d" (what for?) and the words
"month" and "months". I made a suggestion (ticket #419) to make those
translations easier. Maybe easier for me, I don't know. ;-) But I'm
sure other translators will have the same problems.

Another very good example is the phrase "your blog has been active for
3 days". In the german translation the word "active" goes to the end

Dein Blog ist seit 3 Tagen aktiv

There is another thing. Actually, the plural of the german word
"Tag" (means day, not the tag cloud ;-)) is "Tage" (days). You see the
N at the end of "tage"? It's also the plural. The translation uses a
"since" context because the "for" context doesn't sound good in
German.

Let's make it short. What do I want? Just check your code, guys. Think
about me, sitting here, translating, loosing hair while trying... :-)
It's not a problem to create one sentence to translate. Something like

'<a href="%1$s">You</a> have published %2$s%3$s'

instead of combined strings like

'You' (or) 'the authors' + 'have published'

That is not translatable, especially when one wants to use the
informal german "you" (format: Sie HABEN geschrieben, informal: du
HAST geschrieben). There is another form of "have"; comparable to "you
HAVE published" vs. "he HAS published". You know?

Well, that's all I wanted to say.
Thanks for reading.

Ali B.

unread,
Jun 1, 2008, 5:58:16 AM6/1/08
to habari...@googlegroups.com
On Sun, Jun 1, 2008 at 12:26 PM, msi <ms...@arcor.de> wrote:
 
It's not a problem to create one sentence to translate. Something like:
 '<a href="%1$s">You</a> have published %2$s%3$s'

instead of combined strings like

'You' (or) 'the authors' + 'have published'

That is not translatable, especially when one wants to use the
informal german "you" (format: Sie HABEN geschrieben, informal: du
HAST geschrieben). There is another form of "have"; comparable to "you
HAVE published" vs. "he HAS published". You know?

It's correct that the 2nd format will not be translatable for the cases you mentioned. But your suggested example (first example) that you would contain html tags in the translatable text,  is not a good practice to follow, and I am pretty sure it would raise some issues when translating to more complex scripts (like east asian or RTL).

I don't see an easy way to workaround this, at least at the moment. But if you, or anyone else, have an idea, I'd love to be able to discuss it.

--
Ali B / dmondark
http://www.awhitebox.com

msi

unread,
Jun 1, 2008, 7:05:27 AM6/1/08
to habari-users
I understand the problem or the issues with the HTML code. But what
about having placeholders like %s or $1%d in the phrase? Is that also
a problem?

Ali B.

unread,
Jun 1, 2008, 9:04:38 AM6/1/08
to habari...@googlegroups.com
I am not sure what you mean here. Do you mean place holders to replace with html?If not, could you give an simple example?

msi

unread,
Jun 1, 2008, 10:58:02 AM6/1/08
to habari-users
No, I'm talking about the typical placeholders, like "%d pages".
Something that will be replaced by another number or string or
whatever. This could be a solution for some kinds of contextual
language issues. It's not easy to explain.
Except for the meaning of the sentences (of course!), the words "days"
are not different in "the door is open for 3 days" or "the door was
open 3 days ago". Ask a german guy to translate that and he or she
will tell you that the german plural of "days" will be different in
both sentences.

If the language file just contains the word "days" to translate, it
could be a problem to find a proper translation. And that's the reason
I'm asking. Is it a problem to have a complete sentence with a
placeholder in the language file? Even if it makes the file bigger?


(btw, I don't have a solution on how to handle HTML code and
acceptable translations, sorry.)

Owen Winkler

unread,
Jun 1, 2008, 12:45:43 PM6/1/08
to habari...@googlegroups.com
msi wrote:
> As you maybe know I'm using Habari. You guys (@Habari developers) are
> doing a good job but my "job" to translate it is not so easy. Just
> look at that
>
> _n( '%1$d ' . _t( 'month' ), '%1$d ' . _t( 'months' )
>
> The language file now contains "%$1d" (what for?) and the words
> "month" and "months". I made a suggestion (ticket #419) to make those
> translations easier. Maybe easier for me, I don't know. ;-) But I'm
> sure other translators will have the same problems.

Yes. This particular bit of text is causing us quite a bit of trouble
in translation.

I think that the design for the page that includes this text wasn't
keeping i18n in mind, nor the idea that there may be several different
types of things to output details of.

The look of it is nice, but I think in the short term we're going to
need a more locale-friendly option. As for the long-term, I'm hoping
that some of the more savvy translators could come up with some options
so that we can support the look of the text but still be able to
localize it.

Owen

msi

unread,
Jun 2, 2008, 3:42:59 AM6/2/08
to habari-users
> Yes. This particular bit of text is causing us quite a bit of trouble
> in translation.

Owen, I don't have a problem with strings like "%d month" or "%d
months". All I'm asking for is to keep the context. Just take the "the
authors have published a lot of entries" phrase. If you would skip the
link to the users administration page, it would be much easier

$message = 'so many pages and posts with 1 comment and 3 tags';

printf( _n( 'You have published %2$s', 'The %1$d authors have
published %2$s', $stats['author_count'] ),
$stats['author_count'],
$message
);

Isn't that easy? But you have to skip the link. If you need it (what
for?) just keep "have published %s" in one translatable string (plural
& singular) with the placeholder! It's very important NOT to break
this context because in German the string would look like "have %s
published".


Mathias.
Reply all
Reply to author
Forward
0 new messages