Skip to content

Commit d8d7d5d

Browse files
committed
Merge branch 'release/2.1.2'
2 parents bf780e5 + 88764f7 commit d8d7d5d

File tree

9 files changed

+70
-78
lines changed

9 files changed

+70
-78
lines changed

.composer-require-checker.config.json

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
"// Galette constants (not detected as they are dynamically declared)",
2525
"GALETTE_ATTACHMENTS_PATH",
26+
"GALETTE_ADAPTATIVE_CARDS",
2627
"GALETTE_BASE_PATH",
2728
"GALETTE_CACHE_DIR",
2829
"GALETTE_CARD_COLS",

.github/workflows/ci-linux.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,17 @@ jobs:
205205
POSTGRES_HOST: localhost
206206
POSTGRES_PORT: 5432
207207
run: |
208-
PGPASSWORD=g@l3tte psql -d galette_tests -a -f galette-core/galette/install/scripts/pgsql.sql -U galette_tests -h localhost
209-
PGPASSWORD=g@l3tte psql -d galette_tests -a -f galette-core/galette/plugins/plugin-auto/scripts/pgsql.sql -U galette_tests -h localhost
208+
cd galette-core
209+
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
210+
bin/console galette:plugins:install-db --all
210211
if: env.skip != 'true' && startsWith(matrix.db-image, 'postgres')
211212

212213
- name: Init for MariaDB
213214
run: |
215+
cd galette-core
214216
mysql -e 'create database IF NOT EXISTS galette_tests;' -u galette_tests --password=g@l3tte -h 127.0.0.1 -P 3306
215-
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
216-
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
217+
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
218+
bin/console galette:plugins:install-db --all
217219
if: env.skip != 'true' && (startsWith(matrix.db-image, 'mysql') || startsWith(matrix.db-image, 'mariadb'))
218220

219221
- name: Unit tests

