# Removing apostrophe from possessive

**URL:** <https://www.ruby-forum.com/t/removing-apostrophe-from-possessive/189843>\
**Category:** Rails I18n\
**Created:** [June 8, 2010, 6:06pm UTC](https://www.ruby-forum.com/t/removing-apostrophe-from-possessive/189843 "2010-06-08T18:06:09Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![merc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@merc](https://www.ruby-forum.com/u/merc)\
**Post date:** [June 8, 2010, 6:06pm UTC](https://www.ruby-forum.com/t/removing-apostrophe-from-possessive/189843/1 "2010-06-08T18:06:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![merc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@merc](https://www.ruby-forum.com/u/merc)\
**Post date:** [June 8, 2010, 6:12pm UTC](https://www.ruby-forum.com/t/removing-apostrophe-from-possessive/189843/2 "2010-06-08T18:12:35Z")

</div>

Conjugations, etc. tough one and a real pain, I agree. Norman Clark is  
working on a library that is attempting to solve that. You can check  
it out here:

> **[GitHub - norman/spanish: Linguistic utilities for working with Spanish words.](https://github.com/norman/spanish)**
>
> Linguistic utilities for working with Spanish words. - GitHub - norman/spanish: Linguistic utilities for working with Spanish words.

I would love if any of that would make it into the standard I18n gem.

Greetings,  
Juergen

---

<div class="post-metadata">

**Author:** ![merc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@merc](https://www.ruby-forum.com/u/merc)\
**Post date:** [June 8, 2010, 6:18pm UTC](https://www.ruby-forum.com/t/removing-apostrophe-from-possessive/189843/3 "2010-06-08T18:18:26Z")

</div>

On Tue, Jun 8, 2010 at 12:05, JÃ¼rgen FeÃŸlmeier  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> Conjugations, etc. tough one and a real pain, I agree. Norman Clark is  
> working on a library that is attempting to solve that. You can check it out  
> here:
> 
> [GitHub - norman/spanish: Linguistic utilities for working with Spanish words. · GitHub](http://github.com/norman/spanish)
> 
> I would love if any of that would make it into the standard I18n gem.

Thanks for the mention, though I should say I’m still a long way off  
from  
having any of that implemented. It’s unfortunately still just vaporware.  
🙂

---

<div class="post-metadata">

**Author:** ![merc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@merc](https://www.ruby-forum.com/u/merc)\
**Post date:** [June 8, 2010, 6:16pm UTC](https://www.ruby-forum.com/t/removing-apostrophe-from-possessive/189843/4 "2010-06-08T18:16:41Z")

</div>

2010/6/8 Tony M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> 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

---

<div class="post-metadata">

**Author:** ![merc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@merc](https://www.ruby-forum.com/u/merc)\
**Post date:** [June 8, 2010, 6:19pm UTC](https://www.ruby-forum.com/t/removing-apostrophe-from-possessive/189843/5 "2010-06-08T18:19:02Z")

</div>

My bad, I shoulda explained, what I’m doing is something like  
search\_users\_posts: “Search {{user}} posts”

2010/6/8 AndrÃ©s gutiÃ©rrez [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![merc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@merc](https://www.ruby-forum.com/u/merc)\
**Post date:** [June 8, 2010, 6:27pm UTC](https://www.ruby-forum.com/t/removing-apostrophe-from-possessive/189843/6 "2010-06-08T18:27:14Z")

</div>

2010/6/8 Tony M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> 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 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![merc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@merc](https://www.ruby-forum.com/u/merc)\
**Post date:** [June 8, 2010, 7:09pm UTC](https://www.ruby-forum.com/t/removing-apostrophe-from-possessive/189843/7 "2010-06-08T19:09:59Z")

</div>

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!

2010/6/8 AndrÃ©s gutiÃ©rrez [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![merc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@merc](https://www.ruby-forum.com/u/merc)\
**Post date:** [June 8, 2010, 7:53pm UTC](https://www.ruby-forum.com/t/removing-apostrophe-from-possessive/189843/8 "2010-06-08T19:53:53Z")

</div>

2010/6/8 Tony M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> 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

---

<div class="post-metadata">

**Author:** ![merc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@merc](https://www.ruby-forum.com/u/merc)\
**Post date:** [June 10, 2010, 1:39pm UTC](https://www.ruby-forum.com/t/removing-apostrophe-from-possessive/189843/9 "2010-06-10T13:39:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![merc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@merc](https://www.ruby-forum.com/u/merc)\
**Post date:** [June 10, 2010, 8:24am UTC](https://www.ruby-forum.com/t/removing-apostrophe-from-possessive/189843/10 "2010-06-10T08:24:56Z")

</div>

The problem is actually, that:

\<%= t :search\_users\_posts, :user =\> @user.name %\>

search\_users\_posts: “Search {{user}}'s posts”

Produces “Search user [http://test](http://test)’s posts” (that orphan 's doesn’t  
look  
too good)

And not “Search user’s [http://test](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 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![merc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@merc](https://www.ruby-forum.com/u/merc)\
**Post date:** [June 11, 2010, 4:32pm UTC](https://www.ruby-forum.com/t/removing-apostrophe-from-possessive/189843/11 "2010-06-11T16:32:32Z")

</div>

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 \<

---

<div class="post-metadata">

**Author:** ![merc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@merc](https://www.ruby-forum.com/u/merc)\
**Post date:** [June 10, 2010, 3:45pm UTC](https://www.ruby-forum.com/t/removing-apostrophe-from-possessive/189843/12 "2010-06-10T15:45:07Z")

</div>

2010/6/10 Tony M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> And not “Search user’s [http://test](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?

I don’t know. You would may put the entire phrase inside the link  
\<%= link\_to I18n.t(:search\_users\_posts, :user =\> @user.name),  
your\_route\_path(@user) %\>

#=\> Search user’s posts [http://test/](http://test/)
