CRM - Cleanup boolean expressions
[civicrm-core.git] / CRM / Core / I18n.php
index fe4e46110c255d71b1c4b3658d3b51ef9d3bd51f..aff19c9f80d1f72a5805af9ef0dccdad3a698c9a 100644 (file)
@@ -282,7 +282,7 @@ class CRM_Core_I18n {
    * @return string
    */
   public static function getResourceDir() {
-    return \Civi::paths()->getPath('[civicrm.l10n]/.');
+    return CRM_Utils_File::addTrailingSlash(\Civi::paths()->getPath('[civicrm.l10n]/.'));
   }
 
   /**
@@ -448,7 +448,7 @@ class CRM_Core_I18n {
       if (isset($count) && isset($plural)) {
 
         if ($this->_phpgettext) {
-          $text = $this->_phpgettext->ngettext($text, $plural, $count);
+          $text = $this->_phpgettext->ngettext($text, $plural, (int) $count);
         }
         else {
           // if the locale's not set, we do ngettext work by hand