_define.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
'Galette Auto', //Name
2626
'Plugin to manage Automobile clubs', //Short description
2727
'Johan Cwiklinski', //Author
28-
'2.1.1', //Version
29-
'1.1.0', //Galette compatible version
28+
'2.1.2', //Version
29+
'1.1.4', //Galette compatible version
3030
'auto', //routing name
31-
'2024-07-06', //Release date
31+
'2024-10-20', //Release date
3232
[ //routes permissions
3333
'vehiclesList' => 'groupmanager',
3434
'memberVehiclesList' => 'groupmanager',

lang/auto_es.utf8.po

+44-58
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,23 @@
1010
# Cow <[email protected]>, 2022.
1111
# Carlos Cruzyc <[email protected]>, 2022.
1212
# Javier <[email protected]>, 2022.
13-
# gallegonovato <[email protected]>, 2022.
13+
# gallegonovato <[email protected]>, 2022, 2024.
14+
# Kamborio <[email protected]>, 2024.
1415
msgid ""
1516
msgstr ""
1617
"Project-Id-Version: PACKAGE VERSION\n"
17-
"Report-Msgid-Bugs-To: \n"
18+
"Report-Msgid-Bugs-To: [email protected]\n"
1819
"POT-Creation-Date: 2024-02-23 08:39+0100\n"
19-
"PO-Revision-Date: 2023-09-20 00:29+0000\n"
20-
"Last-Translator: Johan Cwiklinski <[email protected]>\n"
21-
"Language-Team: Spanish <https://hosted.weblate.org/projects/galette/auto-"
22-
"plugin/es/>\n"
20+
"PO-Revision-Date: 2024-10-18 12:15+0000\n"
21+
"Last-Translator: gallegonovato <[email protected]>\n"
22+
"Language-Team: Spanish <https://hosted.weblate.org/projects/galette/"
23+
"auto-plugin/es/>\n"
2324
"Language: es\n"
2425
"MIME-Version: 1.0\n"
2526
"Content-Type: text/plain; charset=UTF-8\n"
2627
"Content-Transfer-Encoding: 8bit\n"
2728
"Plural-Forms: nplurals=2; plural=n != 1;\n"
28-
"X-Generator: Weblate 5.1-dev\n"
29+
"X-Generator: Weblate 5.8-rc\n"
2930

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

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

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

159159
#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:332
160160
msgid "New"
161-
msgstr "Crear"
161+
msgstr "Nuevo"
162162

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

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

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

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

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

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

235230
#: ../lib/GaletteAuto/Controllers/Crud/PropertiesController.php:627
236-
#, fuzzy, php-format
237-
#| msgid "%count %property have been successfully deleted."
231+
#, php-format
238232
msgid "%1$s brand has been successfully deleted."
239233
msgid_plural "%1$s brands have been successfully deleted."
240-
msgstr[0] "%count propiedad %property ha sido correctamente eliminada."
241-
msgstr[1] "%count propiedad %property ha sido correctamente eliminada."
234+
msgstr[0] "La marca %1$s ha sido eliminada correctamente."
235+
msgstr[1] "Las marcas %1$s han sido eliminadas correctamente."
242236

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

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

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

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

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

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

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

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

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

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

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

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

304290
#: ../lib/GaletteAuto/Controllers/Controller.php:90
305291
msgid "You do not have enough privileges."
@@ -460,11 +446,11 @@ msgstr "Modelo"
460446
#: ../lib/GaletteAuto/Auto.php:173 ../tempcache/vehicles.html.twig:404
461447
#: ../tempcache/history.html.twig:70 ../tempcache/history.html.twig:142
462448
msgid "Registration"
463-
msgstr "Registro"
449+
msgstr "Inscripción"
464450

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

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

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

538524
#: ../lib/GaletteAuto/Auto.php:741
539525
#, php-format

lang/auto_fr_FR.utf8.po

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ msgstr ""
1616
"Project-Id-Version: fr_FR@euro\n"
1717
"Report-Msgid-Bugs-To: [email protected]\n"
1818
"POT-Creation-Date: 2024-02-23 08:39+0100\n"
19-
"PO-Revision-Date: 2024-07-02 19:43+0000\n"
19+
"PO-Revision-Date: 2024-09-15 07:51+0000\n"
2020
"Last-Translator: Johan Cwiklinski <[email protected]>\n"
2121
"Language-Team: French <https://hosted.weblate.org/projects/galette/"
2222
"auto-plugin/fr/>\n"
@@ -25,7 +25,7 @@ msgstr ""
2525
"Content-Type: text/plain; charset=UTF-8\n"
2626
"Content-Transfer-Encoding: 8bit\n"
2727
"Plural-Forms: nplurals=2; plural=n > 1;\n"
28-
"X-Generator: Weblate 5.7-dev\n"
28+
"X-Generator: Weblate 5.8-dev\n"
2929

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

388388
#: ../lib/GaletteAuto/Color.php:100
389389
#, php-format

lang/es.utf8/LC_MESSAGES/auto.mo

3.4 KB
Binary file not shown.

lang/fr_FR.utf8/LC_MESSAGES/auto.mo

1 Byte
Binary file not shown.

lib/GaletteAuto/PluginGaletteAuto.php

+12-9
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,12 @@ public static function getPublicMenusItemsList(): array
140140
}
141141

142142
/**
143-
* Get dashboards contents
143+
* Get current logged-in user dashboards contents
144144
*
145145
* @return array|array[]
146146
*/
147-
public static function getDashboardsContents(): array
147+
public static function getMyDashboardsContents(): array
148148
{
149-
/** @var Login $login */
150-
global $login;
151-
152-
if ($login->isSuperAdmin()) {
153-
return [];
154-
}
155-
156149
return [
157150
[
158151
'label' => _T("My cars", "auto"),
@@ -164,6 +157,16 @@ public static function getDashboardsContents(): array
164157
];
165158
}
166159

160+
/**
161+
* Get dashboards contents
162+
*
163+
* @return array|array[]
164+
*/
165+
public static function getDashboardsContents(): array
166+
{
167+
return [];
168+
}
169+
167170
/**
168171
* Get actions contents
169172
*

templates/default/vehicles.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@
314314

315315
{% block javascripts %}
316316
<script type="text/javascript">
317-
{% include "elements/js/choose_adh.js.twig" with {"js_chosen_id": "#owner"} %}
317+
{% include "elements/js/choose_adh.js.twig" with {"js_chosen_id": "#owner_id"} %}
318318
319319
$(function() {
320320
$('#brand').dropdown('setting', 'onChange', function(id_brand) {

0 commit comments

Comments
 (0)