Skip to content

Commit

Permalink
Merge branch 'release/2.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Oct 20, 2024
2 parents bf780e5 + 88764f7 commit d8d7d5d
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 78 deletions.
1 change: 1 addition & 0 deletions .composer-require-checker.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

"// Galette constants (not detected as they are dynamically declared)",
"GALETTE_ATTACHMENTS_PATH",
"GALETTE_ADAPTATIVE_CARDS",
"GALETTE_BASE_PATH",
"GALETTE_CACHE_DIR",
"GALETTE_CARD_COLS",
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,17 @@ jobs:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
run: |
PGPASSWORD=g@l3tte psql -d galette_tests -a -f galette-core/galette/install/scripts/pgsql.sql -U galette_tests -h localhost
PGPASSWORD=g@l3tte psql -d galette_tests -a -f galette-core/galette/plugins/plugin-auto/scripts/pgsql.sql -U galette_tests -h localhost
cd galette-core
bin/console galette:install -v --dbtype=pgsql --dbhost=localhost --dbname=galette_tests --dbuser=galette_tests --dbpass=g@l3tte --admin=admin --password=admin --no-interaction -w
bin/console galette:plugins:install-db --all
if: env.skip != 'true' && startsWith(matrix.db-image, 'postgres')

- name: Init for MariaDB
run: |
cd galette-core
mysql -e 'create database IF NOT EXISTS galette_tests;' -u galette_tests --password=g@l3tte -h 127.0.0.1 -P 3306
mysql -e 'use galette_tests; source galette-core/galette/install/scripts/mysql.sql;' -u galette_tests --password=g@l3tte -h 127.0.0.1 -P 3306
mysql -e 'use galette_tests; source galette-core/galette/plugins/plugin-auto/scripts/mysql.sql;' -u galette_tests --password=g@l3tte -h 127.0.0.1 -P 3306
bin/console galette:install -v --dbtype=mysql --dbhost=127.0.0.1 --dbname=galette_tests --dbuser=galette_tests --dbpass=g@l3tte --admin=admin --password=admin --no-interaction -w
bin/console galette:plugins:install-db --all
if: env.skip != 'true' && (startsWith(matrix.db-image, 'mysql') || startsWith(matrix.db-image, 'mariadb'))

