Files
voculinux/src/vocalinux/app_identity.py
T
soubarnak ea7be5f111 feat(identity): rename user-visible identity to voculinux with one-time legacy import
The fork takes its own name everywhere a user can see it: binaries
(voculinux, voculinux-gui), desktop entry, autostart, tray, D-Bus
namespace (com.voculinux.Voculinux, no alias for the old name),
config/data/cache dirs, single-instance lock, IBus engine identity,
tray icons, resource prefixes, VOCULINUX_* environment names, and the
update-checker user agent. The internal Python module stays vocalinux
and the distribution metadata keeps the upstream URLs as provenance.

On first run a previous Vocalinux install's config.json, custom
dictionary, and portal restore token are copied once into the new
locations (new config always wins, no merge, no write-back); models
re-resolve through the pinned-checksum download path. An offline
naming-sweep test proves no old-name strings remain on user-visible
surfaces outside the allowlist.

Refs #18
2026-11-06 01:29:39 +05:30

85 lines
2.9 KiB
Python

"""Central user-visible application identity for Voculinux.
Ticket #18 rename: every user-visible identity string that is hardcoded in
more than one place is driven from this single module. The fork takes its
own name everywhere a user can see it; the internal ``voculinux`` Python
package name is retained (see :data:`RETAINED_SURFACES`) and unrelated to
these values.
One-time legacy import of a previous Voculinux install lives in
:mod:`vocalinux.legacy_import` and keys off :data:`LEGACY_APP_DIR_NAME`.
"""
APP_NAME: str = "Voculinux"
APP_ID: str = "voculinux"
APP_DIR_NAME: str = "voculinux"
CLI_PROG: str = "voculinux"
BUS_NAME: str = "com.voculinux.Voculinux"
OBJECT_PATH: str = "/com/voculinux/Voculinux"
INTERFACE_NAME: str = "com.voculinux.Voculinux"
DESKTOP_FILENAME: str = "voculinux.desktop"
DESKTOP_ICON_NAME: str = "voculinux"
TRAY_TITLE: str = APP_NAME
ICON_DEFAULT: str = "voculinux-microphone-off"
ICON_ACTIVE: str = "voculinux-microphone"
ICON_PROCESSING: str = "voculinux-microphone-process"
ICON_BASE_NAMES: tuple[str, ...] = (
"voculinux",
ICON_ACTIVE,
ICON_DEFAULT,
ICON_PROCESSING,
)
ENGINE_NAME: str = "voculinux"
ENGINE_LONGNAME: str = "Voculinux"
ENGINE_DESCRIPTION: str = "Voculinux voice dictation (use as default input method)"
COMPONENT_NAME: str = "org.freedesktop.IBus.Voculinux"
IBUS_DIR_NAME: str = "voculinux-ibus"
IBUS_TEXTDOMAIN: str = "voculinux"
UPDATE_CHECKER_USER_AGENT: str = "Voculinux-UpdateChecker"
RESOURCE_DIR_NAME: str = "voculinux"
VERIFICATION_STAMP_NAME: str = ".voculinux_verified"
LOG_FILE_PREFIX: str = "voculinux_logs_"
PORTAL_TOKEN_PREFIX: str = "voculinux_"
ENV_FORCE_BACKEND: str = "VOCULINUX_FORCE_BACKEND"
ENV_INJECT_MODIFIER_WAIT: str = "VOCULINUX_INJECT_MODIFIER_WAIT"
ENV_YDOTOOL_KEY_DELAY: str = "VOCULINUX_YDOTOOL_KEY_DELAY"
SITE_URL: str = "https://voculinux.com"
#: Previous install locations read once by the legacy importer. Never written.
LEGACY_APP_DIR_NAME: str = "vocalinux"
LEGACY_BUS_NAME: str = "com.vocalinux.Vocalinux"
#: Files the rename ticket (#18) flipped. Checked by
#: ``tests/test_app_identity.py`` so the list cannot drift silently.
RENAME_SURFACES: tuple[str, ...] = (
"pyproject.toml",
"voculinux.desktop",
"snap/gui/voculinux.desktop",
"snap/snapcraft.yaml",
"packaging/flatpak/com.voculinux.Voculinux.desktop",
"packaging/flatpak/com.voculinux.Voculinux.metainfo.xml",
"packaging/flatpak/com.voculinux.Voculinux.yml",
"packaging/aur/voculinux-bin/voculinux.desktop",
"web/src/app/page.tsx",
"web/package.json",
"README.md",
"docs/INSTALL.md",
)
#: Surfaces deliberately never renamed (internal module name, upstream URLs,
#: history). Recorded here so the rename ticket does not touch them.
RETAINED_SURFACES: tuple[str, ...] = (
"src/vocalinux (Python import package name)",
"https://github.com/VocaHQ/vocalinux (upstream URLs and provenance)",
"CHANGELOG.md (historical changelog entries)",
)