#!/usr/bin/python3
"""A launcher for the application."""

import gettext
import locale
import sys

APP_ID = "io.github.zefr0x.hashes"
PKG_DATA_DIR = "/usr/lib/io.github.zefr0x.hashes"
LOCALE_DIR = "/usr/share/locale"

sys.path.insert(1, PKG_DATA_DIR)

locale.bindtextdomain(APP_ID, LOCALE_DIR)
locale.textdomain(APP_ID)
gettext.bindtextdomain(APP_ID, LOCALE_DIR)
gettext.textdomain(APP_ID)


def main() -> int:
    """Entry point for the application."""
    from hashes.ui.main import main_ui

    main_ui(sys.argv)

    return 0


if __name__ == "__main__":
    raise SystemExit(main())