- name: Unit tests
Expand Down
6 changes: 3 additions & 3 deletions _define.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
'Galette Auto', //Name
'Plugin to manage Automobile clubs', //Short description
'Johan Cwiklinski', //Author
'2.1.1', //Version
'1.1.0', //Galette compatible version
'2.1.2', //Version
'1.1.4', //Galette compatible version
'auto', //routing name
'2024-07-06', //Release date
'2024-10-20', //Release date
[ //routes permissions
'vehiclesList' => 'groupmanager',
'memberVehiclesList' => 'groupmanager',
Expand Down
102 changes: 44 additions & 58 deletions lang/auto_es.utf8.po
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,23 @@
# Cow <[email protected]>, 2022.
# Carlos Cruzyc <[email protected]>, 2022.
# Javier <[email protected]>, 2022.
# gallegonovato <[email protected]>, 2022.
# gallegonovato <[email protected]>, 2022, 2024.
# Kamborio <[email protected]>, 2024.
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-02-23 08:39+0100\n"
"PO-Revision-Date: 2023-09-20 00:29+0000\n"
"Last-Translator: Johan Cwiklinski <[email protected]>\n"
"Language-Team: Spanish <https://hosted.weblate.org/projects/galette/auto-"
"plugin/es/>\n"
"PO-Revision-Date: 2024-10-18 12:15+0000\n"
"Last-Translator: gallegonovato <[email protected]>\n"
"Language-Team: Spanish <https://hosted.weblate.org/projects/galette/"
"auto-plugin/es/>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.1-dev\n"
"X-Generator: Weblate 5.8-rc\n"

#: ../_routes.php:125
msgid "No vehicle was selected, please check at least one name."
Expand Down Expand Up @@ -89,12 +90,11 @@ msgstr "Quitar modelo «%1$s»"
#: ../lib/GaletteAuto/Controllers/Crud/ModelsController.php:389
msgid "This model is used by one or more vehicles, it cannot be deleted."
msgstr ""
"Este modelo es utilizado por uno o más vehículos, no puede ser eliminado."

#: ../lib/GaletteAuto/Controllers/Crud/ModelsController.php:394
#, fuzzy
#| msgid "An error occurred while trying to delete car's photo"
msgid "An error occurred while deleting model."
msgstr "Ha ocurrido un error al intentar eliminar la foto del auto"
msgstr "Se ha producido un error al borrar el modelo."

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:189
#: ../lib/GaletteAuto/PluginGaletteAuto.php:61
Expand Down Expand Up @@ -158,7 +158,7 @@ msgstr "Añadir marca"

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:332
msgid "New"
msgstr "Crear"
msgstr "Nuevo"

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:338
#, php-format
Expand Down Expand Up @@ -193,113 +193,99 @@ msgid "Remove %1$s %2$s"
msgstr "Retirar %1$s %2$s"

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:607
#, fuzzy, php-format
#| msgid "%count %property have been successfully deleted."
#, php-format
msgid "%1$s color has been successfully deleted."
msgid_plural "%1$s colors have been successfully deleted."
msgstr[0] "%count propiedad %property ha sido correctamente eliminada."
msgstr[1] "%count propiedad %property ha sido correctamente eliminada."
msgstr[0] "El color %1$s ha sido eliminado correctamente."
msgstr[1] "Los colores %1$s han sido eliminados correctamente."

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:611
#, fuzzy, php-format
#| msgid "%count vehicles have been successfully deleted."
#, php-format
msgid "%1$s state has been successfully deleted."
msgid_plural "%1$s states have been successfully deleted."
msgstr[0] "Se han eliminado %count vehículos correctamente."
msgstr[1] "Se han eliminado %count vehículos correctamente."
msgstr[0] "La situación %1$s ha sido eliminada correctamente."
msgstr[1] "Las situaciones %1$s han sido eliminadas correctamente."

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:615
#, fuzzy, php-format
#| msgid "%count vehicles have been successfully deleted."
#, php-format
msgid "%1$s finition has been successfully deleted."
msgid_plural "%1$s finitions have been successfully deleted."
msgstr[0] "Se han eliminado %count vehículos correctamente."
msgstr[1] "Se han eliminado %count vehículos correctamente."
msgstr[0] "El acabado %1$s ha sido borrado correctamente."
msgstr[1] "Los acabados %1$s han sido borrados correctamente."

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:619
#, fuzzy, php-format
#| msgid "%count %property have been successfully deleted."
#, php-format
msgid "%1$s body has been successfully deleted."
msgid_plural "%1$s bodies have been successfully deleted."
msgstr[0] "%count propiedad %property ha sido correctamente eliminada."
msgstr[1] "%count propiedad %property ha sido correctamente eliminada."
msgstr[0] "El chasis %1$s ha sido eliminado correctamente."
msgstr[1] "Los chasis %1$s han sido eliminados correctamente."

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:623
#, fuzzy, php-format
#| msgid "%count vehicles have been successfully deleted."
#, php-format
msgid "%1$s transmission has been successfully deleted."
msgid_plural "%1$s transmissions have been successfully deleted."
msgstr[0] "Se han eliminado %count vehículos correctamente."
msgstr[1] "Se han eliminado %count vehículos correctamente."
msgstr[0] "La transmisión %1$s ha sido eliminada correctamente."
msgstr[1] "Las transmisiones %1$s han sido eliminadas correctamente."

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:627
#, fuzzy, php-format
#| msgid "%count %property have been successfully deleted."
#, php-format
msgid "%1$s brand has been successfully deleted."
msgid_plural "%1$s brands have been successfully deleted."
msgstr[0] "%count propiedad %property ha sido correctamente eliminada."
msgstr[1] "%count propiedad %property ha sido correctamente eliminada."
msgstr[0] "La marca %1$s ha sido eliminada correctamente."
msgstr[1] "Las marcas %1$s han sido eliminadas correctamente."

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:644
msgid "This color is used by one or more vehicles, it cannot be deleted."
msgstr ""
"Este color es utilizado por uno o más vehículos, no puede ser eliminado."

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:648
msgid "This state is used by one or more vehicles, it cannot be deleted."
msgstr ""
"Este estado es utilizado por uno o más vehículos, no puede ser eliminado."

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:652
msgid "This finition is used by one or more vehicles, it cannot be deleted."
msgstr ""
"Este acabado es utilizado por uno o más vehículos, no se puede eliminar."

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:656
msgid "This body is used by one or more vehicles, it cannot be deleted."
msgstr ""
msgstr "Este chasis es utilizada por uno o más vehículos, no se puede eliminar."

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:660
msgid ""
"This transmission is used by one or more vehicles, it cannot be deleted."
msgstr ""
"Esta transmisión es utilizada por uno o más vehículos, no se puede eliminar."

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:664
msgid "This brand is used by one or more vehicles, it cannot be deleted."
msgstr ""
msgstr "Esta marca es utilizada por uno o más vehículos, no se puede eliminar."

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:678
#, fuzzy
#| msgid "An error occurred trying to remove vehicles :/"
msgid "An error occurred trying to remove color :/"
msgstr "Ha ocurrido un error intentando retirar vehículos :/"
msgstr "Se ha producido un error al intentar eliminar el color :/"

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:682
#, fuzzy
#| msgid "An error occurred trying to remove vehicles :/"
msgid "An error occurred trying to remove state :/"
msgstr "Ha ocurrido un error intentando retirar vehículos :/"
msgstr "Se ha producido un error al intentar eliminar la situación :/"

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:686
#, fuzzy
#| msgid "An error occurred trying to remove vehicles :/"
msgid "An error occurred trying to remove finition :/"
msgstr "Ha ocurrido un error intentando retirar vehículos :/"
msgstr "Se ha producido un error al intentar eliminar el acabado :/"

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:690
#, fuzzy
#| msgid "An error occurred trying to remove %property :/"
msgid "An error occurred trying to remove body :/"
msgstr "Ha ocurrido un error al intentar retirar la propiedad %property :/"
msgstr "Se ha producido un error al intentar eliminar el chasis :/"

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:694
#, fuzzy
#| msgid "An error occurred trying to remove vehicles :/"
msgid "An error occurred trying to remove transmission :/"
msgstr "Ha ocurrido un error intentando retirar vehículos :/"
msgstr "Se ha producido un error al intentar eliminar la transmisión :/"

#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:698
#, fuzzy
#| msgid "An error occurred trying to remove %property :/"
msgid "An error occurred trying to remove brand :/"
msgstr "Ha ocurrido un error al intentar retirar la propiedad %property :/"
msgstr "Se ha producido un error al intentar eliminar la marca :/"

#: ../lib/GaletteAuto/Controllers/Controller.php:90
msgid "You do not have enough privileges."
Expand Down Expand Up @@ -460,11 +446,11 @@ msgstr "Modelo"
#: ../lib/GaletteAuto/Auto.php:173 ../tempcache/vehicles.html.twig:404
#: ../tempcache/history.html.twig:70 ../tempcache/history.html.twig:142
msgid "Registration"
msgstr "Registro"
msgstr "Inscripción"

#: ../lib/GaletteAuto/Auto.php:174 ../tempcache/vehicles.html.twig:142
msgid "First registration date"
msgstr "Fecha del primer registro"
msgstr "Primera fecha de inscripción"

#: ../lib/GaletteAuto/Auto.php:175 ../tempcache/vehicles.html.twig:148
msgid "First circulation date"
Expand Down Expand Up @@ -533,7 +519,7 @@ msgstr "Auto actualizado"

#: ../lib/GaletteAuto/Auto.php:698
msgid "- Maximum size for %field is %maxsize (current %cursize)!"
msgstr ""
msgstr "- ¡El tamaño máximo de %field es %maxsize (%cursize actual)!"

#: ../lib/GaletteAuto/Auto.php:741
#, php-format
Expand Down
6 changes: 3 additions & 3 deletions lang/auto_fr_FR.utf8.po
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ msgstr ""
"Project-Id-Version: fr_FR@euro\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-02-23 08:39+0100\n"
"PO-Revision-Date: 2024-07-02 19:43+0000\n"
"PO-Revision-Date: 2024-09-15 07:51+0000\n"
"Last-Translator: Johan Cwiklinski <[email protected]>\n"
"Language-Team: French <https://hosted.weblate.org/projects/galette/"
"auto-plugin/fr/>\n"
Expand All @@ -25,7 +25,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 5.7-dev\n"
"X-Generator: Weblate 5.8-dev\n"

#: ../_routes.php:125
msgid "No vehicle was selected, please check at least one name."
Expand Down Expand Up @@ -383,7 +383,7 @@ msgstr "- Vous devez sélectionner une marque !"
#: ../tempcache/vehicles.html.twig:370 ../tempcache/history.html.twig:76
#: ../tempcache/history.html.twig:148
msgid "Color"
msgstr "Coleur"
msgstr "Couleur"

#: ../lib/GaletteAuto/Color.php:100
#, php-format
Expand Down
Binary file modified lang/es.utf8/LC_MESSAGES/auto.mo
Binary file not shown.
Binary file modified lang/fr_FR.utf8/LC_MESSAGES/auto.mo
Binary file not shown.
21 changes: 12 additions & 9 deletions lib/GaletteAuto/PluginGaletteAuto.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,19 +140,12 @@ public static function getPublicMenusItemsList(): array
}

/**
* Get dashboards contents
* Get current logged-in user dashboards contents
*
* @return array|array[]
*/
public static function getDashboardsContents(): array
public static function getMyDashboardsContents(): array
{
/** @var Login $login */
global $login;

if ($login->isSuperAdmin()) {
return [];
}

return [
[
'label' => _T("My cars", "auto"),
Expand All @@ -164,6 +157,16 @@ public static function getDashboardsContents(): array
];
}

/**
* Get dashboards contents
*
* @return array|array[]
*/
public static function getDashboardsContents(): array
{
return [];
}

/**
* Get actions contents
*
Expand Down
2 changes: 1 addition & 1 deletion templates/default/vehicles.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@

{% block javascripts %}
<script type="text/javascript">
{% include "elements/js/choose_adh.js.twig" with {"js_chosen_id": "#owner"} %}
{% include "elements/js/choose_adh.js.twig" with {"js_chosen_id": "#owner_id"} %}
$(function() {
$('#brand').dropdown('setting', 'onChange', function(id_brand) {
Expand Down

0 comments on commit d8d7d5d

Please sign in to comment.