diff options
Diffstat (limited to 'h-source/Application/Include')
-rw-r--r-- | h-source/Application/Include/hardware.php | 54 | ||||
-rw-r--r-- | h-source/Application/Include/languages.php | 33 | ||||
-rw-r--r-- | h-source/Application/Include/myFunctions.php | 3 | ||||
-rw-r--r-- | h-source/Application/Include/vendorTranslations.php | 5 | ||||
-rw-r--r-- | h-source/Application/Include/version.php | 4 |
5 files changed, 82 insertions, 17 deletions
diff --git a/h-source/Application/Include/hardware.php b/h-source/Application/Include/hardware.php index eebdbd5..ce2ad01 100644 --- a/h-source/Application/Include/hardware.php +++ b/h-source/Application/Include/hardware.php @@ -41,6 +41,10 @@ class Hardware "works_without_3D" => "works, but without 3D acceleration", "does_not_work" => "it does not work", "can-be-installed" => "can be installed", + "pcmcia-controller" => "PCMCIA Controller", + "usb-controller" => "USB Controller", + "firewire-controller" => "Firewire Controller", + "heci-controller" => "HECI Controller", ); public static $regExpressions = array( @@ -71,6 +75,7 @@ class Hardware '0805' => 'sdcardreaders', '0703' => 'modems', '0104' => 'raidadapters', + '0c00' => 'hostcontrollers', ); public static $icons = array( @@ -89,7 +94,7 @@ class Hardware 'sd-card-reader' => 'H2O/media-flash-sd-mmc_22.png', 'modem' => 'Crystal/modem_22.png', 'RAID-adapter' => 'Crystal/1282042976_hardware.png', - 'PCMCIA-controller' => 'Crystal/1282042976_hardware.png', + 'host-controller' => 'Crystal/1282042976_hardware.png', ); public static $typeToController = array( @@ -108,7 +113,26 @@ class Hardware 'sd-card-reader' => 'sdcardreaders', 'modem' => 'modems', 'RAID-adapter' => 'raidadapters', - 'PCMCIA-controller' => 'pcmcia', + 'host-controller' => 'hostcontrollers', + ); + + public static $typeToWorksField = array( + 'notebook' => 'compatibility', + 'wifi' => 'wifi_works', + 'videocard' => 'video_card_works', + 'printer' => 'compatibility', + 'scanner' => 'compatibility', + '3G-card' => 'wifi_works', + 'soundcard' => 'sound_card_works', + 'webcam' => 'webcam_works', + 'bluetooth' => 'bluetooth_works', + 'acquisition-card' => 'compatibility', + 'fingerprint-reader' => 'fingerprint_works', + 'ethernet-card' => 'ethernet_card_works', + 'sd-card-reader' => 'sd_card_works', + 'modem' => 'compatibility', + 'RAID-adapter' => 'compatibility', + 'host-controller' => 'compatibility', ); public static function getTypes() @@ -125,6 +149,15 @@ class Hardware return null; } + public static function getWorksFieldFromType($type) + { + if (array_key_exists($type,self::$typeToWorksField)) + { + return self::$typeToWorksField[$type]; + } + return null; + } + //get the type from the controller public static function getTypeFromController($controller) { @@ -482,4 +515,21 @@ class Raidadapters extends Acquisitioncards class PCMCIAControllers extends Acquisitioncards { +} + +class Hostcontrollers extends Acquisitioncards +{ + + public static $subtype = array( + "PCMCIA Controller" => "pcmcia-controller", + "USB Controller" => "usb-controller", + "Firewire Controller" => "firewire-controller", + "HECI Controller" => "heci-controller", + ); + + public static function subtypeList() + { + return implode(',',array_values(self::$subtype)); + } + }
\ No newline at end of file diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index 965a814..9fe75d9 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -404,6 +404,15 @@ class Lang /*0343*/"If you don't want to confirm the account registration\nthen wait one hour and your username and e-mail will be deleted from the database" => "Se non vuoi confermare la registrazione dell'account\naspetta un ora e il tuo username e la tua e-mail verranno cancellati dal nostro database", /*0344*/"If you received this e-mail for error, please simply disregard this message" => "Se hai ricevuto questa e-mail per errore, per favore cancellala", /*0345*/"account registration" => "registrazione account", + /*0346*/"Host Controllers" => "Host Controller", + /*0347*/"No Host Controller found" => "Non è stato trovato alcun host controller", + /*0348*/"Download the xml file of all the <b>Host Controllers</b> in the database" => "Scarica il file xml di tutti gli <b>Host Controller</b> presenti nel database", + /*0349*/"PCMCIA Controller" => "Controller PCMCIA", + /*0350*/"USB Controller" => "Controller USB", + /*0351*/"Firewire Controller" => "Controller Firewire", + /*0352*/"HECI Controller" => "Controller HECI", + /*0353*/"device type" => "tipo di dispositivo", + /*0354*/"Thanks for your contribution!" => "Grazie per il tuo contributo!", ), 'es' => array ( @@ -1586,7 +1595,7 @@ class Lang /*13*/'sdcardreaders' => 'sd card reader', /*14*/'modems' => 'modem', /*15*/'raidadapters' => 'RAID adapter', - /*16*/'pcmcia' => 'PCMCIA controller', + /*16*/'hostcontrollers' => 'host controller', ), 'it' => array( 'notebooks' => 'notebook', @@ -1604,7 +1613,7 @@ class Lang 'sdcardreaders' => 'lettore di schede sd', 'modems' => 'modem', 'raidadapters' => 'adattatore RAID', - 'pcmcia' => 'controller PCMCIA', + 'hostcontrollers' => 'host controller', ), 'es' => array( 'notebooks' => 'portátil', @@ -1622,7 +1631,7 @@ class Lang 'sdcardreaders' => 'lector de tarjetas sd', 'modems' => 'modem', 'raidadapters' => 'RAID adapter', - 'pcmcia' => 'PCMCIA controller', + 'hostcontrollers' => 'host controller', ), 'fr' => array( 'notebooks' => 'notebook', @@ -1640,7 +1649,7 @@ class Lang 'sdcardreaders' => 'lecteur de carte SD', 'modem' => 'modem', 'raidadapters' => 'RAID adapter', - 'pcmcia' => 'PCMCIA controller', + 'hostcontrollers' => 'host controller', ), 'de' => array( 'notebooks' => 'notebook', @@ -1658,7 +1667,7 @@ class Lang 'sdcardreaders' => 'sd card reader', 'modems' => 'modem', 'raidadapters' => 'RAID adapter', - 'pcmcia' => 'PCMCIA controller', + 'hostcontrollers' => 'host controller', ), 'gr' => array( /*01*/'notebooks' => 'Υπο-φορητοί υπολογιστές', @@ -1676,7 +1685,7 @@ class Lang /*13*/'sdcardreaders' => 'Συσκευές ανάγνωσης καρτών sd', /*14*/'modems' => 'Συσκευές modem', /*15*/'raidadapters' => 'RAID adapter', - 'pcmcia' => 'PCMCIA controller', + /*16*/'hostcontrollers' => 'host controller', ), ); @@ -1697,7 +1706,7 @@ class Lang /*13*/'sdcardreaders' => 'sd card readers', /*14*/'modems' => 'modems', /*15*/'raidadapters' => 'RAID adapters', - /*16*/'pcmcia' => 'PCMCIA controllers', + /*16*/'hostcontrollers' => 'host controllers', ), 'it' => array( /*01*/'notebooks' => 'notebook', @@ -1715,7 +1724,7 @@ class Lang /*13*/'sdcardreaders' => 'lettori di schede sd', /*14*/'modems' => 'modem', /*15*/'raidadapters' => 'adattatori RAID', - /*16*/'pcmcia' => 'controller PCMCIA', + /*16*/'hostcontrollers' => 'host controller', ), 'es' => array( /*01*/'notebooks' => 'portátiles', @@ -1733,7 +1742,7 @@ class Lang /*13*/'sdcardreaders' => 'lectores de tarjetas sd', /*14*/'modems' => 'modems', /*15*/'raidadapters' => 'RAID adapters', - /*16*/'pcmcia' => 'PCMCIA controllers', + /*16*/'hostcontrollers' => 'host controllers', ), 'fr' => array( /*01*/'notebooks' => 'notebooks', @@ -1751,7 +1760,7 @@ class Lang /*13*/'sdcardreaders' => 'lecteurs de cartes SD', /*14*/'modems' => 'modems', /*15*/'raidadapters' => 'RAID adapters', - /*16*/'pcmcia' => 'PCMCIA controllers', + /*16*/'hostcontrollers' => 'host controllers', ), 'de' => array( /*01*/'notebooks' => 'notebooks', @@ -1769,7 +1778,7 @@ class Lang /*13*/'sdcardreaders' => 'sd card readers', /*14*/'modems' => 'modems', /*15*/'raidadapters' => 'RAID adapters', - /*16*/'pcmcia' => 'PCMCIA controllers', + /*16*/'hostcontrollers' => 'host controllers', ), 'gr' => array( /*01*/'notebooks' => 'Υπο-φορητοί υπολογιστές', @@ -1787,7 +1796,7 @@ class Lang /*13*/'sdcardreaders' => 'Συσκευές ανάγνωσης καρτών sd', /*14*/'modems' => 'Συσκευές modem', /*15*/'raidadapters' => 'RAID adapters', - /*16*/'pcmcia' => 'PCMCIA controllers', + /*16*/'hostcontrollers' => 'host controllers', ), ); diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php index 4f830f4..dc2eb9c 100644 --- a/h-source/Application/Include/myFunctions.php +++ b/h-source/Application/Include/myFunctions.php @@ -448,7 +448,8 @@ function getTranslationFunction($fieldName) { $fieldsFunc = array( "vendor" => "betterVendor", - "interface" => "translate", + "interface" => "translate_and_gtext", + "subtype" => "translate_and_gtext", ); if (array_key_exists($fieldName,$fieldsFunc)) diff --git a/h-source/Application/Include/vendorTranslations.php b/h-source/Application/Include/vendorTranslations.php index 09d1298..6d5eb53 100644 --- a/h-source/Application/Include/vendorTranslations.php +++ b/h-source/Application/Include/vendorTranslations.php @@ -23,6 +23,11 @@ if (!defined('EG')) die('Direct access not allowed!'); //rewrite the vendor name function betterVendor($string) { + if ($string === 'undef') + { + return gtext($string); + } + $vendors = new VendorsModel(); $exceptions = array( diff --git a/h-source/Application/Include/version.php b/h-source/Application/Include/version.php index c4b6ebb..7e348f6 100644 --- a/h-source/Application/Include/version.php +++ b/h-source/Application/Include/version.php @@ -60,8 +60,8 @@ class Version 'notebooks,view', 'raidadapters,catalogue', 'raidadapters,view', - 'pcmcia,catalogue', - 'pcmcia,view', + 'hostcontrollers,catalogue', + 'hostcontrollers,view', ); //get the subfolder of the Views folder where to look for the view files |