Thank y'all so much for this valuable insight. I decided to do as you suggested Jürgen and cut the Gordian Knot by just changing the sentence structure.
Thanks again! On Thu, Jun 10, 2010 at 1:32 PM, Jürgen Feßlmeier < [email protected]> wrote: > Unfortunately there is no easy solution, and your case is still a simple > one, as your substitute is the user name. > > "Search {{user}} posts" % [link_to("{{user}}'s" % [h(@user.name)], > user_path(@user))] > > This works great in English but not in other languages. > > It becomes a real pain, when you substitute entire words of a sentence, you > end up with bad grammar in other languages. Consider this: > > "Please accept this {{post}}!" > > In the example below, if you substitute {{post}} for "blog" or "article", > it still makes lots of sense in English, but in Spanish, German, etc. you > have to deal with gender (der Artikel, e.g. "el", "la") or conjugations, > (German: der (nominative), des (genitiv), dessen (dativ), dem (akkusative)). > > The solutions I can think of today are: > > * change the sentence structure so it works for other languages -> least > common denominator, does not really sound great, difficult as you may not > know enough about the languages > > * don't substitute, e.g. have multiple combination for same sentence > depending on context > > Greetings, > Juergen > > > > On Jun 10, 2010, at 3:24 AM, Tony Maserati wrote: > > The problem is actually, that: > > <%= t :search_users_posts, :user => @user.name %> > > search_users_posts: "Search {{user}}'s posts" > > Produces "Search user <http://test>'s posts" (that orphan 's doesn't look > too good) > > And not "Search user's <http://test> posts" which the following would > produce: > > <%= t :search_users_posts, :user => @user.name, :possessive => true %> > > search_users_posts: "Search {{user}} posts" > > Is there an easy way to fix this? > > 2010/6/8 Andrés gutiérrez <[email protected]> > >> >> >> 2010/6/8 Tony Maserati <[email protected]> >> >>> Yeah you're right man, why don't I just do that. I was looking at what >>> our previous developer did. Thanks a lot Mr Andrés! >>> >>> I love being useful >> >> Greetings >> >> >>> >>> 2010/6/8 Andrés gutiérrez <[email protected]> >>> >>>> >>>> >>>> 2010/6/8 Tony Maserati <[email protected]> >>>> >>>>> My bad, I shoulda explained, what I'm doing is something like >>>>> search_users_posts: "Search {{user}} posts" >>>>> >>>> >>>> <%= t :search_users_posts, :user => @user.name %> >>>> >>>> en.yml : >>>> search_users_posts: "Search {{user}}'s posts" >>>> es.yml >>>> search_users_posts: "Buscar los post de {{user}}" >>>> >>>> Sorry, I think I still do not understand your problem. >>>> >>>> 2010/6/8 Andrés gutiérrez <[email protected]> >>>>> >>>>> >>>>>> >>>>>> 2010/6/8 Tony Maserati <[email protected]> >>>>>> >>>>>> Hi, >>>>>>> >>>>>>> I'm using i.e. <%= t :search_users_posts, :possessive => true %> to >>>>>>> get "Search user's posts". But what if the language I'm translating it >>>>>>> to >>>>>>> doesn't use apostrophe, how do I translate such things / remove it? >>>>>>> >>>>>>> Thanks >>>>>>> >>>>>> >>>>>> <%= t :search_users_posts %> >>>>>> en.yml : >>>>>> search_users_posts: "Search user's posts" >>>>>> es.yml >>>>>> search_users_posts: "Buscar los post del usuario" >>>>>> >>>>>> Sorry, i don't understand the problem >>>>>> >>>>>>> >>>>>>> -- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "rails-i18n" group. >>>>>>> To post to this group, send email to [email protected]. >>>>>>> To unsubscribe from this group, send email to >>>>>>> [email protected]<rails-i18n%[email protected]> >>>>>>> . >>>>>>> For more options, visit this group at >>>>>>> http://groups.google.com/group/rails-i18n?hl=en. >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "rails-i18n" group. >>>>>> To post to this group, send email to [email protected]. >>>>>> To unsubscribe from this group, send email to >>>>>> [email protected]<rails-i18n%[email protected]> >>>>>> . >>>>>> For more options, visit this group at >>>>>> http://groups.google.com/group/rails-i18n?hl=en. >>>>>> >>>>> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "rails-i18n" group. >>>>> To post to this group, send email to [email protected]. >>>>> To unsubscribe from this group, send email to >>>>> [email protected]<rails-i18n%[email protected]> >>>>> . >>>>> For more options, visit this group at >>>>> http://groups.google.com/group/rails-i18n?hl=en. >>>>> >>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "rails-i18n" group. >>>> To post to this group, send email to [email protected]. >>>> To unsubscribe from this group, send email to >>>> [email protected]<rails-i18n%[email protected]> >>>> . >>>> For more options, visit this group at >>>> http://groups.google.com/group/rails-i18n?hl=en. >>>> >>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "rails-i18n" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]<rails-i18n%[email protected]> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/rails-i18n?hl=en. >>> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "rails-i18n" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<rails-i18n%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/rails-i18n?hl=en. >> > > > -- > You received this message because you are subscribed to the Google Groups > "rails-i18n" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rails-i18n?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "rails-i18n" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<rails-i18n%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rails-i18n?hl=en. > -- You received this message because you are subscribed to the Google Groups "rails-i18n" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rails-i18n?hl=en.
