plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

Change function t to translation in app/views/notes/show.html.erb

Open nicoleiocana opened this issue 6 years ago • 7 comments

Hi, this is a first-timers-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.

If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!

We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you 💝

If you have contributed before, consider leaving this one for someone new, and looking through our general help wanted issues. Thanks!

🤔 What you will need to know.

Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.

📋 Step by Step

  • [ ] 🙋 Claim this issue: Comment below. If someone else has claimed it, ask if they've opened a pull request already and if they're stuck -- maybe you can help them solve a problem or move it along!

  • [ ] 📝 Update the file app/views/notes/show.html.erb in the plots2 repository (press the little pen Icon) and edit the line as shown below.

See this page for some help in taking your first steps!

Below is a "diff" showing in red (and a -) which lines to remove, and in green (and a +) which lines to add:

- 4: <% if current_user && @node.tags.length == 0 %><div class="alert alert-warning"><%= raw t('notes.show.note_no_tags', url: 'javascript: $(".tag-input").focus();') %></div><% end %>
+ 4: <% if current_user && @node.tags.length == 0 %><div class="alert alert-warning"><%= raw translation('notes.show.note_no_tags', url: 'javascript: $(".tag-input").focus();') %></div><% end %>

- 6: <% if @node.has_power_tag('replication') %><div class="alert alert-info"><%= raw t('notes.show.replication') %> <a href="/n/<%= @node.power_tag('replication') %>"><%= raw t('notes.show.replication_link') %></a>.</div><% end %>
+ 6: <% if @node.has_power_tag('replication') %><div class="alert alert-info"><%= raw translation('notes.show.replication') %> <a href="/n/<%= @node.power_tag('replication') %>"><%= raw translation('notes.show.replication_link') %></a>.</div><% end %>

- 7: <% if @node.has_power_tag('series') %><div class="alert alert-info"><%= raw t('notes.show.series') %> <a href="/tag/series:<%= @node.power_tag('series') %>"><%= @node.power_tag('series') %></a>.</div><% end %>
+ 7: <% if @node.has_power_tag('series') %><div class="alert alert-info"><%= raw translation('notes.show.series') %> <a href="/tag/series:<%= @node.power_tag('series') %>"><%= @node.power_tag('series') %></a>.</div><% end %>

- 8: <% if @node.has_power_tag('build') %><div class="alert alert-info"><%= raw t('notes.show.build') %> <a href="/n/<%= @node.power_tag('build') %>"><%= raw t('notes.show.build_link') %></a>.</div><% end %>
+ 8: <% if @node.has_power_tag('build') %><div class="alert alert-info"><%= raw translation('notes.show.build') %> <a href="/n/<%= @node.power_tag('build') %>"><%= raw t('notes.show.build_link') %></a>.</div><% end %>

- 28: <% if @node.status == 0 || @node.status == 4 %><span class="badge badge-danger"><%= t('notes.show.unpublished') %></span> | <% end %>
+ 28: <% if @node.status == 0 || @node.status == 4 %><span class="badge badge-danger"><%= translation('notes.show.unpublished') %></span> | <% end %>

- 57: <p style="color:#aaa;"><i style="color:#db4;" class="fa fa-large fa fa-star-o"></i> <i><%= raw t('notes.show.barnstar_awarded_to_by', :url1 => "/profile/"[email protected], :author => @node.author.name, :url2 => "/wiki/barnstars#"+tag.name.split('-').each{|w| w.capitalize!}.join('+'), :barnstar => tag.name.split(':').last.split('-').each{|w| w.capitalize!}.join(' '), :url3 => "/profile/"+tag.author.username, :awarder => tag.author.username) %></i></p>
+ 57: <p style="color:#aaa;"><i style="color:#db4;" class="fa fa-large fa fa-star-o"></i> <i><%= raw translation('notes.show.barnstar_awarded_to_by', :url1 => "/profile/"[email protected], :author => @node.author.name, :url2 => "/wiki/barnstars#"+tag.name.split('-').each{|w| w.capitalize!}.join('+'), :barnstar => tag.name.split(':').last.split('-').each{|w| w.capitalize!}.join(' '), :url3 => "/profile/"+tag.author.username, :awarder => tag.author.username) %></i></p>

