(FM-7316) - i18n Process implemented and .pot file generated
[puppet-modules/puppetlabs-apt.git] / manifests / backports.pp
index 4faad6157a7f31664555471071c211e177e56ce2..8555cb0f7a2c68455fbab71b18ee122f5a14bc67 100644 (file)
@@ -1,3 +1,4 @@
+# Defining backports for the apt class
 class apt::backports (
   Optional[String] $location                    = undef,
   Optional[String] $release                     = undef,
@@ -32,13 +33,13 @@ class apt::backports (
     }
   } else {
     unless $location and $release and $repos and $key {
-      fail('If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key')
+      fail(translate('If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key'))
     }
   }
 
-  if is_hash($pin) {
+  if $pin =~ Hash {
     $_pin = $pin
-  } elsif is_numeric($pin) or is_string($pin) {
+  } elsif $pin =~ Numeric or $pin =~ String {
     # apt::source defaults to pinning to origin, but we should pin to release
     # for backports
     $_pin = {
@@ -46,7 +47,7 @@ class apt::backports (
       'release'  => $_release,
     }
   } else {
-    fail('pin must be either a string, number or hash')
+    fail(translate('pin must be either a string, number or hash'))
   }
 
   apt::source { 'backports':