Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-13556

JavaScript translation function does not support pluralization

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.4.0
    • Fix Version/s: Unscheduled
    • Component/s: Internationalisation
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      Developer Doc
    • Funding Source:
      Needs Funding

      Description

      PHP supports:
      $theString = ts('Found %count contact', array('count' => $count, 'plural' => 'Found %count contacts'));

      Smarty supports:

      {ts count=$count plural='Found %count contacts'}

      Found %count contact

      {/ts}

      I'd expect JS to support the following, but it doesn't:
      var msg = ts("Found %count contact",

      {count: count, plural: "Found %count contacts"}

      );

        Attachments

          Activity

            People

            • Assignee:
              mlutfy Mathieu Lutfy
              Reporter:
              pittstains Frank J. Gómez
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: