It's not possible to correctly translate "topic_stat_sentence"


(Gerhard Schlager) #1

I’m having problems creating the German translation for js.categories.topic_stat_sentence and js.categories.post_stat_sentence.

The English strings are:

  • one: %{count} new topic in the past %{unit}.
  • other: %{count} new topics in the past %{unit}.

Unfortunately the German language needs different prepositions for each unit.

1 neues Thema am letzten Tag.
1 neues Thema in der letzten Woche.
1 neues Thema im letzten Monat.
1 neues Thema im letzten Jahr.

3 neue Themen am letzten Tag.
3 neue Themen in der letzten Woche.
3 neue Themen im letzten Monat.
3 neue Themen im letzten Jahr.

Can this be changed? I suggest using four different strings (for day, week, month and year) instead of just one.


Incorrect usage of week/month/year units in a translated string
(Anton) #2

Would this approach solve your case?


#3

Simple solution:

…seit 1 Tag.
…seit 1 Woche.
…seit 1 Monat.
…seit 1 Jahr.

Won’t perhaps make your teacher happy, but gets the meaning across.


(Gerhard Schlager) #4

Well, that Message Format thing is a real brain teaser and AFAIK I don’t think it would help in this case. The prepositon depends on the unit, not on the count.


(Gerhard Schlager) #5

Yeah, from a language perspective this is ugly as hell. But I guess that’ the best “solution” right now. Thanks.


(Anton) #6

What does that unit mean?


(Gerhard Schlager) #7

There’s a variable called “unit” in the string: %{count} new topics in the past %{unit}.

In the English locale this would become:

  • 3 new topics in the past day.
  • 3 new topics in the past week.
  • 3 new topics in the past month.
  • 3 new topics in the past year.

Those units (day, week, month, year) need different prepositions in German. So, it’s not a question of singular / plural.


(Anton) #8

Yeah, that’s challenging.

See if this can help:

… but I do not think that would be a nice idea to do it all the time for all such units in your language. Not all translators are happy to write any logical clauses in the translated strings either. :hourglass:


(Ricardo Azpeitia Pimentel) #9

We have kinda the same problem in the spanish translation, with “topic_stat_sentence” and “post_stat_sentence”, except that we need a different preposition and gender and also pluralize those in case that you add a counter of units.

1 nuevo comentario en el último día
1 nuevo comentario en la última semana
1 nuevo comentario en el último mes
1 nuevo comentario en el último año

1 nuevo comentario en los últimos 3 días
1 nuevo comentario en las últimas 3 semanas
1 nuevo comentario en los últimos 3 mes
1 nuevo comentario en los últimos 3 año

3 nuevos comentarios en el último día
3 nuevos comentarios en la última semana
3 nuevos comentarios en el último mes
3 nuevos comentarios en el último año

3 nuevos comentarios en los últimos 3 días
3 nuevos comentarios en las últimas 3 semanas
3 nuevos comentarios en los últimos 3 mes
3 nuevos comentarios en los últimos 3 año


(Gerhard Schlager) #10