Skip to content
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

Fix pluralization logic II #6809

Closed
sashadev-sky opened this issue Nov 18, 2019 · 5 comments · Fixed by #6811
Closed

Fix pluralization logic II #6809

sashadev-sky opened this issue Nov 18, 2019 · 5 comments · Fixed by #6811

Comments

@sashadev-sky
Copy link
Contributor

@sashadev-sky sashadev-sky commented Nov 18, 2019

First Time?

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.

The problem

image

The pluralization in the screenshot above is incorrect (ie. should be "1 person" not "1 people")

Solution

This is a simple one -- lets find the relevant line of code first:

<div class="im d-none d-md-block" id="wiki-empty1">
<div class="bottom-right"><%= Tag.follower_count(params[:id]) %> people discussing</div>
</div>
<div class="im d-sm-none" id="wiki-empty2">
<div class="bottom-right"><%= Tag.follower_count(params[:id]) %> people discussing</div>
</div>

As you can see, this line has no conditional and people will always just be plural.

Let's correct this: - Rails gives us a really convenient way to resolve it through the pluralize method.

Update both div elements to the following:

 <div class="bottom-right"><%= pluralize(Tag.follower_count(params[:id]), 'person') %> discussing</div>

Thanks!!

Step by Step

  • Claim this issue with a comment here, below, and ask any clarifying questions you need
  • Fork the repository and set it up locally following the main repo README instructions https://github.com/publiclab/plots2
  • Create a new feature branch with a unique name descriptive to the issue
  • Try to fix the issue following the steps above, but even before you're done, you can:
    commit your changes to your branch and start a pull request (see contributing to Public Lab software) but mark it as "in progress" if you have questions or if you haven't finished
  • Reference this issue in your pull request body
  • Once you submit your pull request, an additional checklist will be provided for getting it merged

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.

💬 Get help

If you need any help - here are some options:

@sashadev-sky

This comment has been minimized.

Copy link
Contributor Author

@sashadev-sky sashadev-sky commented Nov 18, 2019

assigned to @ChamuMutezva!

@gireeshcse

This comment has been minimized.

Copy link
Contributor

@gireeshcse gireeshcse commented Nov 19, 2019

Hi @sashadev-sky I wanted to fix this issue.

@gireeshcse gireeshcse mentioned this issue Nov 19, 2019
4 of 5 tasks complete
@ChamuMutezva

This comment has been minimized.

Copy link
Contributor

@ChamuMutezva ChamuMutezva commented Nov 19, 2019

@sashadev-sky , have followed the steps to fix "pluralization logic II #6809", please check and update me on corrections or way forward

@sashadev-sky

This comment has been minimized.

Copy link
Contributor Author

@sashadev-sky sashadev-sky commented Nov 21, 2019

@ChamuMutezva you need to open a pull request. Here are the steps

  1. Fork the main repo from the main page https://github.com/publiclab/Leaflet.DistortableImage, otherwise you'll only get anonymous credit
  2. clone your forked version by clicking the "clone or download" button - copy paste the url given and use the command $ git clone <paste_url> locally
  3. Follow the README instructions for any local setup
  4. Make your changes on a new feature branch (create this with $ git checkout -b <new_branch_name and use $ git branch to make sure you are on this branch)
  5. $ git push origin <new_branch_name to submit a pull request then visit the main repo page on Github and you'll see a prompt to create your PR

Let me know if you have more questions :)

Tag me for a review there once you do this!

@ChamuMutezva ChamuMutezva mentioned this issue Nov 21, 2019
5 of 5 tasks complete
@ChamuMutezva

This comment has been minimized.

Copy link
Contributor

@ChamuMutezva ChamuMutezva commented Nov 21, 2019

@sashadev-sky , i created a pull request that is waiting to be approved and the review. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.