Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Problem with date_selecte: can't convert symbol into string #51

Closed
mdudda opened this Issue Jan 27, 2012 · 4 comments

Comments

Projects
None yet
3 participants

mdudda commented Jan 27, 2012

Hey guys!
I hope you can help me.

My locale is set to de-DE.
I get the following error while opening my rails app in the browser:
www.mycommunity.com/singup

[BEGIN]
TypeError in Users#new

Showing /usr/local/lib/ruby/gems/1.9.1/bundler/gems/communityengine-8b58293213d7/app/views/users/new.html.haml where line #41 raised:

can't convert Symbol into String

Extracted source (around line #41):

38: =:birthday.l
39: :
40: %em=:required_you_must_be_at_least_years_old_to_sign_up.l_with_args(:min_age => configatron.min_age)
41: = date_select :user, :birthday
42:
43: -if configatron.require_captcha_on_signup
44: .right{:style => 'margin-top:2em;'}= recaptcha_tags
[END]

I tried those :order workaround i've found on google but that does't seem to solve the problem.
When I set the locale to 'en' it works like a charm.

Owner

bborn commented Jan 31, 2012

I think there are probably some date translations missing from the de.yml file. Please compare against the es-ES.yml file:

https://github.com/bborn/communityengine/blob/master/lang/ui/de-DE.yml#L2

Contributor

AxelWalsleben commented Feb 20, 2012

there are 2 problems in the de-DE.yml
in the beginning date is defined like this:

de-DE:
date:
formats:
published_date: "%d.%m.%Y"
date_ago: "%b %Y"

but it has to be:

date:
formats:
published_date: "%d.%m.%Y"
date_ago: "%b %Y"
order:
- :day
- :month
- :year
day_names: [Sonntag, Montag, Dienstag, Mittwoch, Donnerstag, Freitag, Samstag]
abbr_day_names: [So, Mo, Di, Mi, Do, Fr, Sa]
month_names: [, Januar, Februar, März, April, Mai, Juni, Juli, August, September, Oktober, November, Dezember]
abbr_month_names: [
, Jan, Feb, Mär, Apr, Mai, Jun, Jul, Aug, Sep, Okt, Nov, Dez]

and later in the yaml file date is again set:

#en: date: Date
date: Datum

so the previous definition is now away.
i commented the second date out.
now signup works.

Owner

bborn commented Feb 20, 2012

Great! Can you fork and submit a pull request?

@bborn bborn closed this Feb 20, 2012

Contributor

AxelWalsleben commented Feb 20, 2012

I am just fixing some other issues wie the de-De.yml file.
then i will do that.

Am 20.02.2012 15:00, schrieb Bruno Bornsztein:

Great! Can you fork and submit a pull request?


Reply to this email directly or view it on GitHub:
#51 (comment)

@AxelWalsleben AxelWalsleben referenced this issue Feb 20, 2012

Merged

Rails3 #60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment