How to use the inflected.humanize function in inflected

To help you get started, we’ve selected a few inflected examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github neinteractiveliterature / intercode / app / javascript / EventsApp / SignupAdmin / SignupUtils.js View on Github external
export function formatBucket(signup, event) {
  const { bucket_key: bucketKey } = signup;

  if (!signup.counted) {
    if (bucketKey) {
      return `${findBucket(bucketKey, event.registration_policy).name} (not counted)`;
    }

    if (event.team_members
      .some((teamMember) => teamMember.user_con_profile.id === signup.user_con_profile.id)
    ) {
      return `${humanize(underscore(event.event_category.team_member_name))} (not counted)`;
    }

    if (signup.state === 'waitlisted') {
      const requestedBucket = findBucket(signup.requested_bucket_key, event.registration_policy);
      if (requestedBucket) {
        return `Waitlisted (requested ${requestedBucket.name})`;
      }

      return 'Waitlisted (no preference)';
    }

    return 'Not counted';
  }

  const bucket = findBucket(bucketKey, event.registration_policy);
  const requestedBucket = findBucket(signup.requested_bucket_key, event.registration_policy);
github neinteractiveliterature / intercode / app / javascript / EventsApp / SignupAdmin / RunSignupSummary.jsx View on Github external
return (
      
        
          {signup.user_con_profile.name_inverted}
          {
            isTeamMember(signup, teamMembers)
              ? (
                <strong>
                  {' ('}
                  {humanize(underscore(teamMemberName))}
                  {')'}
                </strong>
              )
              : null
          }
        
        
          {humanize(signup.state)}
          {waitlistPosition}
          {suffix}
        
      
    );
  };
github neinteractiveliterature / intercode / app / javascript / EventsApp / SignupAdmin / SignupUtils.js View on Github external
export function formatSignupStatus(signup, event) {
  if (signup.state === 'confirmed') {
    return formatBucket(signup, event);
  }

  const requestedBucket = findBucket(signup.requested_bucket_key, event.registration_policy);

  if (requestedBucket) {
    return `${humanize(signup.state)} (requested ${requestedBucket.name})`;
  }

  return humanize(signup.state);
}
github neinteractiveliterature / intercode / app / javascript / UserConProfiles / UserConProfilesTable.jsx View on Github external
function TicketStatusCell({ value }) {
  if (!value) {
    return 'Unpaid';
  }

  return humanize(value.ticket_type.name);
}
github neinteractiveliterature / intercode / app / javascript / EventsApp / EventPage / ShortFormEventDetails.jsx View on Github external
<dt>{item.public_description}</dt>
          <dd>
            
          </dd>
        
      ))}
      {
        displayTeamMembers.length &gt; 0
          ? (
            &lt;&gt;
              <dt>{pluralize(humanize(underscore(event.event_category.team_member_name)))}</dt>
              <dd>
                <ul>
                  {displayTeamMembers.map((teamMember) =&gt; (
                    <li>
                      {teamMember.user_con_profile.name_without_nickname}
                      {
                        teamMember.email
                          ? (
                            &lt;&gt;
                              {' '}
                              (
                              <a href="{`mailto:${teamMember.email}`}">
                                {teamMember.email}
                              </a>
                              )
                            </li></ul></dd>
github neinteractiveliterature / intercode / app / javascript / Store / AdminProductCard.jsx View on Github external
{product.payment_options.map((paymentOption) =&gt; (
          <i title="{humanize(paymentOption)}">
        ))}
      </i>
github neinteractiveliterature / intercode / app / javascript / FormAdmin / FormItemTools.jsx View on Github external
function StandardItemMetadata() {
  const { formType } = useContext(FormEditorContext);
  const { standardItem } = useContext(FormItemEditorContext);

  return (
    &lt;&gt;
      <div>
        <i>
        {' '}
        <strong>{standardItem.description || humanize(standardItem.identifier)}</strong>
      </i></div><i>
      <div>
        <small>
          Standard item for
          {' '}
          {pluralize(formType.description)}
        </small>
      </div>
    
  );
}
</i>
github neinteractiveliterature / intercode / app / javascript / BuiltInFormControls / EventCategorySelect.jsx View on Github external
.map((category) =&gt; (
      <option value="{category.id}">{humanize(category.name)}</option>
    ));
github neinteractiveliterature / intercode / app / javascript / EventsApp / SignupAdmin / RunEmailList.jsx View on Github external
return [...currentIncludes].sort().map((include) => {
              if (include === 'teamMembers') {
                return humanize(underscore(pluralize(
                  data.event.event_category.team_member_name,
                )));
              }

              return humanize(underscore(include));
            }).join(', ');
          }}
github neinteractiveliterature / intercode / app / javascript / NavigationBar / TicketPurchaseNavigationItem.jsx View on Github external
if (!ticketTypes.some((ticketType) =&gt; ticketType.publicly_available)) {
    return null;
  }

  return (
    <li>
      
        <span>
          Buy a
          {' '}
          {ticketName}
          !
        </span>
        <span>
          {humanize(ticketName)}
          !
        </span>
      
    </li>
  );
}