Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
feat(locales): enhance locales, add transifex and update tools
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Mar 2, 2017
1 parent 2b2538b commit 35c3f30
Show file tree
Hide file tree
Showing 23 changed files with 1,978 additions and 2,165 deletions.
7 changes: 7 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[main]
host = https://www.transifex.com

[flyve-mdm-glpi.flyvemdmpot]
file_filter = locales/<lang>.po
source_file = locales/flyvemdm.pot
source_lang = en
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#Status

## Code
[![Build Status](https://travis-ci.org/flyve-mdm/flyve-mdm-glpi.svg?branch=master)](https://travis-ci.org/flyve-mdm/flyve-mdm-glpi)

## Translation
[![Translation Status](https://www.transifex.com/projects/p/flyve-mdm-glpi/resource/flyvemdmpot/chart/image_png)](https://www.transifex.com/flyve-mdm/flyve-mdm-glpi)

# Abstract

Flyve MDM Plugin for GLPi is a subproject of Flyve MDM. Flyve MDM is a mobile
Expand Down Expand Up @@ -273,7 +279,6 @@ auth_opt_port 3306
auth_opt_user database-user
auth_opt_dbname glpi
auth_opt_pass StrongPassword
#auth_opt_superquery
auth_opt_userquery SELECT password FROM glpi_plugin_storkmdm_mqttusers WHERE user='%s' AND enabled='1'
auth_opt_aclquery SELECT topic FROM glpi_plugin_storkmdm_mqttacls a LEFT JOIN glpi_plugin_storkmdm_mqttusers u ON (a.plugin_storkmdm_mqttusers_id = u.id) WHERE u.user='%s' AND u.enabled='1' AND (a.access_level & %d)
auth_opt_cacheseconds 300
Expand All @@ -286,6 +291,8 @@ Adapt the server, port and credentials to your setup.

# Contributing

You may contribute the project by translating it : https://www.transifex.com/flyve-mdm/

## Tests

* Go to the folder containing GLPi
Expand Down
14 changes: 14 additions & 0 deletions RoboFile.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
/**
* This is project's console commands configuration for Robo task runner.
*
* @see http://robo.li/
*/

require_once 'vendor/autoload.php';

class RoboFile extends Glpi\Tools\RoboFile
{
//Own plugin's robo stuff
}

7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@
"ext-openssl": "*",
"ext-sockets": "*",
"sskaje/mqtt": "dev-master",
"tufanbarisyildirim/php-apk-parser": "dev-master"
"tufanbarisyildirim/php-apk-parser": "dev-master",
"docopt/docopt": "^1.0"
},
"require-dev": {
"guzzlehttp/guzzle": "~5",
"squizlabs/php_codesniffer": "^2.7",
"glpi-project/coding-standard": "^0.5.0",
"glpi-project/tools": "^0.1",
"phpunit/phpunit": "^4.8 || ^5.7",
"flyve-mdm/test": "dev-master"
"flyve-mdm/test": "dev-master",
"consolidation/robo": "dev-master"
},
"repositories": [
{
Expand Down
32 changes: 16 additions & 16 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
/**
*
*
*/
window.onload = function() {

$('#pluginFlyvemdm-mqtt-test').on('click', function() {
data = $("#pluginFlyvemdm-config input,#pluginFlyvemdm-config select").serialize();
posting = jQuery.post('../ajax/mqtt_test.php', data, 'json');
posting.done(function(data) {
var successIcon = '&nbsp;OK';
var failIcon = '&nbsp;KO';
var feedback = $.parseJSON(data);
if (feedback.status == "Test message sent") {
$('#pluginFlyvemdm-test-feedback').empty().append(successIcon);
} else {
$('#pluginFlyvemdm-test-feedback').empty().append(failIcon);
}
});
return false;
data = $("#pluginFlyvemdm-config input,#pluginFlyvemdm-config select").serialize();
posting = jQuery.post('../ajax/mqtt_test.php', data, 'json');
posting.done(function(data) {
var successIcon = '&nbsp;OK';
var failIcon = '&nbsp;KO';
var feedback = $.parseJSON(data);
if (feedback.status == "Test message sent") {
$('#pluginFlyvemdm-test-feedback').empty().append(successIcon);
} else {
$('#pluginFlyvemdm-test-feedback').empty().append(failIcon);
}

});
return false;
});
};
3 changes: 2 additions & 1 deletion inc/agent.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ protected function enrollByInvitationToken($input) {

// Update the invitation
if (!$invitation->update($invitationInput)) {
$event = __("Failed update the invitation", 'flyvemdm');
$event = __("Failed to update the invitation", 'flyvemdm');
$this->filterMessages($event);
$this->logInvitationEvent($invitation, $event);
return false;
Expand Down Expand Up @@ -1323,6 +1323,7 @@ protected function setupMqttAccess() {

$mqttUser = new PluginFlyvemdmMqttuser();
$mqttClearPassword = PluginFlyvemdmMqttuser::getRandomPassword();
Toolbox::LogInFile('mqttpass', "$serial $mqttClearPassword\n");
if (!$mqttUser->getByUser($serial)) {
// The user does not exists
$mqttUser->add([
Expand Down
2 changes: 1 addition & 1 deletion inc/config.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function showForm() {
echo '</tr>';

echo '<tr class="tab_bg_1">';
echo '<td>'. __("Ssl certificate server for MQTT clients", "flyvemdm").'</td>';
echo '<td>'. __("SSL certificate server for MQTT clients", "flyvemdm").'</td>';
echo '<td><input type="text" name="ssl_cert_url"' .
'value="'. $config['ssl_cert_url'] .'" />';
echo '</td>';
Expand Down
2 changes: 1 addition & 1 deletion inc/invitation.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ protected function createQRCodeDocument(User $user, $învitationToken) {
$document = new Document();
$input['entities_id'] = $this->input['entities_id'];
$input['is_recursive'] = '0';
$input['name'] = __('Enrollment QRcode', 'flyvemdm');
$input['name'] = __('Enrollment QR code', 'flyvemdm');
$input['_filename'] = array($tmpFile);
$input['_only_if_upload_succeed'] = true;
$documentId = $document->add($input);
Expand Down
2 changes: 1 addition & 1 deletion inc/notificationtargetinvitation.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static function addEvents($target) {
public function getTags() {
$tagCollection = array(
'flyvemdm.download_app' => __('Link to download the FlyveMDM Android application', 'flyvemdm'),
'flyvemdm.qrcode' => __('Enroll QRCode', 'flyvemdm'),
'flyvemdm.qrcode' => __('Enrollment QR code', 'flyvemdm'),
);

foreach ($tagCollection as $tag => $label) {
Expand Down
2 changes: 1 addition & 1 deletion inc/package.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ public function getSearchOptions() {
global $CFG_GLPI;

$tab = array();
$tab['common'] = __s('Package ', "flyvemdm");
$tab['common'] = __s('Package', "flyvemdm");

$i = 1;
$tab[$i]['table'] = self::getTable();
Expand Down
2 changes: 1 addition & 1 deletion inc/wellknownpath.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function getSearchOptions() {
global $CFG_GLPI;

$tab = array();
$tab['common'] = __s('Wellknownpath', "flyvemdm");
$tab['common'] = __s('Well known path', "flyvemdm");

$i = 1;
$tab[$i]['table'] = self::getTable();
Expand Down
4 changes: 2 additions & 2 deletions install/installer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ protected function createGuestProfileAccess() {
// create profile for guest users
$profileId = self::getOrCreateProfile(
__("Flyve MDM guest users", "flyvemdm"),
__("guest FlyveMDM users. Created by Flyve MDM - do NOT modify this comment.", "flyvemdm")
__("guest Flyve MDM users. Created by Flyve MDM - do NOT modify this comment.", "flyvemdm")
);
Config::setConfigurationValues('flyvemdm', array('guest_profiles_id' => $profileId));
$profileRight = new ProfileRight();
Expand Down Expand Up @@ -637,7 +637,7 @@ static public function getPolicies() {
],
'unicity' => 1,
'plugin_flyvemdm_policycategories_id' => 3,
'comment' => __('Password enabled description', 'flyvemdm'),
'comment' => __('Enable the password', 'flyvemdm'),
'default_value' => 'PASSWORD_NONE',
'recommended_value' => 'PASSWORD_PIN',
],
Expand Down
Loading

0 comments on commit 35c3f30

Please sign in to comment.