- 70: <%= raw t('notes.show.file_table') %>
+ 70: <%= raw translation('notes.show.file_table') %>

- 99: <i class="fa fa-calendar"></i> <%= raw t('notes.show.event_is_on', :date => @node.power_tag('date')) %> <% end %></b>
+ 99: <i class="fa fa-calendar"></i> <%= raw translation('notes.show.event_is_on', :date => @node.power_tag('date')) %> <% end %></b>

- 100: <a class="label" onClick="cal.download()"><%= t('notes.show.ical') %></a>
+ 100: <a class="label" onClick="cal.download()"><%= translation('notes.show.ical') %></a>

- 102: <p><% if !current_user %><%= raw t('notes.show.login_to', :url1 => new_user_session_path( return_to: request.path )) %> <% end %><a class="btn-lg btn-primary" href="/rsvp/<%= @node.id %>">RSVP</a>
+ 102: <p><% if !current_user %><%= raw translation('notes.show.login_to', :url1 => new_user_session_path( return_to: request.path )) %> <% end %><a class="btn-lg btn-primary" href="/rsvp/<%= @node.id %>">RSVP</a>

- 105: <%= t('notes.show.people_will_attend', :count => attendees).html_safe %>
+ 105: <%= translation('notes.show.people_will_attend', :count => attendees).html_safe %>
  • [ ] 💾 Commit your changes

  • [ ] 🔀 Start a Pull Request. There are two ways how you can start a pull request:

  1. If you are familiar with the terminal or would like to learn it, here is a great tutorial on how to send a pull request using the terminal.

  2. You can also edit files directly in your browser and open a pull request from there.

  • [ ] 🏁 Done Ask in comments for a review :)

Please keep us updated

💬⏰ - We encourage contributors to be respectful to the community and provide an update within a week of claiming a first-timers-only issue. We're happy to keep it assigned to you as long as you need if you update us with a request for more time or help, but if we don't see any activity a week after you claim it we may reassign it to give someone else a chance. Thank you in advance!

If this happens to you, don't sweat it! Grab another open issue.

Is someone else already working on this?

🔗- We encourage contributors to link to the original issue in their pull request so all users can easily see if someone's already started on it.

👥- If someone seems stuck, offer them some help! Otherwise, take a look at some other issues you can help with. Thanks!

🤔❓ Questions?

Leave a comment below!

nicoleiocana avatar Mar 28 '20 22:03 nicoleiocana

I want to claim this issue

hiteshvijayhv avatar Mar 30 '20 12:03 hiteshvijayhv

@hiteshhv I like the enthusiasm! You have claimed it.

nicoleiocana avatar Mar 30 '20 13:03 nicoleiocana

@hiteshhv I saw that you closed your PR #7755. Up top, I noticed that it showed

hiteshhv wants to merge 1 commit into publiclab:master from unknown repository

this exact thing happened to me when I was first contributing: it was because I deleted my forked repo AFTER I submitted a PR. If you would still like to complete this issue, you can refork the repo, then do exactly when you did before, and submit a new PR but keep everything else the same. Would you like to do that?

nicoleiocana avatar Mar 31 '20 01:03 nicoleiocana

can I claim this issue?

Alpha-yoyo avatar Apr 04 '20 20:04 Alpha-yoyo

@Alpha-yoyo Yes. I think a reasonable amount of time has passed. And, since I did not hear back from @hiteshhv , it is only fair to allow you an opportunity.

nicoleiocana avatar Apr 04 '20 20:04 nicoleiocana

Hi @nicoleiocana , when I opened the file, the t has already been changed into translation.

Alpha-yoyo avatar Apr 04 '20 20:04 Alpha-yoyo

You are right. Guess someone else must have completed this issue on a different pull request and forgot to link it to this issue number. Sorry about the confusion.

I'll close this issue. I just checked my first-timers-only issues & this was the last one 🙁. Sorry.

nicoleiocana avatar Apr 04 '20 20:04 nicoleiocana