# Translating RForum - all the quirks

**URL:** <https://www.ruby-forum.com/t/translating-rforum-all-the-quirks/59102>\
**Category:** Ruby-Forum\
**Created:** [April 28, 2006, 5:25pm UTC](https://www.ruby-forum.com/t/translating-rforum-all-the-quirks/59102 "2006-04-28T17:25:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![trebron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/53a042/32.png) [@trebron](https://www.ruby-forum.com/u/trebron)\
**Post date:** [April 28, 2006, 5:25pm UTC](https://www.ruby-forum.com/t/translating-rforum-all-the-quirks/59102/1 "2006-04-28T17:25:46Z")

</div>

I’ve recently made a Hungarian translation. In the process I had to face  
the fact that translating the language.yaml file is far from enough, as  
numerous strings are scattered in various rforum files. I made a list to  
help fellow translators. And I definietly hope that I don’t have to  
start all over again translating with 0.3, these should be moved to a  
language.yaml file sooner or later. hint-hint 😉

Here are my findings (I think it’s not documented elsewhere):

1. first of all lang/yourlanguage.yaml

1b) family and first name order.

> in my language it is in a reverse order compared to english, so i had to hack this in hu.yaml, as otherwise it would had been too difficult, as there are many surname and firstname string in the rforum files

1. emails

> app/views/mailer/yourlanguage

1. â??blockedâ?? (IP address blocked feedback)

> app/controllers/application.rb

1. â??IP is already in block listâ??

> app/controllers/admin\_controller.rb

1. â??User informationâ?? page name at top (clicking on the user list and  
then on a user)

> app/controllers/user\_controller.rb

6a) â??Editâ?? (in the forum list, if the logged in user is an admin)

> app/views/forum/list.rhtml

6b) â??[add]â?? string after Available Forums if logged in user is an admin)

> app/views/forum/list.rhtml

7a) â??Save / delete forumâ?? + confirmation (buttons in the forum edit menu  
for admins)

> app/views/forum/edit.rhtml

7b) â??Name, descriptionâ?? (text in the forum edit menu)

> app/views/forum/edit.rhtml

1. â??Searchâ??, â??Search resultsâ?? (Button in the search menu, results)

> app/views/forum/search.rhtml

1. Date format (depends on format\_datetime)

> app/helpers/application\_helper.rb

1. â??Forum:â??, â??Subject:â??, â??Text:â??, â??Submitâ?? buttons, â??anonymousâ?? user,  
email as well (when posting)

> app/views/topic\_postform.rhtml

1. â??authorâ??, â??dateâ??, â??guestâ?? (at the top of posts)

> app/views/topic/\_post.rhtml

1. " wrote:" string when replying with quote  
app/controllers/topic\_controller.rb

---

<div class="post-metadata">

**Author:** ![trebron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/53a042/32.png) [@trebron](https://www.ruby-forum.com/u/trebron)\
**Post date:** [July 12, 2006, 11:38am UTC](https://www.ruby-forum.com/t/translating-rforum-all-the-quirks/59102/2 "2006-07-12T11:38:14Z")

</div>

Excellent, thanks for the listing 🙂 I am working on a norwegian  
translation, and it’s pretty much done (the no.yaml). However I am  
getting some errormessages when trying to fire up WEBrick when using  
special norwegian characthers (that are indeed needed) in the  
translation. A copy/paste follows, any suggestions are welcome 🙂

stian@x303:~/rails/rforum-0.2$ RAILS\_ENV=production script/server  
=\> Booting WEBrick…  
./lib/localization.rb:51:in `iconv': "Ã¸k" (Iconv::IllegalSequence) from ./lib/localization.rb:51:in`load\_localized\_strings’  
from ./lib/localization.rb:50:in `load_localized_strings' from ./lib/localization.rb:49:in`load\_localized\_strings’  
from ./lib/localization.rb:42:in `load_localized_strings' from ./config/app.rb:16 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in`require’  
from  
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:147:in  
`require' from ./config/environment.rb:52 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in`require’  
from  
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:147:in  
`require' from /usr/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/commands/servers/webrick.rb:52 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in`require’  
from  
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:147:in  
`require' from /usr/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/commands/server.rb:30 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in`require’  
from script/server:3  
stian@x303:~/rails/rforum-0.2$

---

<div class="post-metadata">

**Author:** ![trebron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/53a042/32.png) [@trebron](https://www.ruby-forum.com/u/trebron)\
**Post date:** [July 12, 2006, 12:47pm UTC](https://www.ruby-forum.com/t/translating-rforum-all-the-quirks/59102/3 "2006-07-12T12:47:16Z")

</div>

I had the same problem with accented characters, fortunately I could  
figure out the solution. Check the file lib/localization.rb and make a  
small correction.

Search for the line containing

file\_charset = hash[â??file\_charsetâ??] || â??asciiâ??

and change ascii to â??utf-8â??.

I hope it helps, it worked for me. 🙂

---

<div class="post-metadata">

**Author:** ![trebron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/53a042/32.png) [@trebron](https://www.ruby-forum.com/u/trebron)\
**Post date:** [July 12, 2006, 5:32pm UTC](https://www.ruby-forum.com/t/translating-rforum-all-the-quirks/59102/4 "2006-07-12T17:32:05Z")

</div>

Stian H wrote:

> > Search for the line containing
> > 
> > file\_charset = hash[â??file\_charsetâ??] || â??asciiâ??
> > 
> > and change ascii to â??utf-8â??.
> > 
> > I hope it helps, it worked for me. 🙂
> 
> Excellent, that worked perfectly thanks 😃

A better solution is to add a key “file\_charset: utf-8” to the language  
file.

---

<div class="post-metadata">

**Author:** ![trebron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/53a042/32.png) [@trebron](https://www.ruby-forum.com/u/trebron)\
**Post date:** [July 12, 2006, 1:14pm UTC](https://www.ruby-forum.com/t/translating-rforum-all-the-quirks/59102/5 "2006-07-12T13:14:52Z")

</div>

> Search for the line containing
> 
> file\_charset = hash[â??file\_charsetâ??] || â??asciiâ??
> 
> and change ascii to â??utf-8â??.
> 
> I hope it helps, it worked for me. 🙂

Excellent, that worked perfectly thanks 😃

---

<div class="post-metadata">

**Author:** ![trebron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/53a042/32.png) [@trebron](https://www.ruby-forum.com/u/trebron)\
**Post date:** [July 12, 2006, 9:07pm UTC](https://www.ruby-forum.com/t/translating-rforum-all-the-quirks/59102/6 "2006-07-12T21:07:00Z")

</div>

> A better solution is to add a key “file\_charset: utf-8” to the language  
> file.

Great, I’ve completed my translation, and included this. And it works  
great. If anyone is interested in the Norwegian Bokmal translation it’s  
available for grabs here:  
[http://konspirasjon.net/i18n/rforum\_120706\_nb.yaml](http://konspirasjon.net/i18n/rforum_120706_nb.yaml)
