diff --git a/locales/en.yml b/locales/en.yml index cc8c50c..70ab932 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -1,15 +1,15 @@ -index: - title: How many fakes follow you? - button: Calculate - followers: You have %1 fake followers - info: !!html - We don't store their data, our Heroku account not using storage space. - retweet: !!html - Tweet this - footer: - message: !!html - Twifakes uses OAuth for Authentication. This is designed to protect your account. You will be redirected to Twitter and asked to allow the Twifakes Application. Simply click Allow to use Twifakes. We promise not to misuse or abuse your account. - locale: !!html - Change language to Portuguese - credit: !!html - Twifakes is a open source application +title: How many fakes follow you? +button: Calculate +followers: You have %1 fake followers +message: "I have %1 fake followers, and you? http://twifakes.heroku.com/ #Twifakes" +info: !!html + We don't store their data, our Heroku account not using storage space. +retweet: !!html + Tweet this +footer: + message: !!html + Twifakes uses OAuth for Authentication. This is designed to protect your account. You will be redirected to Twitter and asked to allow the Twifakes Application. Simply click Allow to use Twifakes. We promise not to misuse or abuse your account. + locale: !!html + Change language to Portuguese + credit: !!html + Twifakes is a open source application diff --git a/locales/pt.yml b/locales/pt.yml index 29e8ad2..35c6325 100644 --- a/locales/pt.yml +++ b/locales/pt.yml @@ -1,15 +1,15 @@ -index: - title: Quantos fakes seguem você? - button: Calcular - followers: Você tem %1 seguidores fake - info: !!html - Nós não armazenamos seus dados, nossa conta no Heroku não está utilizando espaço para armazenamento. - retweet: !!html - Envie um Tweet - footer: - message: !!html - Para proteger sua conta o Twifakes usa OAuth na Autenticação. Você será redirecionado para o Twitter que perguntará se você dar permissão à aplicação Twifakes. Simplesmente clique em "Allow" para usar o Twifakes. Prometemos não fazer uso indevido ou abusar da sua conta. - locale: !!html - Mudar idioma para Inglês - credit: !!html - Twifakes é uma aplicação open source +title: Quantos fakes seguem você? +button: Calcular +followers: Você tem %1 seguidores fake +message: "Eu tenho %1 seguidores fake, e você? http://twifakes.heroku.com/ #Twifakes" +info: !!html + Nós não armazenamos seus dados, nossa conta no Heroku não está utilizando espaço para armazenamento. +retweet: !!html + Envie um Tweet +footer: + message: !!html + Para proteger sua conta o Twifakes usa OAuth na Autenticação. Você será redirecionado para o Twitter que perguntará se você dar permissão à aplicação Twifakes. Simplesmente clique em "Allow" para usar o Twifakes. Prometemos não fazer uso indevido ou abusar da sua conta. + locale: !!html + Mudar idioma para Inglês + credit: !!html + Twifakes é uma aplicação open source diff --git a/twifakes.rb b/twifakes.rb index e9e64fb..e7a14bd 100644 --- a/twifakes.rb +++ b/twifakes.rb @@ -37,9 +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 - client.update("I have #{(@fakes).to_i} fake followers, and you? http://twifakes.heroku.com/ #Twifakes") if client.authorized? + client.update(status) if client.authorized? redirect "/?s=ok" end \ No newline at end of file diff --git a/views/index.erb b/views/index.erb index 18b2ff2..6d4645e 100644 --- a/views/index.erb +++ b/views/index.erb @@ -1,3 +1,3 @@ -

<%= r18n.index.title %>

-

<%= r18n.index.button %>

-

<%= r18n.index.info %>

+

<%= r18n.title %>

+

<%= r18n.button %>

+

<%= r18n.info %>

diff --git a/views/layout.erb b/views/layout.erb index e222f61..bc5dd98 100644 --- a/views/layout.erb +++ b/views/layout.erb @@ -5,7 +5,7 @@ - <%= r18n.index.title %> | Twifakes + <%= r18n.title %> | Twifakes @@ -37,8 +37,8 @@ diff --git a/views/show.erb b/views/show.erb index baa5712..6d1ae5e 100644 --- a/views/show.erb +++ b/views/show.erb @@ -1,3 +1,3 @@ -

<%= r18n.index.followers(@fakes) %>

-

<%= r18n.index.retweet %>

-

<%= r18n.index.info %>

+

<%= r18n.followers(@fakes) %>

+

<%= r18n.retweet %>

+

<%= r18n.info %>