# Dup translations right after lookup?

**URL:** <https://www.ruby-forum.com/t/dup-translations-right-after-lookup/186358>\
**Category:** Rails I18n\
**Created:** [April 5, 2010, 7:13pm UTC](https://www.ruby-forum.com/t/dup-translations-right-after-lookup/186358 "2010-04-05T19:13:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sven\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@Sven\_F](https://www.ruby-forum.com/u/Sven_F)\
**Post date:** [April 5, 2010, 7:13pm UTC](https://www.ruby-forum.com/t/dup-translations-right-after-lookup/186358/1 "2010-04-05T19:13:13Z")

</div>

Heya,

I’ve just committed a change that has been proposed to me a while ago:

[http://github.com/svenfuchs/i18n/commit/43304331eb7de2f52ccf9e343f457ffa4f5dc473](http://github.com/svenfuchs/i18n/commit/43304331eb7de2f52ccf9e343f457ffa4f5dc473)

Based on

> <https://gist.github.com/eandrejko/31e5aa46c8d5544df994>

(Ummm, I should probably keep the author credits)

The test suite passes, but I though I should double check with everybody  
on the list. Any objections? Am I missing something or is this a  
no-brainer?

Background:

translation = I18n.t(“this.is.the.key”) # =\> “translated "  
translation \<\< " found”  
translation = I18n.t(“this.is.the.key”) # =\> “translated found”

Thanks!

---

<div class="post-metadata">

**Author:** ![Sven\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@Sven\_F](https://www.ruby-forum.com/u/Sven_F)\
**Post date:** [April 5, 2010, 7:23pm UTC](https://www.ruby-forum.com/t/dup-translations-right-after-lookup/186358/2 "2010-04-05T19:23:45Z")

</div>

Ok, amended the commit so that I keep the author credits:

> <https://github.com/ruby-i18n/i18n/commit/0ca77036fccec252a546db51d29430bdaccf9878>

---

<div class="post-metadata">

**Author:** ![Sven\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@Sven\_F](https://www.ruby-forum.com/u/Sven_F)\
**Post date:** [April 5, 2010, 11:14pm UTC](https://www.ruby-forum.com/t/dup-translations-right-after-lookup/186358/3 "2010-04-05T23:14:56Z")

</div>

Is there anything in rails routes that allow to alias rails action  
resource names, such as the doc suggested, e.g.:  
…  
config.action\_controller.resources\_path\_names = {:new =\> ‘neu’, :edit  
=\> ‘bearbeiten’, :complete =\> ‘fertig’}  
…

BTW, the above only works for :new action, not for  
any :members, :collections, etc. !

The custom resource name plugin used to work real well getting around  
that issue, in [GitHub - carlosbrando/custom\_resource\_name: Custom Resource Name Plugin adds in your Ruby on Rails project the feature to create aliases for your named routes. This is extremely important for those who are developing software to a non-English public and wants all URLs in native language.](http://github.com/carlosbrando/custom_resource_name),  
however, no longer supports \>2.3.4

map.aliases :actions, :edit =\> ‘bearbeiten’

Does anyone have a solution for that?

Greetings,  
Juergen
