i18n for neopets_pages#new

This commit is contained in:
Emi Matchu 2012-12-30 17:07:29 -05:00
parent b32a3725bb
commit 50c9ad26e2
5 changed files with 210 additions and 49 deletions

View file

@ -27,7 +27,7 @@ class ClosetPage
end
def name
'closet'
I18n.translate('neopets_pages.names.closet')
end
def persisted?

View file

@ -10,7 +10,7 @@ class SafetyDepositPage < ClosetPage
}
def name
'SDB'
I18n.translate('neopets_pages.names.safety_deposit')
end
def url

View file

@ -1,57 +1,70 @@
- title "Import from #{@neopets_page.name}, Page #{@neopets_page.index}"
- title t('.title', :name => @neopets_page.name, :index => @neopets_page.index)
- content_for :before_flashes do
= link_to 'Back to Your Items', user_closet_hangers_path(current_user), :id => 'back-to-items'
= link_to t('.your_items_link'), user_closet_hangers_path(current_user), :id => 'back-to-items'
= form_for @neopets_page, :html => {:id => 'closet-page-form'} do |f|
= f.hidden_field :index
#closet-page-frame-wrapper
%span
%strong Page #{@neopets_page.index}
of your #{@neopets_page.name}
%strong
= t '.frame_header', :name => @neopets_page.name,
:index => @neopets_page.index
%iframe#closet-page-frame{:src => @neopets_page.url}
#closet-page-source
= f.label :source, "Paste source code below"
= f.label :source, t('.source_header')
= f.text_area :source
= f.submit 'Import items'
= f.submit t('.submit')
:markdown
**Welcome to the bulk #{@neopets_page.name} importer!** We're going to make it as
easy as possible to import your Neopets.com #{@neopets_page.name} data into your Dress to
Impress items list. Here's how it works.
- localized_cache :action_suffix => 'explanation' do
%p
= t '.help.welcome', :name => @neopets_page.name
= t '.help.intro', :name => @neopets_page.name
1. Check the framed Neopets.com window on the left, pointing to
[page #{@neopets_page.index} of your #{@neopets_page.name}][cp].
* **Confirm that you're logged in.** If you're logged into
Neopets, but the above frame says that you're not, try enabling
"third-party cookies" in your browser. (Most have that on by default.)
* **If you haven't logged in, #{link_to_neopets_login "do so in another window"}</a>.**
It's never a good idea to log in inside of a frame, unless you're a
web programmer pro who can check that the frame does, in fact, point
to Neopets.com. To be safe,
#{link_to_neopets_login "pull up another window, check the URL, and log in safely"}.
* **Confirm that the page is, in fact, your #{@neopets_page.name}.** Similarly, don't
just trust a website when they tell you to copy-paste the source code
of another site. Instead, check that the page is what it is supposed to
be and does not contain any information you didn't mean to give out.
%ol
%li
= t '.help.check_frame.header_html',
:page_link => link_to(t('.help.check_frame.page_link_content',
:name => @neopets_page.name,
:index => @neopets_page.index),
@neopets_page.url)
%ul
%li
%strong= t '.help.check_frame.check_login.summary'
= t '.help.check_frame.check_login.details'
%li
%strong
= t '.help.check_frame.login.summary_html',
:login_link => link_to_neopets_login(t('.help.check_frame.login.summary_login_link_content'))
= t '.help.check_frame.login.details_html',
:login_link => link_to_neopets_login(t('.help.check_frame.login.details_login_link_content'))
%li
%strong
= t '.help.check_frame.check_content.summary',
:name => @neopets_page.name
= t '.help.check_frame.check_content.details'
2. View the frame's source code.
* **In Google Chrome,** right-click the frame and choose **View Frame Source**.
* **In Firefox,** right-click the frame, choose **This Frame**, then **View Frame Source**.
* In other browsers, right-click, and look for something similar. If you're
still having trouble, try
#{link_to "viewing the page in a new window", @neopets_page.url, :target => "_blank"},
right-clicking, and choosing View Source.
%li
= t '.help.view_source.header'
%ul
%li
= t '.help.view_source.chrome_html'
%li
= t '.help.view_source.firefox_html'
%li
= t '.help.view_source.other_html'
%li
= t '.help.view_source.troubleshooting_html',
:page_link => link_to(t('.help.view_source.troubleshooting_page_link_content'),
@neopets_page.url)
3. Highlight the entire source code, and copy-paste it into the box on the right.
* Some nifty shortcuts: Ctrl-A to select all the text, Ctrl-C to copy it,
Ctrl-V to paste it in.
4. Submit!
* We'll analyze the code you sent us, grab exclusively the identity and
quantity of items in your #{@neopets_page.name}, and add that to your Dress to Impress
items list. I promise it's all safe, but, if you're concerned, find a
programmer buddy and [check out the source code to be sure][source].
[cp]: #{@neopets_page.url}
[source]: http://github.com/matchu/openneo-impress-rails
%li
= t '.help.copy_source.header'
%ul
%li
= t '.help.copy_source.shortcuts'
%li
= t '.help.submit.header'
%ul
%li
= t '.help.submit.description', :name => @neopets_page.name

View file

@ -144,6 +144,80 @@ en-meep:
we'll meep our datameep instantly. Meep!
swf_assets_not_found_modeling_link_content: meep it for us
neopets_pages:
names:
closet: meepit
safety_deposit: safety demeepit
new:
title: Meeport from %{name}, Page %{index}
your_items_link: Back to Your Meeps
frame_header: Meep %{index} of your %{name}
source_header: Meep source code below
submit: Meep items
help:
welcome: Welcome to the bulk %{name} meeporter!
intro:
We're going to meep it as easy as possible to meeport your
Neopets.com %{name} data into your Dress to Impress meepit list.
Here's how it meeps.
check_frame:
header_html:
Check the framed Neopets.com meep on the left,
meeping to %{page_link}.
page_link_content:
meep %{index} of your %{name}
check_login:
summary: Confirm that you're meeped in.
details:
If you're meeped into Neopets, but the above frame says that
you're not, try enabling "third-party cookies" in your browser.
(Most have meeped on by default.)
login:
summary_html: If you haven't meeped in, %{login_link}.
summary_login_link_content: do so in another meepit
details_html:
It's never a good idea to meep in inside of a frame, unless
you're a web programmer pro who can meep that the frame does, in
fact, meep to Neopets.com. To be safe, %{login_link}.
details_login_link_content:
meep up another window, meep the URL, and meep in safely
check_content:
summary: Meep that the page is, in fact, your %{name}.
details:
Don't just meep a website when they tell you to meepy-paste the
source code of another site. Instead, check that the meep is what
it is supposed to be and doesn't meep any private information.
view_source:
header: Meep the frame's source code.
chrome_html:
<strong>In Google Chrome</strong>, right-meep the frame and choose
<strong>View Frame Source</strong>.
firefox_html:
<strong>In Firefox</strong>, right-meep the frame, choose
<strong>This Frame</strong>, then <strong>View Frame
Source</strong>.
other_html:
In other meepits, right-meep and look for something similar.
troubleshooting_html:
If you're still having trouble, try %{page_link}, right-meeping,
and meeping View Source.
troubleshooting_page_link_content: meeping the page in a new window
copy_source:
header:
Meeplight the entire source code,
and meepy-paste it into the box on the right.
shortcuts:
"Some meepy shortcuts: Ctrl-A to select all the text, Ctrl-C to
copy it, Ctrl-V to paste it in."
submit:
header: Submeep!
description:
We'll analyze the meep you sent us, grab exclusively the identity
and quantity of meepits in your %{name}, and add that to your Dress
to Impress meepit list. I meep that it's all safe, but, if you're
concerned, find a meepit and meep out the source code to be sure.
neopets_users:
new:
title: Meemport from pets

View file

@ -146,6 +146,80 @@ en:
we'll update our database instantly. Thanks!
swf_assets_not_found_modeling_link_content: model it for us
neopets_pages:
names:
closet: closet
safety_deposit: safety deposit
new:
title: Import from %{name}, Page %{index}
your_items_link: Back to Your Items
frame_header: Page %{index} of your %{name}
source_header: Paste source code below
submit: Import items
help:
welcome: Welcome to the bulk %{name} importer!
intro:
We're going to make it as easy as possible to import your Neopets.com
%{name} data into your Dress to Impress items list. Here's how it
works.
check_frame:
header_html:
Check the framed Neopets.com window on the left,
pointing to %{page_link}.
page_link_content:
page %{index} of your %{name}
check_login:
summary: Confirm that you're logged in.
details:
If you're logged into Neopets, but the above frame says that
you're not, try enabling "third-party cookies" in your browser.
(Most have that on by default.)
login:
summary_html: If you haven't logged in, %{login_link}.
summary_login_link_content: do so in another window
details_html:
It's never a good idea to log in inside of a frame, unless you're
a web programmer pro who can check that the frame does, in fact,
point to Neopets.com. To be safe, %{login_link}.
details_login_link_content:
pull up another window, check the URL, and log in safely
check_content:
summary: Confirm that the page is, in fact, your %{name}.
details:
Don't just trust a website when they tell you to copy-paste the
source code of another site. Instead, check that the page is what
it is supposed to be and doesn't contain any private information.
view_source:
header: View the frame's source code.
chrome_html:
<strong>In Google Chrome</strong>, right-click the frame and choose
<strong>View Frame Source</strong>.
firefox_html:
<strong>In Firefox</strong>, right-click the frame, choose
<strong>This Frame</strong>, then <strong>View Frame
Source</strong>.
other_html:
In other browsers, right-click and look for something similar.
troubleshooting_html:
If you're still having trouble, try %{page_link}, right-clicking,
and choosing View Source.
troubleshooting_page_link_content: opening the page in a new window
copy_source:
header:
Highlight the entire source code,
and copy-paste it into the box on the right.
shortcuts:
"Some nifty shortcuts: Ctrl-A to select all the text, Ctrl-C to
copy it, Ctrl-V to paste it in."
submit:
header: Submit!
description:
We'll analyze the code you sent us, grab exclusively the identity
and quantity of items in your %{name}, and add that to your Dress
to Impress items list. I promise it's all safe, but, if you're
concerned, find a programmer buddy and check out the source code to
be sure.
neopets_users:
new:
title: Import from pets