We can now distinguish between errors that should block the application, (hopefully)
transient ones that only warrant a snackbar and others that are only logged.
Adds a per-user language override in Settings that takes precedence over
the system locale, fixing #439. Selecting "System default" clears the
override and falls back to the existing localeListResolutionCallback.
Also declares CFBundleLocalizations in the iOS Info.plist so iOS 16+ users
get the native per-app language picker (Settings → wger → Language) as an
alternative entry point.
Implementation mirrors the existing themeMode flow on UserProvider, with
the selected locale persisted in SharedPreferences under PREFS_USER_LOCALE
and matched against AppLocalizations.supportedLocales on load to preserve
script-bearing locales (zh_Hant, pt_BR, ...).
The previous logic didn't consult the app's supportedLocales. For the Android 13 per-app
picker this was fine (the user picked a locale that's also in `locales_config.xml`), but
for users whose primary locale wasn't in the supportedLocales list but whose secondary
one *was*, the app would fall through to English instead of honoring the secondary
- added locales_config.xml with supported languages
- linked localeConfig in AndroidManifest.xml
- updated MaterialApp with localeListResolutionCallback for system sync
sqlite3_flutter_libs 0.6.0+eol no longer bundles the native SQLite
library correctly on newer Android toolchains, causing a
DriftRemoteException on startup (dlopen failed: libsqlite3.so not found).
Replace it with drift_flutter which is the current recommended package
for providing native SQLite to drift databases. Also suppress the
StackFrame assertion error from the stack_trace package that was masking
the real error.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Enhanced version parsing to handle Python/Django version formats more reliably
- Added serverUpdateRequired AuthState for proper UI routing
- Improved server version sanitization with better regex patterns
- Added UpdateServerScreen with localized user feedback
- Integrated into auth flow routing to show appropriate update messages
This allows us to show the logs to the user and also send them along with any
bug reports. This is a simple system that just keeps the last entries in memory
and nothing is stored permanently, but that's ok for our use case and can be
changed in the future if the need arises.
This shows the server errors directly in the form, instead of a modal dialog
(which is the default for all the other forms and places that throw the exception)
Now we process and catch all errors that might happen in the application, instead
of silently ignoring them. These errors are shown in a better error dialog, that
shows the details to the user and allows to create an issue on GitHub with the
error and traceback data already filled in.
Previously, this was only triggered when logging in to the application. If a user
just opened the app, it would just stop working. We also now always check this min
version and have removed the option from the android manifest file since disabling
this doesn't make much sense and we have many other platforms as well (iOS, flatpak)
The translations are not stored in a synthetic package anymore, but the
files are just copied to a specific folder so it can be more easily imported
Also, flutter_barcode_scanner was replaced by simple_barcode_scanner since
the first hasn't been updated in 3 years and was already causing problems
for some time
This allows the user to use the system settings as well, and not always force
light or dark mode in the app. Also move the logic to the UserProvider and
do some light refactoring.