Merge pull request #2 in KWA/mobile-device-management from KMP-10-fix-translations to master
* commit 'b9548dec8d8110d1081bd38989bdb6d119dadda6': Use dgettext which handles translation domains
This commit is contained in:
		@@ -161,24 +161,24 @@ class PluginMDMModule extends Module
 | 
			
		||||
							$this->handleUnknownActionType($actionType);
 | 
			
		||||
					}
 | 
			
		||||
				} catch (SoapFault $fault) {
 | 
			
		||||
					$display_message = _('Something went wrong.', 'plugin_mdm');
 | 
			
		||||
					$display_message = dgettext('plugin_mdm', 'Something went wrong.');
 | 
			
		||||
					if ($fault->faultcode === 'HTTP') {
 | 
			
		||||
						if ($fault->getMessage() === "Unauthorized") {
 | 
			
		||||
							$display_message = _('Unable to connect to Z-Push Server. Unauthorized.', 'plugin_mdm');
 | 
			
		||||
							$display_message = dgettext('plugin_mdm', 'Unable to connect to Z-Push Server. Unauthorized.');
 | 
			
		||||
						}
 | 
			
		||||
						if ($fault->getMessage() === "Could not connect to host") {
 | 
			
		||||
							$display_message = _('Unable to connect to Z-Push Server. Could not connect to host.', 'plugin_mdm');
 | 
			
		||||
							$display_message = dgettext('plugin_mdm', 'Unable to connect to Z-Push Server. Could not connect to host.');
 | 
			
		||||
						}
 | 
			
		||||
						if ($fault->getMessage() === "Not Found") {
 | 
			
		||||
							$display_message = _('Unable to connect to Z-Push Server. Not found.', 'plugin_mdm');
 | 
			
		||||
							$display_message = dgettext('plugin_mdm', 'Unable to connect to Z-Push Server. Not found.');
 | 
			
		||||
						}
 | 
			
		||||
					} else if ($fault->faultcode === "ERROR") {
 | 
			
		||||
						$display_message = _('Device ID could not be found', 'plugin_mdm');
 | 
			
		||||
						$display_message = dgettext('plugin_mdm', 'Device ID could not be found');
 | 
			
		||||
					}
 | 
			
		||||
					$this->sendFeedback(false, array("type" => ERROR_GENERAL, "info" => array('display_message' => $display_message)));
 | 
			
		||||
				}
 | 
			
		||||
				catch (Exception $e) {
 | 
			
		||||
					$this->sendFeedback(true, array("type" => ERROR_GENERAL, "info" => array('display_message' => _('Something went wrong', 'plugin_mdm'))));
 | 
			
		||||
					$this->sendFeedback(true, array("type" => ERROR_GENERAL, "info" => array('display_message' => dgettext('plugin_mdm', 'Something went wrong'))));
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user