Skip to content

Commit

Permalink
last files
Browse files Browse the repository at this point in the history
  • Loading branch information
phili67 committed Apr 21, 2024
1 parent cd4a43b commit e30cb15
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 38 deletions.
32 changes: 10 additions & 22 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,12 @@
#!/bin/bash

# Dans le cas de php 7.2
#cp -rf propel/vendor/* src/vendor/propel
#

## the first run you've to install :

# npm install node-sass
# npm install i18next-extract-gettext -g
# npm install i18next-conv -g
# npm install grunt -g
# npm install --global strip-json-comments-cli

# cd src/
# sudo composer i
# cd ..
# sudo cp BuildConfig.json.example BuildConfig.json

# npm install grunt --save-dev

# rebuild the nodes-sass base

## end of first run
if [ ! -f "./BuildConfig.json" ]; then
cp BuildConfig.json.example BuildConfig.json
npm install -g github:phili67/i18next-extract-gettext
npm install i18next-conv -g
npm install --global strip-json-comments-cli
npm install grunt --save-dev
fi

npm rebuild node-sass

Expand All @@ -30,6 +15,9 @@ npm install --unsafe-perm --legacy-peer-deps --save .

# to run the installation
npm run install

cp node_modules/bootstrap-datepicker/dist/locales/bootstrap-datepicker.no.min.js node_modules/bootstrap-datepicker/dist/locales/bootstrap-datepicker.nb.min.js

npm run postinstall
npm run orm-gen

Expand Down
18 changes: 10 additions & 8 deletions locale/clean-datatables-lang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
#rm src/locale/datatables/*.lang1*
cd locale

for d in ../src/locale/datatables/* ; do
res="$d"
if [ -d ../src/locale/datatables ]; then
for d in ../src/locale/datatables/* ; do
res="$d"

echo $res
echo $res

strip-json-comments $res > "${res}1"

rm $res
mv "${res}1" $res
done
strip-json-comments $res > "${res}1"

rm $res
mv "${res}1" $res
done
fi
13 changes: 9 additions & 4 deletions locale/extract-db-locale-terms.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@
include "connection.php";

/*
// Put
// Put
<?php
$db_servername = 'localhost';
$db_username = 'user_name';
$db_password = 'password';
$db_name = 'ecclesiacrm';
$db_name = 'name of the db';
*/

//phpdismod -s cli xdebug

$stringsDir = 'db-strings';
$stringFiles = [];

$db = new PDO('mysql:host=localhost;dbname='.$db_name.';charset=utf8mb4', $db_username, $db_password);
$db = new PDO('mysql:host='.$db_servername.';dbname='.$db_name.';charset=utf8mb4', $db_username, $db_password);
$query = 'select DISTINCT ucfg_tooltip as term, "" as translation, "userconfig_ucfg" as cntx from userconfig_ucfg
union all
select DISTINCT qry_Name as term, "" as translation, "query_qry" as cntx from query_qry
Expand All @@ -26,7 +29,7 @@
union all
select DISTINCT qrp_Description term, "" as translation, "queryparameters_qrp" as cntx from queryparameters_qrp
union all
select DISTINCT qry_Name as term, "" as translation, "query_qry" as cntx from query_qry
select DISTINCT qry_Name as term, "" as translation, "query_qry" as cntx from query_qry
union all
select DISTINCT qry_Description as term, "" as translation, "query_qry" as cntx from query_qry;';
foreach ($db->query($query) as $row) {
Expand Down Expand Up @@ -60,3 +63,5 @@
file_put_contents($stringFile, 'gettext("'.$key."\");\r\n",FILE_APPEND);
}
file_put_contents($stringFile, "\r\n?>", FILE_APPEND);

phpenmod -s cli xdebug
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
},
"homepage": "https://www.ecclesiacrm.com",
"devDependencies": {
"grunt": "^1.5.3",
"grunt": "^1.6.1",
"grunt-confirm": "^1.0.7",
"grunt-contrib-clean": "^2.0.1",
"grunt-contrib-compress": "^1.6.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-curl": "^2.5.1",
"grunt-exec": "^3.0.0",
"grunt-lineending": "^1.0.0",
"husky": "^9.0.11",
"node-sha1": "^1.0.1"
},
"dependencies": {
Expand Down Expand Up @@ -80,14 +81,15 @@
"jszip": "^3.10.1",
"leaflet": "^1.9.2",
"morris.js.so": "^0.5.1",
"node-sass": "8.*",
"node-sass": "^8.0.0",
"pace-js": "^1.2.3",
"package.json": "^2.0.1",
"popper.js": "^1.16.1",
"select2": "^4.0.13"
"select2": "^4.0.13",
"strip-json-comments": "^5.0.1"
},
"scripts": {
"install": "grunt clean && grunt updateVersions && grunt curl-dir && grunt copy && grunt sass",
"install": "grunt clean && grunt updateVersions && grunt curl-dir && grunt copy && grunt sass && cp node_modules/bootstrap-datepicker/dist/locales/bootstrap-datepicker.no.min.js node_modules/bootstrap-datepicker/dist/locales/bootstrap-datepicker.nb.min.js",
"postinstall": "grunt genLocaleJSFiles",
"locale-gen": "locale/update-locale.sh",
"locale-download": "grunt updateFromPOeditor && grunt genLocaleJSFiles",
Expand Down

0 comments on commit e30cb15

Please sign in to comment.