Jump to content

Translation string logic syntax question


AndreasW2000

Recommended Posts

HI everyone, I have a question around how to properly write the logic for a translation string. Tricky one. Possibly impossible.

It's this one: user_other_activity_reply

The English one is  : %2$s replied to %3$s's %1$s in - it will parse into "X replied to Y's topic in"

In German it's more difficult. We don't use the apostophe-s - we either simply add the s at the end of the word, OR, if there is already an s at the end, we then add an apostrophe, to indicate the omitting of the last s. So instead of John's we write Johns - and instead of James's we write James'.

(I guess the above string would translate into "James's" which to my knowledge is actually incorrect as well ... )

Now I need to change the German string to include this logic: adding either an s or an apostophe, depending on the last letter of Y. Any ideas of how to do this?

Currently, the German translation string is %2$s antwortete auf %3$s's %1$s in - so I can simply remove the apostrophe, but then the s-edge case is still not covered.

Andreas

 

 

Link to comment
Share on other sites

I don't know whether there's a way to build conditional logic into the string. It's possible with numbers but the relevant template files know that a logic check is coming and are written differently accordingly.

You do have the option here of changing the order of elements, so you could have: 

%2$s antwortete auf %1$s von/des %3$s in

if that sounds fairly natural. That just passes a problem on, though, I think because you'd need to choose between articles depending on the gender of topic/blog post/file etc of whatever %1$s is going to be in a situation.

You're probably best served to keep the ordering and accept that sometimes it's not grammatically perfect. There are plenty of people who (wrongly) believe that apostrophe-s doesn't follow 's' in English but who have to get used to seeing James's etc online. This sort of conundrum is why.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...