Skip to content

Commit

Permalink
R18n replacing for t
Browse files Browse the repository at this point in the history
  • Loading branch information
cleitonfco committed Aug 20, 2010
1 parent c57375c commit da9b4c6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion twifakes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
end

get "/tweet" do
status = t.message(@fakes)
client = TwitterOAuth::Client.new(:consumer_key => ENV["CONSUMER_KEY"], :consumer_secret => ENV["CONSUMER_SECRET"])
session[:access_token] = client.authorize(session[:request_token], session[:request_token_secret], :oauth_verifier => session[:oauth_verifier])
@fakes = (client.info["followers_count"].to_i/12).to_i
status = t.message(@fakes)
client.update(status) if client.authorized?
redirect "/?s=ok"
end
6 changes: 3 additions & 3 deletions views/index.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<h1><%= r18n.title %></h1>
<p id="calculate"><a href="/connect"><%= r18n.button %></a></p>
<p class="info"><%= r18n.info %></p>
<h1><%= t.title %></h1>
<p id="calculate"><a href="/connect"><%= t.button %></a></p>
<p class="info"><%= t.info %></p>
6 changes: 3 additions & 3 deletions views/layout.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="description" content="How many fakes follow you?" />
<meta name="keywords" content="Twitter, Fakes, Joke, Calculate, Twitter Fakes, Twitter service" />
<link rel="stylesheet" media="screen" href="/stylesheets/style.css" />
<title><%= r18n.title %> | Twifakes</title>
<title><%= t.title %> | Twifakes</title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
Expand Down Expand Up @@ -37,8 +37,8 @@
</section>

<footer>
<p id="message"><%= r18n.footer.message %></p>
<p id="locale"><%= r18n.footer.credit %> - <%= r18n.footer.locale %></p>
<p id="message"><%= t.footer.message %></p>
<p id="locale"><%= t.footer.credit %> - <%= t.footer.locale %></p>
</footer>
</body>
</html>
6 changes: 3 additions & 3 deletions views/show.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<h1><%= r18n.followers(@fakes) %></h1>
<p id="retweet"><%= r18n.retweet %></p>
<p class="info"><%= r18n.info %></p>
<h1><%= t.followers(@fakes) %></h1>
<p id="retweet"><%= t.retweet %></p>
<p class="info"><%= t.info %></p>

0 comments on commit da9b4c6

Please sign in to comment.