2013-10-01 42 views
3

我已經在我的控制器設定閃光消息像這樣軌道平移失蹤錯誤

flash[:error] = t 'auth.login.empty' 

我en.yml文件有

en: 
    auth: 
    login: 
     success: "Successfully logged in" 
     empty: "Empty field cannot accespted" 
     error: "Username and password doesn't match" 

全部是兩個space indent

我越來越閃光燈作爲translation missing: en.auth.login.empty

是否我必須做一些配置c hanges。

+1

你試過重新啓動服務器嗎? – sevenseacat

+1

把它關閉再次:) – micapam

回答

1

你的代碼實際上是用成功的鍵,空鍵和錯誤鍵縮進的。我現在已經解決了這個問題。

請確保您真的是使用了空格。我沒有其他理由知道爲什麼會這樣。

+0

對不起,我現在無法測試它。我使用了'tab size 2'選項卡。我們應該使用空間而不是選項卡的權利? – overflow

0

我剛碰到這個。

的關鍵,我在我的文件的頂部設置了被過度寫入文件以後:

# This was showing up as missing 
invite: 
    intent_msg: "Test intent message." 

# because waaaay farther down the file I had the following: 

invite: 
    button_text: "<i class='fi-mail'></i> Send Invite" 

即使兩個翻譯是不同的密鑰,第二個被殺死的第一。

所以現在我有這樣的:

invite: 
    intent_msg: "Test intent message." 
    button_text: "<i class='fi-mail'></i> Send Invite" 

,一切都很好再次。 小心那一個人。