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

Use Proper Case for Statuses and Events on UI #72

Closed
raamdev opened this issue Dec 10, 2014 · 17 comments
Closed

Use Proper Case for Statuses and Events on UI #72

raamdev opened this issue Dec 10, 2014 · 17 comments
Assignees
Milestone

Comments

@raamdev
Copy link
Contributor

@raamdev raamdev commented Dec 10, 2014

While it's fine to use all lowercase for the statuses and events in the database (e.g., subscribed, unsubscribed, trashed, inserted, etc.) it would be nice to use proper case (Subscribed, Unsubscribed, Trashed, Inserted, etc.) on the front-end UI.

It feels a bit out of place to see everything else in the Subscriptions table and the Event Log using proper case except for the statuses and events:

2014-12-09_20-37-01

2014-12-09_20-42-40


Next Actions / Project Outline

See: https://quire.io/w/7C4cVjc0O3g2ZXK3OnQUG9eJ/Modify_i18n_Utilitie...

@jaswrks
Copy link

@jaswrks jaswrks commented Jun 17, 2015

@jaswrks
Copy link

@jaswrks jaswrks commented Aug 21, 2015

@kristineds You're welcome to give this one a shot if you'd like. It was outlined on Quire a while back and it's one that might be good practice. If you decide to tackle it just let me know and I can help if you need it.

@jaswrks
Copy link

@jaswrks jaswrks commented Aug 21, 2015

Be sure to expand the details "read more" link on Quire.
2015-08-21_08-10-52

@jaswrks
Copy link

@jaswrks jaswrks commented Aug 21, 2015

It's these steps only.

2015-08-21_08-11-46

@kristineds
Copy link
Contributor

@kristineds kristineds commented Aug 23, 2015

@jaswsinc I'm ready to work on this. Should I start with creating a feature branch for this issue and work on the "Modify i18n Utilities Class" step?

@kristineds
Copy link
Contributor

@kristineds kristineds commented Aug 23, 2015

@jaswsinc Submitting PR for CM Lite and Pro to Modify i18n Utilities Class

jaswrks pushed a commit to wpsharks/comment-mail-pro that referenced this issue Aug 24, 2015
jaswrks pushed a commit that referenced this issue Aug 24, 2015
Modify i18n Utilities Class; See #72
@jaswrks
Copy link

@jaswrks jaswrks commented Aug 24, 2015

Should I start with creating a feature branch for this issue and work on the "Modify i18n Utilities Class" step?

Perfect, yes. I merged your PRs for step one. Nice!

@kristineds kristineds added this to the Next Release milestone Aug 24, 2015
@kristineds
Copy link
Contributor

@kristineds kristineds commented Aug 24, 2015

@jaswsinc Cool! Could you please you give me some guidance on what to do on the next step ~ Update Codebase; i.e., Utility Calls (Run a search on the entire codebase for calls to those i18n utilities)? Thanks

@jaswrks
Copy link

@jaswrks jaswrks commented Aug 26, 2015

What you want to search for is i18n->action_ed(
See: https://atom.io/docs/v1.0.7/using-atom-find-and-replace

Note also, that in this file, there are still several other utilities that need to be converted in much the same way that you did with action_ed(); i.e., to add the $transform parameter and adjust the code to deal with the $transform parameter. See: this checklist item.

These are the methods that still need work:


Once each of these are converted, you will need to search the codebase to find areas where each of these have been used also, and update accordingly; e.g., i18n->status_label(, i18n->deliver_label(, and i18n->sub_type_label(

@kristineds
Copy link
Contributor

@kristineds kristineds commented Aug 31, 2015

@jaswsinc: Can you check this code when you get the chance before I send the PR for it? :) Thanks! https://gist.github.com/kristineds/72f15c4833dc102cb0f6

@kristineds
Copy link
Contributor

@kristineds kristineds commented Aug 31, 2015

@jaswsinc Submitting PRs for CM Lite and Pro to Update codebase for i18n utility calls:

jaswrks pushed a commit to wpsharks/comment-mail-pro that referenced this issue Aug 31, 2015
jaswrks pushed a commit that referenced this issue Aug 31, 2015
Update codebase for i18n utility calls; See #72
@jaswrks
Copy link

@jaswrks jaswrks commented Aug 31, 2015

@kristineds Merged both of those. Thank you!


Next Actions (Final Step)

  • New feature branch:

    $ cd ~/projects/websharks/comment-mail
    $ git checkout 000000-dev # Start from the dev branch.
    $ git pull # Make sure your local dev branch is up-to-date with the remote copy.
    $ git checkout -b feature/72-step-3 # New feature branch based on dev branch.
  • Search the codebase to find areas where each of those i18n utilities have been used; i.e., search for the word fragments:

    • i18n->action_ed(
    • i18n->status_label(
    • i18n->event_label(
    • i18n->deliver_label(
    • and i18n->sub_type_label(
  • Review Raam's request above and attempt to locate the i18n calls that correlate with the labels he suggested that we update. Many of those will be in files that end with -table.php or -table-base.php.

  • Mission: To update each of those i18n function calls, so that we pass the new $transform parameter you added, as ucwords (i.e., to force uppercase in first letter of each word). That way we will be displaying Unsubscribed, Trashed, Inserted, etc.. Instead of the all-lowercase labels that we have now.

    • For example. See these lines. They should be changed to the following:

      'status::unconfirmed' => $plugin->utils_i18n->status_label('unconfirmed', 'ucwords'),
      'status::subscribed'  => $plugin->utils_i18n->status_label('subscribed', 'ucwords'),
      'status::suspended'   => $plugin->utils_i18n->status_label('suspended', 'ucwords'),
      'status::trashed'     => $plugin->utils_i18n->status_label('trashed', 'ucwords'),

      Note that we are adding the $transform parameter; i.e., , 'ucwords'

@kristineds
Copy link
Contributor

@kristineds kristineds commented Sep 11, 2015

@jaswsinc Submitting PRs for CM Lite and Pro for Step 3

jaswrks pushed a commit to wpsharks/comment-mail-pro that referenced this issue Sep 11, 2015
jaswrks pushed a commit that referenced this issue Sep 11, 2015
Update codebase for i18n utility calls; See: #72
@jaswrks
Copy link

@jaswrks jaswrks commented Sep 11, 2015

@kristineds Merged both. Nice work! 💯

@raamdev
Copy link
Contributor Author

@raamdev raamdev commented Oct 8, 2015

Next Lite Release Changelog:

  • Enhancement: Improved the Subscriptions table and the Event Log UI by using proper case for Status and Event values. Props @kristineds. See Issue #72.
@raamdev
Copy link
Contributor Author

@raamdev raamdev commented Oct 8, 2015

Next Pro Release Changelog:

  • Enhancement: Improved the Subscriptions table and the Event Log UI by using proper case for Status and Event values. Props @kristineds. See Issue #72.
@wpsharks wpsharks locked and limited conversation to collaborators Dec 24, 2015
@raamdev
Copy link
Contributor Author

@raamdev raamdev commented Dec 24, 2015

Comment Mail v151224 has been released and includes changes from this GitHub Issue: See the v151224 announcement for further details.


This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#72).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants