Backend: Improve Yes/No capabilities #5191

* Backend: improve Yes/No capabilities
* Backend: constants package with Yes/No maps and True/False strings
* Backend: rename constants to enum
* Backend: correct case on russian Yes, more tests
* Enum: utilise enum package
This commit is contained in:
Keith Martin
2025-10-10 21:15:15 +10:00
committed by GitHub
parent 1d216f2dfc
commit b1822229ca
14 changed files with 239 additions and 101 deletions

25
pkg/enum/enum.go Normal file
View File

@@ -0,0 +1,25 @@
/*
Package enum provides declarations of enum.
Copyright (c) 2018 - 2025 PhotoPrism UG. All rights reserved.
This program is free software: you can redistribute it and/or modify
it under Version 3 of the GNU Affero General Public License (the "AGPL"):
<https://docs.photoprism.app/license/agpl>
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
The AGPL is supplemented by our Trademark and Brand Guidelines,
which describe how our Brand Assets may be used:
<https://www.photoprism.app/trademark>
Feel free to send an email to hello@photoprism.app if you have questions,
want to support our work, or just want to say hello.
Additional information can be found in our Developer Guide:
<https://docs.photoprism.app/developer-guide/>
*/
package enum