4 Commits

Author SHA1 Message Date
Jursin
63948ddf11 i18n: localize app source names, supplement Chinese translations
- Replace hardcoded English source names with tr() in 8 app_sources
- Add huaweiAppGallery & telegramApp keys across all locale files
- Translate the English placeholder text into Chinese in zh.json
- Optimize Chinese punctuation and typography in zh.json
- Add Dhizuku to Shizuku-related strings in zh.json
2026-07-09 15:20:16 +08:00
Imran Remtulla
b4e8e4a2f3 Use hardcoded display names for sources instead of translation keys
Source names are proper nouns, not translatable strings. Replace raw
translation keys (fdroid, directAPKLink, etc.) with English display names
(F-Droid official, Direct APK link, etc.) and remove all tr() wrapping at
display sites. The original name = tr("key") pattern was a bug.

Source names changed:
  fdroid             -> F-Droid official
  directAPKLink      -> Direct APK link
  fdroidThirdPartyRepo -> F-Droid third-party repo
  tencentAppStore    -> Tencent App Store
  coolApk            -> CoolApk
  vivoAppStore       -> vivo App Store (CN)
  Telegram app       -> Telegram App
  githubStarredRepos -> GitHub starred repositories (GitHubStars)
2026-07-08 00:07:44 +01:00
Imran Remtulla
f14a11acf7 Prevent stale translations by converting form-item fields and names to getters
All form-item list fields (additionalSourceAppSpecificSettingFormItems,
sourceConfigSettingFormItems, searchQuerySettingFormItems) and
_commonAppSettingFormItems now use getters or computed keys instead of
frozen tr() at construction time, so labels pick up the current locale
on every access via the renderer's tr() wrapping.

- _commonAppSettingFormItems: final field -> getter
- additionalSourceAppSpecificSettingFormItems: mutable field -> getter (12 sources)
- sourceConfigSettingFormItems: mutable field -> getter (GitHub, GitLab)
- searchQuerySettingFormItems: mutable field -> getter (GitHub, Codeberg)
- HTML's intermediateFormItems/commonFormItems/finalStepFormitems: var -> getters
- FDroidRepo's runOnAddAppInputChange: list mutation -> _appIdFromUrl bool
- Source names: tr('fdroid') etc. -> raw key string; display sites wrap with tr()
- completeInstallationNotification: module-level final -> getter
- GitHubStars.name/requiredArgs: fields -> getters; MassAppUrlSource -> abstract getters
- Removed memoization caches (_combinedItemsCache, _hasAppSpecificSettingsCache,
  _flatCombinedFormItemsCache) now superseded by getter rebuilding
- Renderer: tr() wrapping on dropdown option values
2026-07-07 23:50:50 +01:00
Imran
f85d9206c7 Rearchitect (#3002)
* architecture: consolidate and simplify

- Collapse 14 directories into 4 (app_sources, components, pages, providers)
- Replace DI container with inline construction in main.dart
- Fold page controllers back into their pages (one file per screen)
- Merge small files into their natural homes (removing 40 files)
- Standardize error handling across all 28 app sources (rethrowOrWrapError)
- Make App immutable with copyWith() replacing deepCopy()
- Replace globalNavigatorKey with go_router
- Add error boundaries, source health monitor, typed settings
- Eliminate all silent catch blocks
- Add tests and CI pipeline
- Extend lint rules

97 files → 56 files. 0 errors, 4/4 tests passing.

* fix: remove unused go_router, restore internal navigation

- Drop go_router (ShellRoute broke tab switching and disabled the
  tablet/TV two-pane layout); revert to MaterialApp + navigatorKey
- Move appNavigatorKey into main.dart; delete router.dart
- Remove HomePage.child branch so the internal switcher drives the UI
- Fix dead 'Restart' button in the error fallback screen
- Remove TypedSettings []= mutation backdoor
- Persist clamped preferredApkIndex to the in-memory app map
- Use settings.getBool('trackOnly') instead of raw map access

* fix: remove dead rethrowOrWrapError, add missing import, update stale comments and docs

* fix: satisfy lint rules, wrap fire-and-forget futures, drop unused CI

- Fix use_build_context_synchronously via mounted/context.mounted guards
- Wrap deliberate fire-and-forget futures in unawaited()
- Document static app-lifetime event bus for close_sinks
- Apply dart format and dart fix across the codebase
- Drop avoid_catches_without_on_clauses (noisy in source scrapers)
- Remove test.yml CI workflow
- Rename test/services to test/providers

* fix: show real HTTP error messages, remove source health monitor and dead event-bus code

- Bypass deferred localization for HTTP_ERROR so the real reason phrase/status is shown instead of a generic 'unexpected error'
- Remove SourceHealthMonitor entirely (per-instance state made it ineffective for background checks)
- Simplify save-notification bus to StreamController<void>; drop unused AppRepositoryEvent/AppRepositoryEventType and events getter
- Scrub stale docs (SourceHealthMonitor, event type, deleted test.yml workflow)

* fix: preserve installedVersion on import, correct stale theme doc reference

* fix: type logger as Logger?, simplify ErrorWidget builder, document _sentinel, resolve TextDirection conflict

- Change dynamic logger to Logger? in AppsProvider for type safety (the
  field was unused but the contract should be explicit).
- Replace MaterialApp wrapper in ErrorWidget.builder with a minimal
  Directionality + Scaffold; MaterialApp is wasteful for a one-shot
  error screen.
- Add a doc comment explaining the _sentinel pattern used by
  App.copyWith to distinguish unset from explicitly-null nullable fields.
- Hide TextDirection from easy_localization (which re-exports intl's
  conflicting TextDirection enum that lacks ltr/rtl) so the Flutter
  dart:ui TextDirection.ltr resolves correctly.

* fix: register SourceForge, restore Palestine banner, drop dead code and tests

- Register the implemented SourceForge source in _buildSources() so the
  README's supported-sources list is accurate.
- Restore the Support Palestine banner in README.md (unintentionally removed).
- Remove unused ConfigProvider, CredentialHealth, getCredentialHealth, and
  the never-injected _configProvider path from settings_provider.
- Remove unit tests and their test-only dev dependencies.
2026-07-02 01:58:45 +01:00