| 1 | package Daje::Plugin::Users::Languages; | ||
| 2 | use Mojo::Base -base, -signatures; | ||
| 3 | use v5.42; | ||
| 4 | |||
| 5 | # NAME | ||
| 6 | # ==== | ||
| 7 | # | ||
| 8 | # Daje::Plugin::Users::Languages - Model class | ||
| 9 | # | ||
| 10 | # SYNOPSIS | ||
| 11 | # ======== | ||
| 12 | # | ||
| 13 | # | ||
| 14 | # | ||
| 15 | # | ||
| 16 | # DESCRIPTION | ||
| 17 | # =========== | ||
| 18 | # | ||
| 19 | # Daje::Plugin::Users::Languages is the standard routes | ||
| 20 | # | ||
| 21 | # METHODS | ||
| 22 | # ======= | ||
| 23 | # | ||
| 24 | # | ||
| 25 | # LICENSE | ||
| 26 | # ======= | ||
| 27 | # | ||
| 28 | # Copyright (C) janeskil1525. | ||
| 29 | # | ||
| 30 | # This library is free software; you can redistribute it and/or modify | ||
| 31 | # it under the same terms as Perl itself. | ||
| 32 | # | ||
| 33 | # AUTHOR | ||
| 34 | # ====== | ||
| 35 | # | ||
| 36 | # janeskil1525 E<lt>janeskil1525@gmail.com | ||
| 37 | # | ||
| 38 | |||
| 39 | # This file is generated automatically by Daje Tools 2026-04-01 11:11:57. | ||
| 40 | # It will be generated by Daje Tools again. | ||
| 41 | # <!-- Autogenerated file 2026-04-01 11:11:57 --> | ||
| 42 | |||
| 43 | use Daje::Helper::Languages::InsertKeys; | ||
| 44 | |||
| 45 | has 'db'; | ||
| 46 | |||
| 47 | sub language($self) { | ||
| 48 | |||
| 49 | try { | ||
| 50 | my $tx = $self->db->begin; | ||
| 51 | my @keys; | ||
| 52 | push @keys, { | ||
| 53 | plugin => 'users', | ||
| 54 | key => 'users', | ||
| 55 | field => 'table', | ||
| 56 | type => 'Label', | ||
| 57 | translation => 'Users', | ||
| 58 | comment => 'Users of the app', | ||
| 59 | }; | ||
| 60 | push @keys, { | ||
| 61 | plugin => 'users', | ||
| 62 | key => 'users', | ||
| 63 | field => 'workflow', | ||
| 64 | type => 'Label', | ||
| 65 | translation => 'Workflow', | ||
| 66 | comment => 'This users workflow' | ||
| 67 | }; | ||
| 68 | push @keys, { | ||
| 69 | plugin => 'users', | ||
| 70 | key => 'users', | ||
| 71 | field => 'workflow', | ||
| 72 | type => 'Tool tips', | ||
| 73 | translation => 'This users workflow', | ||
| 74 | comment => 'This users workflow' | ||
| 75 | }; | ||
| 76 | |||
| 77 | push @keys, { | ||
| 78 | plugin => 'users', | ||
| 79 | key => 'users', | ||
| 80 | field => 'avatar', | ||
| 81 | type => 'Label', | ||
| 82 | translation => 'Avatar', | ||
| 83 | comment => 'Users avatar' | ||
| 84 | }; | ||
| 85 | push @keys, { | ||
| 86 | plugin => 'users', | ||
| 87 | key => 'users', | ||
| 88 | field => 'avatar', | ||
| 89 | type => 'Tool tips', | ||
| 90 | translation => 'Users avatar', | ||
| 91 | comment => 'Users avatar' | ||
| 92 | }; | ||
| 93 | |||
| 94 | push @keys, { | ||
| 95 | plugin => 'users', | ||
| 96 | key => 'users', | ||
| 97 | field => 'password', | ||
| 98 | type => 'Label', | ||
| 99 | translation => 'Password', | ||
| 100 | comment => 'Must be minimum 8 characters long and a mix of upper and lowercase and numbers' | ||
| 101 | }; | ||
| 102 | push @keys, { | ||
| 103 | plugin => 'users', | ||
| 104 | key => 'users', | ||
| 105 | field => 'password', | ||
| 106 | type => 'Tool tips', | ||
| 107 | translation => 'Must be minimum 8 characters long and a mix of upper and lowercase and numbers', | ||
| 108 | comment => 'Must be minimum 8 characters long and a mix of upper and lowercase and numbers' | ||
| 109 | }; | ||
| 110 | |||
| 111 | push @keys, { | ||
| 112 | plugin => 'users', | ||
| 113 | key => 'users', | ||
| 114 | field => 'active', | ||
| 115 | type => 'Label', | ||
| 116 | translation => 'Active', | ||
| 117 | comment => 'Is user active ?' | ||
| 118 | }; | ||
| 119 | push @keys, { | ||
| 120 | plugin => 'users', | ||
| 121 | key => 'users', | ||
| 122 | field => 'active', | ||
| 123 | type => 'Tool tips', | ||
| 124 | translation => 'Is user active ?', | ||
| 125 | comment => 'Is user active ?' | ||
| 126 | }; | ||
| 127 | |||
| 128 | push @keys, { | ||
| 129 | plugin => 'users', | ||
| 130 | key => 'users', | ||
| 131 | field => 'mail', | ||
| 132 | type => 'Label', | ||
| 133 | translation => 'eMail', | ||
| 134 | comment => 'eMail address of the user, must be a valid eMail address' | ||
| 135 | }; | ||
| 136 | push @keys, { | ||
| 137 | plugin => 'users', | ||
| 138 | key => 'users', | ||
| 139 | field => 'mail', | ||
| 140 | type => 'Tool tips', | ||
| 141 | translation => 'eMail address of the user, must be a valid eMail address', | ||
| 142 | comment => 'eMail address of the user, must be a valid eMail address' | ||
| 143 | }; | ||
| 144 | |||
| 145 | push @keys, { | ||
| 146 | plugin => 'users', | ||
| 147 | key => 'users', | ||
| 148 | field => 'name', | ||
| 149 | type => 'Label', | ||
| 150 | translation => 'Name', | ||
| 151 | comment => 'Full name of user' | ||
| 152 | }; | ||
| 153 | push @keys, { | ||
| 154 | plugin => 'users', | ||
| 155 | key => 'users', | ||
| 156 | field => 'name', | ||
| 157 | type => 'Tool tips', | ||
| 158 | translation => 'Full name of user', | ||
| 159 | comment => 'Full name of user' | ||
| 160 | }; | ||
| 161 | |||
| 162 | push @keys, { | ||
| 163 | plugin => 'users', | ||
| 164 | key => 'users', | ||
| 165 | field => 'comment', | ||
| 166 | type => 'Label', | ||
| 167 | translation => 'Comment', | ||
| 168 | comment => 'Comment regarding user' | ||
| 169 | }; | ||
| 170 | push @keys, { | ||
| 171 | plugin => 'users', | ||
| 172 | key => 'users', | ||
| 173 | field => 'comment', | ||
| 174 | type => 'Tool tips', | ||
| 175 | translation => 'Comment regarding user', | ||
| 176 | comment => 'Comment regarding user' | ||
| 177 | }; | ||
| 178 | |||
| 179 | push @keys, { | ||
| 180 | plugin => 'users', | ||
| 181 | key => 'users', | ||
| 182 | field => 'position', | ||
| 183 | type => 'Label', | ||
| 184 | translation => 'Position', | ||
| 185 | comment => 'Position in the organisation' | ||
| 186 | }; | ||
| 187 | push @keys, { | ||
| 188 | plugin => 'users', | ||
| 189 | key => 'users', | ||
| 190 | field => 'position', | ||
| 191 | type => 'Tool tips', | ||
| 192 | translation => 'Position in the organisation', | ||
| 193 | comment => 'Position in the organisation' | ||
| 194 | }; | ||
| 195 | |||
| 196 | push @keys, { | ||
| 197 | plugin => 'users', | ||
| 198 | key => 'users', | ||
| 199 | field => 'biography', | ||
| 200 | type => 'Label', | ||
| 201 | translation => 'Biography', | ||
| 202 | comment => 'Users biography' | ||
| 203 | }; | ||
| 204 | push @keys, { | ||
| 205 | plugin => 'users', | ||
| 206 | key => 'users', | ||
| 207 | field => 'biography', | ||
| 208 | type => 'Tool tips', | ||
| 209 | translation => 'Users biography', | ||
| 210 | comment => 'Users biography' | ||
| 211 | }; | ||
| 212 | |||
| 213 | push @keys, { | ||
| 214 | plugin => 'users', | ||
| 215 | key => 'users', | ||
| 216 | field => 'role', | ||
| 217 | type => 'Label', | ||
| 218 | translation => 'Role', | ||
| 219 | comment => 'Users role, decides authorities ' | ||
| 220 | }; | ||
| 221 | push @keys, { | ||
| 222 | plugin => 'users', | ||
| 223 | key => 'users', | ||
| 224 | field => 'role', | ||
| 225 | type => 'Tool tips', | ||
| 226 | translation => 'Users role, decides authorities ', | ||
| 227 | comment => 'Users role, decides authorities ' | ||
| 228 | }; | ||
| 229 | |||
| 230 | push @keys, { | ||
| 231 | plugin => 'users', | ||
| 232 | key => 'users', | ||
| 233 | field => 'phone', | ||
| 234 | type => 'Label', | ||
| 235 | translation => 'Phone', | ||
| 236 | comment => 'Users phone number' | ||
| 237 | }; | ||
| 238 | push @keys, { | ||
| 239 | plugin => 'users', | ||
| 240 | key => 'users', | ||
| 241 | field => 'phone', | ||
| 242 | type => 'Tool tips', | ||
| 243 | translation => 'Users phone number', | ||
| 244 | comment => 'Users phone number' | ||
| 245 | }; | ||
| 246 | |||
| 247 | push @keys, { | ||
| 248 | plugin => 'users', | ||
| 249 | key => 'users', | ||
| 250 | field => 'department', | ||
| 251 | type => 'Label', | ||
| 252 | translation => 'Department', | ||
| 253 | comment => 'Department where user works' | ||
| 254 | }; | ||
| 255 | push @keys, { | ||
| 256 | plugin => 'users', | ||
| 257 | key => 'users', | ||
| 258 | field => 'department', | ||
| 259 | type => 'Tool tips', | ||
| 260 | translation => 'Department where user works', | ||
| 261 | comment => 'Department where user works' | ||
| 262 | }; | ||
| 263 | |||
| 264 | push @keys, { | ||
| 265 | plugin => 'users', | ||
| 266 | key => 'users', | ||
| 267 | field => 'employed', | ||
| 268 | type => 'Label', | ||
| 269 | translation => 'Employed', | ||
| 270 | comment => 'Is user employed or external' | ||
| 271 | }; | ||
| 272 | push @keys, { | ||
| 273 | plugin => 'users', | ||
| 274 | key => 'users', | ||
| 275 | field => 'employed', | ||
| 276 | type => 'Tool tips', | ||
| 277 | translation => 'Is user employed or external', | ||
| 278 | comment => 'Is user employed or external' | ||
| 279 | }; | ||
| 280 | |||
| 281 | push @keys, { | ||
| 282 | plugin => 'users', | ||
| 283 | key => 'users', | ||
| 284 | field => 'lan', | ||
| 285 | type => 'Label', | ||
| 286 | translation => 'Language', | ||
| 287 | comment => 'Users preferred language' | ||
| 288 | }; | ||
| 289 | push @keys, { | ||
| 290 | plugin => 'users', | ||
| 291 | key => 'users', | ||
| 292 | field => 'lan', | ||
| 293 | type => 'Tool tips', | ||
| 294 | translation => 'Users preferred language', | ||
| 295 | comment => 'Users preferred language' | ||
| 296 | }; | ||
| 297 | |||
| 298 | push @keys, { | ||
| 299 | plugin => 'users', | ||
| 300 | key => 'users', | ||
| 301 | field => 'verified', | ||
| 302 | type => 'Label', | ||
| 303 | translation => 'Verified', | ||
| 304 | comment => 'Is the users eMail verified ?' | ||
| 305 | }; | ||
| 306 | push @keys, { | ||
| 307 | plugin => 'users', | ||
| 308 | key => 'users', | ||
| 309 | field => 'verified', | ||
| 310 | type => 'Tool tips', | ||
| 311 | translation => 'Is the users eMail verified ?', | ||
| 312 | comment => 'Is the users eMail verified ?' | ||
| 313 | }; | ||
| 314 | |||
| 315 | push @keys, { | ||
| 316 | plugin => 'users', | ||
| 317 | key => 'users', | ||
| 318 | field => 'country', | ||
| 319 | type => 'Label', | ||
| 320 | translation => 'Country', | ||
| 321 | comment => 'Country' | ||
| 322 | }; | ||
| 323 | push @keys, { | ||
| 324 | plugin => 'users', | ||
| 325 | key => 'users', | ||
| 326 | field => 'country', | ||
| 327 | type => 'Tool tips', | ||
| 328 | translation => 'Country', | ||
| 329 | comment => 'Country' | ||
| 330 | }; | ||
| 331 | |||
| 332 | push @keys, { | ||
| 333 | plugin => 'users', | ||
| 334 | key => 'users', | ||
| 335 | field => 'city', | ||
| 336 | type => 'Label', | ||
| 337 | translation => 'City', | ||
| 338 | comment => 'City' | ||
| 339 | }; | ||
| 340 | push @keys, { | ||
| 341 | plugin => 'users', | ||
| 342 | key => 'users', | ||
| 343 | field => 'city', | ||
| 344 | type => 'Tool tips', | ||
| 345 | translation => 'City', | ||
| 346 | comment => 'City' | ||
| 347 | }; | ||
| 348 | |||
| 349 | push @keys, { | ||
| 350 | plugin => 'users', | ||
| 351 | key => 'users', | ||
| 352 | field => 'zipcode', | ||
| 353 | type => 'Label', | ||
| 354 | translation => 'Zipcode', | ||
| 355 | comment => 'Zipcode' | ||
| 356 | }; | ||
| 357 | push @keys, { | ||
| 358 | plugin => 'users', | ||
| 359 | key => 'users', | ||
| 360 | field => 'zipcode', | ||
| 361 | type => 'Tool tips', | ||
| 362 | translation => 'Zipcode', | ||
| 363 | comment => 'Zipcode' | ||
| 364 | }; | ||
| 365 | |||
| 366 | push @keys, { | ||
| 367 | plugin => 'users', | ||
| 368 | key => 'users', | ||
| 369 | field => 'addressline1', | ||
| 370 | type => 'Label', | ||
| 371 | translation => 'Address Line 1', | ||
| 372 | comment => 'Address Line 1' | ||
| 373 | }; | ||
| 374 | push @keys, { | ||
| 375 | plugin => 'users', | ||
| 376 | key => 'users', | ||
| 377 | field => 'addressline1', | ||
| 378 | type => 'Tool tips', | ||
| 379 | translation => 'Address Line 1', | ||
| 380 | comment => 'Address Line 1' | ||
| 381 | }; | ||
| 382 | |||
| 383 | push @keys, { | ||
| 384 | plugin => 'users', | ||
| 385 | key => 'users', | ||
| 386 | field => 'region', | ||
| 387 | type => 'Label', | ||
| 388 | translation => 'Region', | ||
| 389 | comment => 'Region' | ||
| 390 | }; | ||
| 391 | push @keys, { | ||
| 392 | plugin => 'users', | ||
| 393 | key => 'users', | ||
| 394 | field => 'region', | ||
| 395 | type => 'Tool tips', | ||
| 396 | translation => 'Region', | ||
| 397 | comment => 'Region' | ||
| 398 | }; | ||
| 399 | |||
| 400 | push @keys, { | ||
| 401 | plugin => 'users', | ||
| 402 | key => 'users', | ||
| 403 | field => 'addressline2', | ||
| 404 | type => 'Label', | ||
| 405 | translation => 'Address Line 2', | ||
| 406 | comment => 'Address Line 2' | ||
| 407 | }; | ||
| 408 | push @keys, { | ||
| 409 | plugin => 'users', | ||
| 410 | key => 'users', | ||
| 411 | field => 'addressline2', | ||
| 412 | type => 'Tool tips', | ||
| 413 | translation => 'Address Line 2', | ||
| 414 | comment => 'Address Line 2' | ||
| 415 | }; | ||
| 416 | |||
| 417 | push @keys, { | ||
| 418 | plugin => 'users', | ||
| 419 | key => 'users', | ||
| 420 | field => 'officelocation', | ||
| 421 | type => 'Label', | ||
| 422 | translation => 'Officelocation', | ||
| 423 | comment => 'Officelocation' | ||
| 424 | }; | ||
| 425 | push @keys, { | ||
| 426 | plugin => 'users', | ||
| 427 | key => 'users', | ||
| 428 | field => 'officelocation', | ||
| 429 | type => 'Tool tips', | ||
| 430 | translation => 'Officelocation', | ||
| 431 | comment => 'Officelocation' | ||
| 432 | }; | ||
| 433 | |||
| 434 | push @keys, { | ||
| 435 | plugin => 'users', | ||
| 436 | key => 'verification_codes', | ||
| 437 | field => 'table', | ||
| 438 | type => 'Label', | ||
| 439 | translation => 'Verification codes', | ||
| 440 | comment => 'Verification codes sent to users eMail address', | ||
| 441 | }; | ||
| 442 | push @keys, { | ||
| 443 | plugin => 'users', | ||
| 444 | key => 'verification_codes', | ||
| 445 | field => 'verification_code', | ||
| 446 | type => 'Label', | ||
| 447 | translation => 'Verification code', | ||
| 448 | comment => 'Verification code' | ||
| 449 | }; | ||
| 450 | push @keys, { | ||
| 451 | plugin => 'users', | ||
| 452 | key => 'verification_codes', | ||
| 453 | field => 'verification_code', | ||
| 454 | type => 'Tool tips', | ||
| 455 | translation => 'Verification code', | ||
| 456 | comment => 'Verification code' | ||
| 457 | }; | ||
| 458 | |||
| 459 | push @keys, { | ||
| 460 | plugin => 'users', | ||
| 461 | key => 'verification_codes', | ||
| 462 | field => 'users', | ||
| 463 | type => 'Label', | ||
| 464 | translation => 'User', | ||
| 465 | comment => 'User thats connected to verification code' | ||
| 466 | }; | ||
| 467 | push @keys, { | ||
| 468 | plugin => 'users', | ||
| 469 | key => 'verification_codes', | ||
| 470 | field => 'users', | ||
| 471 | type => 'Tool tips', | ||
| 472 | translation => 'User thats connected to verification code', | ||
| 473 | comment => 'User thats connected to verification code' | ||
| 474 | }; | ||
| 475 | |||
| 476 | push @keys, { | ||
| 477 | plugin => 'users', | ||
| 478 | key => 'documentation', | ||
| 479 | field => 'table', | ||
| 480 | type => 'Label', | ||
| 481 | translation => 'Any type of documentation that relates to user like CV certificates etc ', | ||
| 482 | comment => 'Any type of documentation that relates to user like CV certificates etc ', | ||
| 483 | }; | ||
| 484 | push @keys, { | ||
| 485 | plugin => 'users', | ||
| 486 | key => 'documentation', | ||
| 487 | field => 'document_name', | ||
| 488 | type => 'Label', | ||
| 489 | translation => 'Document name', | ||
| 490 | comment => 'Name of the document' | ||
| 491 | }; | ||
| 492 | push @keys, { | ||
| 493 | plugin => 'users', | ||
| 494 | key => 'documentation', | ||
| 495 | field => 'document_name', | ||
| 496 | type => 'Tool tips', | ||
| 497 | translation => 'Name of the document', | ||
| 498 | comment => 'Name of the document' | ||
| 499 | }; | ||
| 500 | |||
| 501 | push @keys, { | ||
| 502 | plugin => 'users', | ||
| 503 | key => 'documentation', | ||
| 504 | field => 'users', | ||
| 505 | type => 'Label', | ||
| 506 | translation => 'User', | ||
| 507 | comment => 'User document belongs to' | ||
| 508 | }; | ||
| 509 | push @keys, { | ||
| 510 | plugin => 'users', | ||
| 511 | key => 'documentation', | ||
| 512 | field => 'users', | ||
| 513 | type => 'Tool tips', | ||
| 514 | translation => 'User document belongs to', | ||
| 515 | comment => 'User document belongs to' | ||
| 516 | }; | ||
| 517 | |||
| 518 | push @keys, { | ||
| 519 | plugin => 'users', | ||
| 520 | key => 'documentation', | ||
| 521 | field => 'document_type', | ||
| 522 | type => 'Label', | ||
| 523 | translation => 'Type', | ||
| 524 | comment => 'Document type' | ||
| 525 | }; | ||
| 526 | push @keys, { | ||
| 527 | plugin => 'users', | ||
| 528 | key => 'documentation', | ||
| 529 | field => 'document_type', | ||
| 530 | type => 'Tool tips', | ||
| 531 | translation => 'Document type', | ||
| 532 | comment => 'Document type' | ||
| 533 | }; | ||
| 534 | |||
| 535 | |||
| 536 | Daje::Helper::Languages::InsertKeys->new( | ||
| 537 | db => $self->db | ||
| 538 | )->process( | ||
| 539 | \@keys | ||
| 540 | ); | ||
| 541 | $tx->commit(); | ||
| 542 | } catch($e) { | ||
| 543 | say $e; | ||
| 544 | } | ||
| 545 | } | ||
| 546 | |||
| 547 | 1; | ||
| 548 | |||
| 549 |