#!/usr/bin/python3
"""Explain 32-bit vendor support in the user's selected display language."""
import os
import subprocess
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk

he = os.environ.get("LANG", "").startswith("he")
dialog = Gtk.MessageDialog(
    message_type=Gtk.MessageType.INFO,
    text="תאימות יישומים במחשב זה" if he else "App compatibility on this computer")
dialog.set_direction(Gtk.TextDirection.RTL if he else Gtk.TextDirection.LTR)
dialog.format_secondary_text(
    "במחשב זה מותקן דפדפן ⁦Firefox ESR⁩. ⁦Google Chrome⁩ זמין ללינוקס במחשבי ⁦64-bit⁩. "
    "התמיכה של ⁦Zoom⁩ במערכות הפעלה ובדפדפנים של ⁦32-bit⁩ הסתיימה בדצמבר ⁦2025⁩. "
    "כדי להצטרף לפגישה, העתיקו את הקישור למחשב נתמך או לטלפון עם יישום ⁦Zoom⁩."
    if he else
    "Firefox ESR is installed on this computer. Google provides Chrome for 64-bit Linux. "
    "Zoom ended support for 32-bit operating systems and browsers in December 2025. "
    "To join a meeting, copy your meeting link to a supported computer or to a phone with the Zoom app.")
dialog.add_button("פתיחת Firefox" if he else "Open Firefox", 1)
dialog.add_button("סגירה" if he else "Close", 0)
selected = dialog.run()
dialog.destroy()
if selected == 1:
    subprocess.Popen(["/usr/bin/firefox-esr"])
