New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internationalize and add Japanese translation #129

Merged
merged 11 commits into from Oct 18, 2017
Copy path View file
@@ -6,6 +6,7 @@ Want to contribute to Open Source Friday? That's great! Here are a couple of gui
* [Contribution workflow](#contribution-workflow)
* [Setup instructions](#setup-instructions)
* [Localisation](#localisation)
* [Reporting a bug](#reporting-a-bug)
* [Additional info](#additional-info)
@@ -20,6 +21,16 @@ Want to contribute to Open Source Friday? That's great! Here are a couple of gui
You can find in-depth instructions to install the correct Ruby version, Postgres, and to set up the database in our [README](https://github.com/ossfriday/ossfriday/blob/master/README.md#getting-started).
## Localisation
* Fork the project.
* Clone your fork to your machine.
* Create a new branch for your translation work.
* Copy `config/locale/en.yml` to target locale file e.g. `config/locale/es.yml`.
* Add target language in `config/initializers/locale.rb`:`I18n.available_locales = %i[en, ja]`
* Translate messages in new locale file.
* Send a pull request.
## Reporting a bug
So you've found a bug, and want to help us fix it? Before filing a bug report, please double-check the bug hasn't already been reported. You can do so [on our issue tracker](https://github.com/ossfriday/ossfriday/issues?q=is%3Aissue+is%3Aopen+label%3Abug). If something hasn't been raised, you can go ahead and create a new issue with the following information:
@@ -1,5 +1,5 @@
<% content_for(:title, "Your business runs on open source software") %>
<% content_for(:description, "Once a week, every week. Take time to invest in the open source software you use and love.") %>
<% content_for(:title, t("business.title")) %>
<% content_for(:description, t("business.description")) %>
<div class="bg-gray mb-6 border-bottom jumbotron px-3">
<div class="container-lg px-3">
@@ -12,7 +12,7 @@
<p class="alt-lead text-gray mb-md-5"><%= nbsp_last_word(yield(:description)) %></p>
<% unless current_user %>
<%= link_to user_github_omniauth_authorize_path, class: "btn btn-large btn-primary", role: "button" do %>
Sign up with GitHub
<% t("Sign up with GitHub") %>
<% end %>
<% end %>
</div>
@@ -21,49 +21,48 @@
</div>
<div class="container-lg py-6 py-3 px-3 text-center">
<h2 class="alt-h2">Your business depends on it</h2>
<h2 class="alt-h2"><%=t "business.reason.title" %></h2>
<p class="alt-lead text-gray mx-auto text-center mb-6">
Companies need open source software to run effectively.
<%=t "business.reason.description" %>
</p>
</div>
<div class="container-lg mx-auto gut-lg text-center">
<div class="mb-6 col-md-6 float-md-left">
<%= image_tag("improve-technology.svg", class: "img-responsive mb-3", height: "100px") %>
<h3 class="alt-h3 mb-2">Improve the technology you rely on</h3>
<h3 class="alt-h3 mb-2"><%=t "business.reason.technology.title" %></h3>
<p class="text-gray">
Direct participation in open source gives your organization a voice in the software you depend on.
<%=t "business.reason.technology.description" %>
</p>
</div>
<div class="mb-6 col-md-6 float-md-left">
<%= image_tag("work-better.svg", class: "img-responsive mb-3", height: "100px") %>
<h3 class="alt-h3 mb-2">Work better together</h3>
<h3 class="alt-h3 mb-2"><%=t "business.models.title" %></h3>
<p class="text-gray">
Open source development models are at the forefront of software collaboration. Developers who work on open source learn intuitively to improve quality, speed, and transparency at your organization.
<%=t "business.models.description" %>
</p>
</div>
</div>
<div class="container-lg mx-auto gut-lg text-center pb-6">
<div class="mb-6 col-md-6 float-md-left">
<%= image_tag("reduce-overhead.svg", class: "img-responsive mb-3", height: "100px") %>
<h3 class="alt-h3 mb-2">Reduce overhead</h3>
<h3 class="alt-h3 mb-2"><%=t "business.cost.title" %></h3>
<p class="text-gray">
Contributing regularly to open source saves money and developer hours by reducing the custom software you need to maintain.
<%=t "business.cost.description" %>
</p>
</div>
<div class="mb-6 col-md-6 float-md-left">
<%= image_tag("attract-talent.svg", class: "img-responsive mb-3", height: "100px") %>
<h3 class="alt-h3 mb-2">Attract and retain talent</h3>
<h3 class="alt-h3 mb-2"><%=t "business.reputation.title" %></h3>
<p class="text-gray">
Employees that work on open source boost their, and their employer's, reputation.
<%=t "business.reputation.description" %>
</p>
</div>
</div>
<div class="border-top py-5 bg-gray-light">
<div class="py-4 py-md-6 container-lg px-3">
<h2 class="alt-h2 lh-condensed mb-2 text-center">Open Source Friday in your organization</h2>
<p class="alt-lead text-gray mx-auto text-center mb-md-6 col-md-8">Improving your developer culture is too important to be left unplanned.</p>
<h2 class="alt-h2 lh-condensed mb-2 text-center"><%=t "business.plan.title" %></h2>
<p class="alt-lead text-gray mx-auto text-center mb-md-6 col-md-8"><%=t "business.plan.description" %></p>
<div class="py-6 px-3 d-flex flex-wrap flex-justify-between gut-lg">
@@ -73,9 +72,9 @@
<%= image_tag("set-aside-time.svg", class: "img-responsive mb-3", width: "100px") %>
</div>
<div class="overflow-hidden">
<h3 class="alt-h3 mb-2">Set aside time</h3>
<h3 class="alt-h3 mb-2"><%=t "business.plan.encourage.title" %></h3>
<p class="text-gray">
Each Friday, encourage your managers, employees, and coworkers to spend at least two hours working on the open source projects your organization already uses.
<%=t "business.plan.encourage.description" %>
</p>
</div>
</div>
@@ -84,9 +83,9 @@
<%= image_tag("make-habit.svg", class: "img-responsive mb-3", width: "100px") %>
</div>
<div class="overflow-hidden">
<h3 class="alt-h3 mb-2">Make it a habit</h3>
<h3 class="alt-h3 mb-2"><%=t "business.plan.policy.title" %></h3>
<p class="text-gray">
Create clear, internal policies so employees can easily and consistently contribute to open source.
<%=t "business.plan.policy.description" %>
</p>
</div>
</div>
@@ -103,24 +102,26 @@
<div class="border-top py-5">
<div class="container-lg px-3">
<h2 class="alt-h2 mt-6 text-center">You're in good company</h2>
<h2 class="alt-h2 mt-6 text-center"><%=t "endorsement.title" %></h2>
<div class="mt-3 pb-6">
<div class="d-flex flex-wrap flex-items-stretch gut-md">
<div class="col-md-6">
<aside class="pquote height-full">
<img src="https://avatars.githubusercontent.com/caabernathy?s=180" class="pquote-avatar" alt="avatar">
Open source aligns with our mission to make the world more open and connected. Working with the community gives us an opportunity to share our work and the challenges we’re aiming to solve, and encourages talented people to contribute their ideas and effort to move the world forward.
<%=t "endorsement.Christine_Abernathy.message_html" %>
<p markdown="1" class="pquote-credit">
&mdash; Christine Abernathy (<a href="https://github.com/caabernathy">@caabernathy</a>),<br>Open Source at <a href="https://github.com/facebook">Facebook</a>
&mdash;<%=t("endorsement.Christine_Abernathy.name_html", url: link_to("@caabernathy", "https://github.com/caabernathy")) %><br>
<%=t("endorsement.Christine_Abernathy.title_html", company_url: link_to("Facebook", "https://github.com/facebook/")) %>
</p>
</aside>
</div>
<div class="col-md-6">
<aside class="pquote height-full">
<img src="https://avatars.githubusercontent.com/willnorris?s=180" class="pquote-avatar" alt="avatar">
Contributing to open source projects continues to be one of the most popular 20% projects for Google engineers. Open source plays such an important role in so much of what we do, so we try to make <a href="https://opensource.google.com/docs/patching/">the process</a> as easy as possible.
<%=t "endorsement.Will_Norris.message_html" %>
<p markdown="1" class="pquote-credit">
&mdash; Will Norris (<a href="https://github.com/willnorris">@willnorris</a>),<br>Open Source at <a href="https://github.com/google">Google</a>
&mdash;<%=t("endorsement.Will_Norris.name_html", url: link_to("@willnorris", "https://github.com/willnorris")) %><br>
<%=t("endorsement.Will_Norris.title_html", company_url: link_to("Google", "https://github.com/google")) %>
</p>
</aside>
</div>
@@ -144,16 +145,16 @@
<div class="d-flex flex-column flex-sm-row mx-2 my-6">
<div class="col-lg-4 mx-auto">
<h2 class="alt-h3 my-2">
<a href="/#participate">Contributors<%= octicon 'chevron-right', height: '20', class: 'ml-2 v-align-middle' %></a>
<a href="/#participate"><%=t "Contributors" %><%= octicon 'chevron-right', height: '20', class: 'ml-2 v-align-middle' %></a>
</h2>
<p class="text-gray f4">Your business runs on open source. Learn how to get involved.</p>
<p class="text-gray f4"><%=t "headline.contributors" %></p>
</div>
<div class="col-lg-4 mx-auto">
<h2 class="alt-h3 my-2">
<a href="/maintainers">Maintainers<%= octicon 'chevron-right', height: '20', class: 'ml-2 v-align-middle' %></a>
<a href="/maintainers"><%=t "Maintainers" %><%= octicon 'chevron-right', height: '20', class: 'ml-2 v-align-middle' %></a>
</h2>
<p class="text-gray f4">Give your project some love to help others contribute where you need it most.</p>
<p class="text-gray f4"><%=t "headline.maintainers" %></p>
</div>
</div>
</div>
Copy path View file
@@ -1,14 +1,14 @@
<% content_for(:full_title, "Open Source Friday | This Friday, invest a few hours contributing to the software you use and love.") %>
<% content_for(:title, "Open Source Friday") %>
<% content_for(:description, "Open source is made by people just like you. This Friday, invest a few hours contributing to the software you use and love.") %>
<% content_for(:full_title_desc, t("full_title_desc")) %>
<% content_for(:title, t("Open Source Friday")) %>
<% content_for(:description, t("full_description")) %>
<header class="jumbotron text-center bg-gray px-3 pb-0">
<div class="container-lg position-relative">
<h1 class="alt-h0 mb-2"><%= yield :title %></h1>
<p class="alt-lead text-gray mb-md-5 col-md-8 mx-auto"><%= nbsp_last_word(yield(:description)) %></p>
<% unless current_user %>
<%= link_to user_github_omniauth_authorize_path, class: "btn btn-large btn-primary mb-md-4", role: "button" do %>
Sign up with GitHub
<% t("Sign up with GitHub") %>
<% end %>
<% end %>
<%= image_tag("oss-bike.svg", class: "img-responsive bike-animate-in mt-4 mt-md-6 mb-n2") %>
@@ -18,7 +18,7 @@
<div class="border-top py-6 px-3 bg-gray-light" id="participate">
<div class="container-lg px-3 py-6">
<h2 class="alt-h2 text-center mb-3">Contribute on Open Source Friday</h2>
<h2 class="alt-h2 text-center mb-3"><%=t "index.main.title" %></h2>
<div class="d-md-table direction-md-ltr mb-6 py-6 border-bottom">
<div class="d-md-table-cell v-align-middle col-md-6 text-center">
@@ -27,75 +27,73 @@
</a>
</div>
<div class="d-md-table-cell v-align-middle col-md-6 direction-md-ltr pl-md-6">
<h3 class="alt-h3 mb-2">Learn to contribute</h3>
<h3 class="alt-h3 mb-2"><%=t "index.main.contribution" %></h3>
<p class="text-gray f4 mb-3">
Learn what it means to contribute, and how to find and get started on a new project.
<%=t "headline.contributors" %>
</p>
<p>
<a class="" href="https://opensource.guide/how-to-contribute/">
Read the guide<%= octicon 'chevron-right', height: '18', class: 'ml-2 v-align-middle' %>
</a>
<%=t "index.main.link_html", url:"https://opensource.guide/how-to-contribute/",
icon: octicon('chevron-right', height: '18', class: 'ml-2 v-align-middle') %>
</p>
<p>
</p>
</div>
</div>
<h3 class="alt-h3 mb-2">Find a project to contribute to</h3>
<h3 class="alt-h3 mb-2"><%=t "index.find.title" %></h3>
<p class="alt-lead f2 text-gray">
Contributing to open source happens at all levels, across projects and design, documentation, operations and code. You don’t need to overthink what exactly your first contribution will be, or how it will look.
<%=t "index.find.description" %>
</p>
<div class="d-md-flex gut-md my-6">
<div class="col-md-4 mb-6">
<h4 class="mb-2">A project you already use</h4>
<p class="text-gray">Start by thinking about the projects you already use or want to use. The projects you’ll actively contribute to are the ones you find yourself coming back to.</p>
<h4 class="mb-2"><%=t "index.find.used.title" %></h4>
<p class="text-gray">
<%=t "index.find.used.description" %>
</p>
</div>
<div class="col-md-4 mb-6">
<h4 class="mb-2">An issue you can fix</h4>
<h4 class="mb-2"><%=t "index.find.issue.title" %></h4>
<p class="text-gray">Check out these sites to find a project looking for your help:</p>
<p class="text-gray"><%=t "index.find.issue.description" %></p>
<ul class="ml-3">
<li><a href="https://yourfirstpr.github.io/">Your First PR</a></li>
<li><a href="http://up-for-grabs.net/">Up For Grabs</a></li>
<li><a href="https://www.codetriage.com/">CodeTriage</a></li>
<li><a href="https://yourfirstpr.github.io/"><%=t "index.find.first" %></a></li>
<li><a href="http://up-for-grabs.net/"><%=t "index.find.grabs" %></a></li>
<li><a href="https://www.codetriage.com/"><%=t "index.find.triage" %></a></li>
</ul>
</div>
<div class="col-md-4 mb-6">
<h4 class="mb-2">A warm welcome</h4>
<h4 class="mb-2"><%=t "index.find.welcome.title" %></h4>
<p>
Find a project that has a history and reputation for being welcoming to new contributors in
<a href="https://github.com/showcases/great-for-new-contributors">GitHub's great for new contributors</a> showcase.</p>
<p><%= t("index.find.welcome.description_html", url:"https://github.com/showcases/great-for-new-contributors") %></p>
</div>
</div>
</div>
</div>
<div class="border-top py-5">
<div class="container-lg">
<h2 class="alt-h2 mt-6 text-center">You're in good company</h2>
<h2 class="alt-h2 mt-6 text-center"><%=t "endorsement.title" %></h2>
<div class="mt-3 pb-6">
<div class="d-flex flex-wrap flex-items-stretch gut-md">
<div class="col-md-6">
<aside class="pquote height-full">
<img src="https://avatars.githubusercontent.com/kmcrayton7?s=180" class="pquote-avatar" alt="avatar">
Contributing to open source not only allows businesses of every size to take advantage and build upon the talents of others, it’s also an avenue for those new to coding to acclimate themselves to the development process in ways that allow them to practice, experiment, and showcase themselves as valuable and contributing members of the community.
<%=t "endorsement.Kim_Crayton.message_html" %>
<p markdown="1" class="pquote-credit">
&mdash; Kim Crayton (<a href="https://github.com/kmcrayton7">@kmcrayton7</a>),<br>Community Engineer, Writer, Founder
&mdash; <%=t("endorsement.Kim_Crayton.name_html") %> <br>
<%=t("endorsement.Kim_Crayton.title_html", url: link_to("@kmcrayton7", "https://github.com/kmcrayton7")) %>
</p>
</aside>
</div>
<div class="col-md-6">
<aside class="pquote height-full">
<img src="https://avatars.githubusercontent.com/lamby?s=180" class="pquote-avatar" alt="avatar">
I got to where I am today by contributing to open source software, allowing me to not only improve my skills as a software developer but also to increase my network of colleagues and to meet new and interesting friends from extremely diverse cultures. I can highly recommend it.
<%=t "endorsement.Chris_Lamb.message_html" %>
<p markdown="1" class="pquote-credit">
&mdash; Chris Lamb (<a href="https://github.com/lamby">@lamby</a>),<br><a href="https://www.debian.org">Debian Project</a> Leader
&mdash; <%=t("endorsement.Chris_Lamb.name_html", url: link_to("@lamby", "https://github.com/lamby")) %><br>
<%= t("endorsement.Chris_Lamb.title_html", company_url: link_to("Debian Project", "https://www.debian.org")) %>
</p>
</aside>
</div>
@@ -109,16 +107,16 @@
<div class="d-flex flex-column flex-sm-row mx-2 my-6">
<div class="col-lg-4 mx-auto">
<h2 class="alt-h3 my-2">
<a href="/businesses">Businesses<%= octicon 'chevron-right', height: '20', class: 'ml-2 v-align-middle' %></a>
<a href="/businesses"><%=t "Businesses" %><%= octicon 'chevron-right', height: '20', class: 'ml-2 v-align-middle' %></a>
</h2>
<p class="text-gray f4">Your business runs on open source. Learn how to get involved.</p>
<p class="text-gray f4"><%=t "headline.businesses" %></p>
</div>
<div class="col-lg-4 mx-auto">
<h2 class="alt-h3 my-2">
<a href="/maintainers">Maintainers<%= octicon 'chevron-right', height: '20', class: 'ml-2 v-align-middle' %></a>
<a href="/maintainers"><%=t "Maintainers" %><%= octicon 'chevron-right', height: '20', class: 'ml-2 v-align-middle' %></a>
</h2>
<p class="text-gray f4">Give your project some love to help others contribute where you need it most.</p>
<p class="text-gray f4"><%=t "headline.maintainers" %></p>
</div>
</div>
</div>
Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.