Add Phase 5 enhancements: security, i18n, analysis, backup, notifications

- Database v8 migration: tags, pinned, avg_startup_ms columns
- Security scanning with CVE matching and batch scan
- Bundled library extraction and vulnerability reports
- Desktop notification system for security alerts
- Backup/restore system for AppImage configurations
- i18n framework with gettext support
- Runtime analysis and Wayland compatibility detection
- AppStream metadata and Flatpak-style build support
- File watcher module for live directory monitoring
- Preferences panel with GSettings integration
- CLI interface for headless operation
- Detail view: tabbed layout with ViewSwitcher in title bar,
  health score, sandbox controls, changelog links
- Library view: sort dropdown, context menu enhancements
- Dashboard: system status, disk usage, launch history
- Security report page with scan and export
- Packaging: meson build, PKGBUILD, metainfo
This commit is contained in:
lashman
2026-02-27 17:16:41 +02:00
parent a7ed3742fb
commit 423323d5a9
51 changed files with 10583 additions and 481 deletions

34
src/i18n.rs Normal file
View File

@@ -0,0 +1,34 @@
/// Mark a string for translation.
/// Currently a passthrough; will use gettext when locale support is wired up.
pub fn i18n(msgid: &str) -> String {
msgid.to_string()
}
/// Translate a string with singular/plural forms.
pub fn ni18n(singular: &str, plural: &str, n: u32) -> String {
if n == 1 {
singular.to_string()
} else {
plural.to_string()
}
}
/// Translate a string and replace named placeholders.
pub fn i18n_f(msgid: &str, args: &[(&str, &str)]) -> String {
let mut result = msgid.to_string();
for (key, value) in args {
result = result.replace(key, value);
}
result
}
/// Translate a string with singular/plural forms and named placeholders.
#[allow(dead_code)]
pub fn ni18n_f(singular: &str, plural: &str, n: u32, args: &[(&str, &str)]) -> String {
let base = if n == 1 { singular } else { plural };
let mut result = base.to_string();
for (key, value) in args {
result = result.replace(key, value);
}
result
}