42 Commits

Author SHA1 Message Date
Bernd Bestel
fdbb8a045a
Optimized performance of GetProductDetails 2023-09-01 17:03:22 +02:00
Bernd Bestel
d006436d49
Upgraded PHP-CS-Fixer / applied optimized rules 2023-08-02 18:44:30 +02:00
Bernd Bestel
6c4cc00fd5
Added PHP 8.2 support 2023-08-01 21:23:59 +02:00
Bernd Bestel
d9667b4534
Removed type conversions where no longer needed
PHP 8.1 PDO SQLite now returns native data types
2023-02-06 20:22:10 +01:00
Bernd Bestel
38a4ad8ec4
Upgraded to PHP 8.1 2022-12-10 15:19:11 +01:00
Bernd Bestel
af7de61c43
Typo 2022-05-14 17:11:40 +02:00
Bernd Bestel
5406448be0
Use singular localization form when plural form is not provided (closes #1878) 2022-05-14 17:10:48 +02:00
Bernd Bestel
37744822d8
Handle not having any QU in LocalizationService (fixes #1783) 2022-02-12 22:31:35 +01:00
Bernd Bestel
dd36301460
Use same plural definition for QU translator (references #1705) 2022-02-07 20:42:54 +01:00
Bernd Bestel
12e5377c40
Split application translation strings and QU strings (fixes #1705) 2022-02-06 21:09:34 +01:00
Bernd Bestel
282168f92c
Potentially fix a type mismatch problem (fixes #1629) 2021-09-29 09:21:45 +02:00
Bernd Bestel
616e1dd5d7
Fixed negative number plural form handling (fixes #1601) 2021-09-06 22:26:31 +02:00
Bernd Bestel
edfa404ed6
Squashed commit
Always execute migration 9999 (can be used to fix things manually)
Optimized meal plan navigation / date range filtering
Prepared next release
Pulled translations from Transifex
Various code optimizations
2021-07-16 17:32:08 +02:00
Bernd Bestel
b0d38b87de
PHP 8 support 2021-07-05 17:48:34 +02:00
Bernd Bestel
cb24a7149f
Revert "Upgraded gettext/gettext (+ JS-Translator)"
This reverts commit 9abb92763d2122ce6cc00c2f0531f0969a3cccd4.
2021-07-04 21:47:55 +02:00
Bernd Bestel
9abb92763d
Upgraded gettext/gettext (+ JS-Translator) 2021-07-04 21:47:10 +02:00
Bernd Bestel
836bcc82e5
Applied PHP-CS-Fixer rules 2020-09-01 21:29:47 +02:00
Bernd Bestel
d4c5da2173
Applied PHP formatting rules 2020-08-31 20:40:31 +02:00
fipwmaqzufheoxq92ebc
6f8ad9b76e
Locales: use http-accept-language or cookie (#976)
* Locales: use http-accept-language or "language"-cookie

* Add user-setting "locale"

Rename CULTURE to DEFAULT_LOCALE

* Use LocaleMiddleware also in dev mode

* CORS: don't require authentication on OPTIONS

* Use a standard user-settings-control and start a new generic user settings page, not a separate page for the locale setting

* Fixed (broken by myself) link-return handling

* Clarify language settings

* Removed unneeded files

* Better user settings icon

* Added localization hints

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-08-31 19:11:51 +02:00
Bernd Bestel
3b0d29bed0
Applied EditorConfig settings to all files 2020-08-29 16:41:27 +02:00
fipwmaqzufheoxq92ebc
b7d1b21f1d
[WIP] Implemented basic permissions (#960)
* Add permissions to Database & add "User"-classes

* Add UI & API for Permissions, protect "User"-(Api)-Controller with new permissions.

* Add some permissions.

* Add permission localization

* Add error handling.

* Error pages: only redirect on 404

* ExceptionController: return JSON-Response on api-routes

* Rename PRODUCT_ADD to PRODUCT_PURCHASE

* Move translation to new file

* Fix checkboxes stay selected on reload.

* Remove configurable User-implementation

* Remove MASTER_DATA_READ

* Disable buttons the user isn't allowed to use.

* Add default permissions for new users

* When migration to permissions, everyone starts as ADMIN

* Permission-Localization: add to transifex & LocalizationService

* Review

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-08-29 12:05:32 +02:00
Bernd Bestel
b62d3b02e6
Only add not empty translation strings to POT in DEV mode 2020-04-12 20:31:30 +02:00
Bernd Bestel
615de378ba
Don't load demo_data strings in production setups 2020-04-12 14:22:18 +02:00
James Addison
4f8ef2859e
Fixup: paths for localization file existence checks (#710) 2020-04-09 08:29:44 +02:00
Bernd Bestel
4072dfd26f
Use default strings if any of the minor translation files is not available 2020-04-05 08:40:42 +02:00
zebardy
1a5f3ce926
Convert services to singletons and use lazy loading to improve performance (#479)
* use singletons to reduce need to recreate the same objects

* unable to make the constructor private

* comment out debug printing to log file

* correct typo of treating self() as a var instead of a function

* utilise Localisation service as a singleton

* fix errent line that should have been commented

* remove phpinfo

* correct mistake in stock controller

* try storing app in apcu

* serialise inside the app closures

* get timings for db-changed-time

* get timings for db-changed-time

* store localisation service in apcu

* stor translations in apcu instead of localisation service (due to database connection)

* correct syntax error

* forgot to uncomment instance map

* correct indentation and variable out of scope

* more timings for app execution time

* try apc caching for views

* correct scope for Pot variable

* remove additional fopen

* correct timings for app build time

* correct timings for app object build time

* correct timings for app route build time

* get timings for routing timings

* get more in depth timings for routing loading

* fix more in depth timings for routing loading

* start investigating session auth middleware creation

* start investigating session auth middleware creation

* start investigating Login controller time

* start investigating Login controller time

* in depth look at Logincontroller timings

* comment out debug printing

* lazily obtain valus for page rendering

* correct syntax error

* correct scope of variable

* correct visibiity of methds inherited from BaseController

* missing use for Userfieldsservice

* lazy loading of open api spec

* lazy loading of users service

* lazy loading of batteries service

* lazy loading of services in controllers

* lazy loading of services in services

* correct mistake

* fix userservice

* fix userservice

* fix userfieldservice

* fix chores service

* fix calendar service

* remove Dockerfile used for development

* Remove docker compose file used for development

* Clean up app.php

* remove last diff

* Clean up base controller

* Clean up controllers

* lean up middleware

* Clean up and tuen all services into singletons

* remove debug from routes.php

* remove acpu from localisation

* Complete removal of acpu from localisation

* fixes for things broken

* More fixes following merge

* Fix for start up bug. Re factoring singleton code had brroken due to scope of clas var.

* fix bug where getUsersService is declared twice

* bug fixes following merge

* bug fixes following merge

* bug fixes following merge

* bug fixes following merge

* bug fixes following merge

* Fix all the not working things...

* Deleted off-topic files

* Deleted off-topic files

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-03-01 17:47:47 +01:00
Bernd Bestel
74f9470769
Implemented that chores can be assigned to users (closes #253) 2019-09-17 13:13:26 +02:00
Bernd Bestel
9f2481a6a8
Fixed an issue when a plural translation is empty/null (can be the case for quantity units, fixes #259) 2019-06-08 16:32:23 +02:00
Bernd Bestel
d412b81eae
Hotfix (will be included in v2.4.0 release): Fixed a potential problem when the plural form of a translation (e. g. plural forms for user defined quantity units) is NULL 2019-05-10 21:22:53 +02:00
Bernd Bestel
3f53919ddd
Also allow placeholders for plural translations (references #161) 2019-05-07 19:42:35 +02:00
Bernd Bestel
970e5edfa3
Fixed an issue with translations string without an placeholder (references #161) 2019-05-04 15:13:01 +02:00
Bernd Bestel
4912dd56d1
Finished migration to use gettext (this now closes #161) 2019-05-02 20:20:18 +02:00
Bernd Bestel
9b2dba2397
Migrated (hopefully) all translations to PO/Gettext (references #161) 2019-05-01 20:19:18 +02:00
Bernd Bestel
40b5afe926
Backup current state of LocalizationService.php (references #161)
This will serve as a permanent backup for the migration algorithm used to migrate all current translation files to PO/Gettext
2019-05-01 20:04:06 +02:00
Bernd Bestel
fc11da3c3f
Started working on user-defined-fields for all entities (references #176) 2019-04-22 22:16:35 +02:00
Bernd Bestel
8041dd9c26
Support single quotes in demo data 2018-11-24 20:39:17 +01:00
Bernd Bestel
83985e9f21
Migrate translations to use Transifex 2018-11-03 14:29:14 +01:00
Bernd Bestel
f451e65278
Also log missing localization found in frontend (only when MODE == dev) 2018-09-30 13:02:07 +02:00
Bernd Bestel
bcbdf58376
Prefix all global vars 2018-07-24 19:41:35 +02:00
Bernd Bestel
3b4141eb4d
Prepare for embedded mode 2018-07-16 21:17:32 +02:00
Bernd Bestel
734814d96b
More or less finalize recipes feature 2018-07-14 22:49:42 +02:00
Bernd Bestel
4656a85732
Added localization support 2018-04-16 19:11:32 +02:00