Repository Public
1/**2 * =============================================================================3 * SP BOUCHER | INFRASTRUCTURE & AUTOMATION4 * ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project : MacLustr Social Engine & Remote Navigator8 * File : apps/navigator-web/src/i18n.ts9 * Module : navigator-web10 * Repository : https://git.spboucher.ai/maclustr-social11 * Project Website : https://social.spboucher.ai12 * Created : 2026-12-0113 * Last Modified : 2026-12-0114 *15 * Author : Simon-Pierre Boucher16 * Position : Professor of Finance17 * Institution : Université du Québec en Outaouais (UQO)18 * Organization : SP Boucher19 * Website : https://spboucher.ai20 * Git : https://git.spboucher.ai21 *22 * Preferred Contact: admin@spboucher.ai23 * Technical Contact: dev@spboucher.ai24 * Security/Admin : admin@spboucher.ai25 *26 * Copyright (c) 202627 * Simon-Pierre Boucher28 * All rights reserved where applicable. This file is governed by the29 * applicable project license, copyright notices and relevant law.30 * Existing third-party rights and notices remain unaffected.31 *32 * License : None specified (no license file in this repository)33 *34 * Do not embed credentials, private keys, access tokens,35 * certificates or confidential personal information.36 *37 * =============================================================================38 * END OF SP BOUCHER SOURCE HEADER39 * =============================================================================40 */4142// Every user-visible string goes through this dictionary. French is the default; English mirrors it key for key43// (the `en` object is typed against `fr`, so a missing translation is a compile error).44import { createContext, useContext } from 'react';4546const fr = {47 'common.working': 'En cours…', 'common.loading': 'Chargement…', 'common.dismiss': 'Fermer', 'common.cancel': 'Annuler', 'common.close': 'Fermer', 'common.retry': 'Réessayer', 'common.refresh': 'Actualiser',48 'err.label': 'Erreur.',49 'auth.private': 'Service privé. Accès réservé aux personnes autorisées ; chaque action est journalisée.',50 'auth.title': 'Connexion', 'auth.lead': 'La connexion se fait uniquement par clé d’accès (passkey). Aucun mot de passe n’est demandé ici.', 'auth.signin': 'Se connecter avec une clé d’accès',51 'setup.title': 'Activation du compte', 'setup.lead': 'Ce lien vous permet de créer votre clé d’accès pour ce domaine. Il est à usage unique et expire après 30 minutes.', 'setup.create': 'Créer ma clé d’accès', 'setup.no_token': 'Ce lien d’activation est incomplet. Demandez-en un nouveau à un propriétaire.',52 'handoff.title': 'Passage depuis MacLustr Social', 'handoff.no_ticket': 'Aucun ticket dans ce lien.', 'handoff.to_login': 'Aller à la connexion', 'handoff.working': 'Vérification du ticket…',53 'passkey.title': 'Aucune clé d’accès pour ce domaine', 'passkey.lead': 'Vous êtes arrivé ici par un passage depuis l’autre domaine. Ajoutez une clé d’accès pour vous connecter directement à navigator la prochaine fois.', 'passkey.add': 'Ajouter une clé d’accès pour ce domaine',54 'em.engage_open': 'Arrêt d’urgence', 'em.release_open': 'Arrêt d’urgence engagé',55 'em.engage_title': 'Engager l’arrêt d’urgence', 'em.release_title': 'Lever l’arrêt d’urgence',56 'em.engage_lead': 'Tous les agents sont interrompus, les navigateurs distants sont fermés et plus aucune entrée n’est transmise, pour toutes les sessions. Seul un propriétaire pourra lever l’arrêt.',57 'em.release_lead': 'Les sessions pourront être rouvertes et les agents pourront reprendre selon la politique.',58 'em.owner_only': 'Seul un propriétaire peut lever l’arrêt d’urgence.', 'em.reason': 'Raison (obligatoire, inscrite au journal)',59 'em.engage_confirm': 'Je confirme vouloir tout arrêter maintenant.', 'em.release_confirm': 'Je confirme que la cause est comprise et que l’arrêt peut être levé.',60 'em.engage_do': 'Tout arrêter', 'em.release_do': 'Lever l’arrêt',61 'em.banner': 'Arrêt d’urgence engagé.', 'em.banner_x': 'Aucune entrée n’est transmise et aucun agent ne travaille.', 'em.banner_reason': 'Raison :',62 'list.title': 'Sessions du navigateur distant', 'list.lead': 'Chaque session est un vrai Chromium, avec son propre profil, sur un Mac dédié. Vous pouvez toujours regarder ; pour agir, il faut prendre le contrôle.',63 'list.revoked_title': 'Session « {label} » révoquée', 'list.reminder_ack': 'J’ai compris', 'list.reminder_default': 'Fermez aussi la session depuis les paramètres de sécurité de Facebook.',64 'list.empty': 'Aucune session. Créez-en une ci-dessous.', 'list.revoked': 'Sessions révoquées récentes ({n})',65 'list.worker': 'Worker', 'list.browser': 'Navigateur', 'list.browser_closed': 'fermé (profil conservé sur le worker)', 'list.browser_wanted': 'demandé ouvert',66 'list.control': 'Contrôle', 'list.last_host': 'Dernier hôte', 'list.scope': 'Pages confirmées', 'list.scope_n': '{n} · confirmé le {when}', 'list.scope_none': 'session non confirmée', 'list.reason': 'Motif',67 'list.open': 'Ouvrir', 'list.revoke_warn': 'Révoquer ferme le navigateur et efface le profil local (témoins, stockage) sur le worker. C’est définitif : il faudra créer une nouvelle session et s’y reconnecter à la main.', 'list.revoke_confirm': 'Révoquer définitivement',68 'workers.title': 'Workers', 'workers.empty': 'Aucun worker enregistré.', 'workers.name': 'Nom', 'workers.status': 'État', 'workers.host': 'Hôte', 'workers.beat': 'Dernier signe de vie',69 'wstatus.online': 'en ligne', 'wstatus.offline': 'hors ligne', 'wstatus.disabled': 'désactivé', 'wstatus._': '{code}',70 'lease.none': 'personne', 'lease.you': 'vous', 'lease.other_human': 'une autre personne', 'lease.agent': 'un agent',71 'act.take': 'Prendre le contrôle', 'act.release': 'Libérer le contrôle', 'act.pause': 'Suspendre', 'act.resume': 'Reprendre', 'act.reopen': 'Rouvrir le navigateur', 'act.close': 'Fermer le navigateur', 'act.revoke': 'Révoquer…',72 'create.title': 'Nouvelle session', 'create.lead': 'Crée un profil de navigateur neuf sur le worker choisi. Aucun identifiant n’est saisi ici : la connexion au site se fait ensuite à la main, dans le navigateur distant.',73 'create.label': 'Libellé', 'create.worker': 'Worker', 'create.no_worker': 'Aucun worker disponible', 'create.url': 'Adresse de départ (facultatif)', 'create.url_hint': 'Doit appartenir à la liste d’hôtes autorisés par la politique.', 'create.submit': 'Créer la session', 'create.done': 'Session créée :',74 'prefs.lang': 'Switch to English', 'prefs.to_light': 'Passer au thème clair', 'prefs.to_dark': 'Passer au thème sombre',75 'bar.social': 'MacLustr Social', 'bar.logout': 'Se déconnecter',76 'nf.title': 'Page introuvable', 'nf.lead': 'Cette adresse ne correspond à aucun écran.', 'nf.back': 'Retour aux sessions',77 'state.UNINITIALIZED': 'Non initialisée', 'state.LOGIN_REQUIRED': 'Connexion requise', 'state.MANUAL_CONTROL': 'Contrôle manuel', 'state.READY': 'Prête', 'state.BUSY': 'Agent au travail',78 'state.SECURITY_CHALLENGE': 'Vérification de sécurité', 'state.EXPIRED': 'Expirée', 'state.PAUSED': 'Suspendue', 'state.FAILED': 'En échec', 'state.REVOKED': 'Révoquée', 'state._': '{code}',79 'statex.UNINITIALIZED': 'Le navigateur n’a pas encore été observé par le worker.',80 'statex.LOGIN_REQUIRED': 'Le site demande une connexion. Un humain doit prendre le contrôle et se connecter lui-même.',81 'statex.MANUAL_CONTROL': 'Un humain pilote. Les agents sont suspendus, rien n’est enregistré.',82 'statex.READY': 'Session confirmée : les agents peuvent travailler sur les pages du périmètre.',83 'statex.BUSY': 'Un agent exécute une tâche. Prendre le contrôle l’interrompt immédiatement.',84 'statex.SECURITY_CHALLENGE': 'Le site présente une vérification de sécurité. Contrôle manuel requis, aucun agent n’y touche.',85 'statex.EXPIRED': 'La connexion au site a expiré. Reprenez le contrôle pour vous reconnecter.',86 'statex.PAUSED': 'Suspendue par un administrateur. Aucun agent ne peut l’utiliser.',87 'statex.FAILED': 'Le navigateur ou le worker a rencontré une erreur.',88 'statex.REVOKED': 'Révoquée : profil effacé, session inutilisable.', 'statex._': '',89 'confirm.title': 'Confirmer la session', 'confirm.lead': 'Une fois connecté au site, indiquez les pages que cette session a le droit de gérer.', 'confirm.no_pages': 'Aucune page confirmée. Déclarez et confirmez les pages dans MacLustr Social.',90 'confirm.pages': 'Pages confirmées', 'confirm.attest': 'J’atteste être connecté moi-même, dans ce navigateur, au compte qui administre ces pages.',91 'confirm.after': 'Après avoir libéré le contrôle, la session devient « Prête » pour ces pages seulement.', 'confirm.submit': 'Confirmer pour {n} page(s)', 'confirm.done': 'Périmètre enregistré. Libérez le contrôle pour que la session devienne « Prête ».',92 'confirm.unavailable': 'Disponible seulement pendant que vous contrôlez la session (état « Contrôle manuel »).',93 'assist.title': 'Publications à faire', 'assist.lead': 'Publications approuvées en attente d’un humain, sur les pages du périmètre de cette session.',94 'assist.human_publishes': 'Sur Facebook, c’est vous qui cliquez sur « Publier ». MacLustr ne clique jamais ce bouton à votre place.',95 'assist.empty': 'Rien en attente pour cette session.', 'assist.mode': 'Mode', 'assist.hash': 'Empreinte du contenu', 'assist.media': 'Médias approuvés', 'assist.link': 'Lien', 'assist.alt': 'Texte de remplacement', 'assist.text': 'Texte approuvé',96 'assist.need_control': 'Prenez le contrôle pour agir dans le navigateur.', 'assist.open_composer': 'Ouvrir le compositeur', 'assist.insert': 'Insérer le texte approuvé',97 'assist.insert_hint': 'Le texte est tapé dans le champ qui a le focus dans la page distante : cliquez d’abord dans le champ de publication.', 'assist.insert_off': 'L’insertion du texte est désactivée par la politique.',98 'assist.attach': 'Joindre les médias approuvés', 'assist.no_media': 'Cette publication n’a aucun média approuvé.', 'assist.cancel_chooser': 'Annuler le choix de fichier',99 'assist.ext_url': 'Adresse de la publication (facultatif)', 'assist.published_attest': 'J’ai cliqué moi-même sur « Publier » et la publication est visible.', 'assist.published': 'J’ai publié',100 'assist.authorize_hint': 'Cette tâche est en soumission automatique : elle attend votre autorisation explicite.', 'assist.authorize': 'Autoriser la soumission',101 'assist.published_ok': 'Publication attestée.', 'assist.authorized_ok': 'Soumission autorisée.',102 'jobmode.manual_assisted': 'manuel assisté', 'jobmode.prepare_only': 'préparation seulement', 'jobmode.auto_submit': 'soumission automatique', 'jobmode._': '{code}',103 'viewer.stage_label': 'Navigateur distant', 'viewer.stage_help': 'Vue en direct du navigateur distant. Les entrées ne sont transmises que lorsque vous avez le contrôle. Ctrl+Alt+Échap rend le clavier à cette page.',104 'viewer.kb_label': 'Clavier vers le navigateur distant', 'viewer.clipboard_off': 'Le presse-papiers est désactivé par la politique : copier et coller ne sont pas transmis.',105 'viewer.need_control': 'Lecture seule : prenez le contrôle pour agir.', 'viewer.sessions': 'Sessions', 'viewer.latency': 'Latence aller-retour',106 'viewer.kb_captured': 'Clavier transmis · Ctrl+Alt+Échap pour sortir', 'viewer.tabs': 'Onglets du navigateur distant', 'viewer.tab_untitled': 'Sans titre', 'viewer.tab_close': 'Fermer l’onglet {title}',107 'viewer.location': 'Page affichée', 'viewer.no_location': 'Adresse inconnue pour l’instant', 'viewer.reset_zoom': 'Réinitialiser le zoom', 'viewer.side': 'Session et publications', 'viewer.side_close': 'Fermer le panneau', 'viewer.side_open': 'Ouvrir le panneau session et publications', 'viewer.toolbar': 'Commandes du navigateur distant',108 'blocked.host_not_allowed': 'Navigation refusée : ce site ne fait pas partie de la liste autorisée par la politique. {url}', 'blocked.scheme_forbidden': 'Navigation refusée : seules les adresses http(s) sont permises.',109 'blocked.invalid_url': 'Cette adresse n’est pas valide.', 'blocked.credentials_in_url': 'Navigation refusée : une adresse ne doit pas contenir d’identifiants.', 'blocked.private_network': 'Navigation refusée : adresse d’un réseau privé.',110 'blocked.plaintext_forbidden': 'Navigation refusée : la connexion doit être chiffrée (https).', 'blocked.emergency_stop': 'Navigation refusée : arrêt d’urgence engagé.', 'blocked._': 'Navigation refusée par la politique ({code}). {url}',111 'notice.download_blocked': 'Téléchargement bloqué : les téléchargements sont désactivés dans le navigateur distant.', 'notice.dialog': 'La page a ouvert une boîte de dialogue ({message}) ; elle a été fermée automatiquement.', 'notice.no_file_chooser': 'Aucun sélecteur de fichier n’est ouvert dans la page distante.', 'notice._': 'Avis du worker : {code} {message}',112 'assisted.text': 'Texte approuvé inséré dans le champ actif.', 'assisted.media': 'Médias approuvés transmis au sélecteur de fichier.', 'assisted._': 'Assistance effectuée ({kind}).',113 'wserr.no_control': 'Entrée refusée : vous n’avez pas (ou plus) le contrôle.', 'wserr.worker_offline': 'Le worker est hors ligne : l’entrée n’a pas été transmise.', 'wserr.invalid_message': 'Le serveur a refusé un message (format invalide).',114 'wserr.assist_refused': 'Assistance refusée par le serveur.', 'wserr.policy_forbids_insert': 'La politique interdit l’insertion du texte approuvé.', 'wserr.not_lease_holder': 'Refusé : vous ne détenez pas le contrôle de cette session.', 'wserr.media_not_approved': 'Refusé : ces médias ne font pas partie du contenu approuvé.',115 'wserr.unknown_message': 'Message inconnu reçu du serveur ({code}).', 'wserr._': 'Erreur signalée par le serveur : {code}',116 'problem.decode_failed': 'Une image reçue n’a pas pu être décodée.', 'problem.bad_frame': 'Une image mal formée a été reçue et ignorée.', 'problem.bad_json': 'Un message illisible a été reçu du serveur.',117 'problem.send_failed': 'Envoi impossible : la connexion n’est pas ouverte.', 'problem.socket_failed': 'Impossible d’ouvrir la connexion temps réel.', 'problem.no_pong': 'Le serveur ne répond plus : reconnexion.',118 'lost.lease_lost': 'Contrôle perdu : le bail a expiré ou a été repris.', 'lost.emergency_stop': 'Contrôle retiré : arrêt d’urgence.', 'lost.state_changed': 'Contrôle retiré : l’état de la session a changé.', 'lost.no_control': 'Contrôle perdu : le serveur refuse vos entrées.',119 'lost.disconnected': 'Contrôle suspendu : connexion perdue. Il ne sera pas repris automatiquement.', 'lost.taken': 'Contrôle repris par un autre détenteur.', 'lost.released': 'Contrôle libéré.', 'lost.other_human': 'Une autre personne contrôle la session.', 'lost._': 'Contrôle perdu ({code}).',120 'ph.unauthorized': 'Session de connexion expirée', 'ph.unauthorized.x': 'Reconnectez-vous pour revoir le navigateur distant.',121 'ph.connecting': 'Connexion en cours', 'ph.connecting.x': 'Ouverture du canal temps réel.',122 'ph.reconnecting': 'Connexion perdue', 'ph.reconnecting.x': 'Nouvel essai dans {s} s. Le contrôle ne sera pas repris automatiquement.',123 'ph.not_found': 'Session introuvable', 'ph.not_found.x': 'Elle n’existe pas ou vous n’y avez pas accès.',124 'ph.worker_offline': 'Worker hors ligne', 'ph.worker_offline.x': 'Le Mac qui héberge ce navigateur n’est pas connecté à la passerelle. Aucune image n’est disponible.',125 'ph.browser_closed': 'Navigateur fermé', 'ph.browser_closed.x': 'Le navigateur de cette session n’est pas ouvert. Rouvrez-le depuis la liste des sessions.',126 'ph.emergency': 'Arrêt d’urgence engagé', 'ph.emergency.x': 'Les navigateurs distants sont fermés.',127 'ph.first_frame': 'En attente de la première image', 'ph.first_frame.x': 'Le worker est en ligne ; aucune image n’a encore été reçue.',128 'ph.frozen_closed': 'Navigateur fermé — dernière image reçue, plus en direct',129 'conn.open': 'Connecté', 'conn.connecting': 'Connexion…', 'conn.unauthorized': 'Non connecté', 'conn.waiting': 'Déconnecté · essai dans {s} s', 'conn.stopped': 'Arrêté', 'conn.retry_now': 'Réessayer', 'conn.signin': 'Se reconnecter',130 'mode.control': 'Vous contrôlez', 'mode.readonly': 'Lecture seule', 'mode.agent': 'Un agent travaille (BUSY)', 'mode.challenge': 'Vérification de sécurité : contrôle manuel requis', 'mode.emergency': 'Arrêt d’urgence', 'mode.readonly_x': 'Vous regardez ; rien de ce que vous faites ici n’est transmis.',131 'privacy.title': 'Vous tapez directement dans le vrai site.', 'privacy.body': 'MacLustr n’enregistre ni les frappes, ni les captures, ni l’écran, et les agents sont suspendus tant que dure le contrôle manuel.',132 'chooser.title': 'La page distante demande un fichier.', 'chooser.with_job': 'Vous pouvez joindre les médias approuvés de la publication sélectionnée.', 'chooser.no_job': 'Seuls les médias approuvés d’une publication en attente peuvent être joints ; aucun fichier de votre appareil n’est envoyé. Sélectionnez une publication ou annulez.', 'chooser.pick': 'Choisir une publication',133 'nav.back': 'Page précédente', 'nav.forward': 'Page suivante', 'nav.reload': 'Recharger', 'nav.address': 'Adresse à ouvrir (liste autorisée seulement)', 'nav.address_ph': 'Aller à… (hôtes autorisés)', 'nav.go': 'Ouvrir l’adresse',134 'nav.zoom': 'Zoom de la page distante', 'nav.zoom_out': 'Réduire le zoom distant', 'nav.zoom_in': 'Augmenter le zoom distant', 'nav.fit_on': 'Adapter à l’écran (actif) — passer à la taille fixe 1280×800', 'nav.fit_off': 'Taille fixe 1280×800 (active) — adapter à l’écran', 'nav.fit_short': 'Adapté',135 'nav.kb_show': 'Afficher le clavier', 'nav.kb_hide': 'Masquer le clavier', 'nav.fs_enter': 'Plein écran', 'nav.fs_exit': 'Quitter le plein écran', 'nav.more': 'Plus de commandes',136} as const;137138export type Key = keyof typeof fr;139const en: Record<Key, string> = {140 'common.working': 'Working…', 'common.loading': 'Loading…', 'common.dismiss': 'Dismiss', 'common.cancel': 'Cancel', 'common.close': 'Close', 'common.retry': 'Retry', 'common.refresh': 'Refresh',141 'err.label': 'Error.',142 'auth.private': 'Private service. Authorised people only; every action is logged.',143 'auth.title': 'Sign in', 'auth.lead': 'Sign-in is by passkey only. No password is ever asked here.', 'auth.signin': 'Sign in with a passkey',144 'setup.title': 'Account activation', 'setup.lead': 'This link lets you create your passkey for this domain. It is single-use and expires after 30 minutes.', 'setup.create': 'Create my passkey', 'setup.no_token': 'This activation link is incomplete. Ask an owner for a new one.',145 'handoff.title': 'Arriving from MacLustr Social', 'handoff.no_ticket': 'No ticket in this link.', 'handoff.to_login': 'Go to sign-in', 'handoff.working': 'Checking the ticket…',146 'passkey.title': 'No passkey for this domain', 'passkey.lead': 'You arrived through a handoff from the other domain. Add a passkey to sign in to navigator directly next time.', 'passkey.add': 'Add a passkey for this domain',147 'em.engage_open': 'Emergency stop', 'em.release_open': 'Emergency stop engaged',148 'em.engage_title': 'Engage the emergency stop', 'em.release_title': 'Release the emergency stop',149 'em.engage_lead': 'Every agent is interrupted, remote browsers are closed and no input is forwarded any more, for all sessions. Only an owner can release the stop.',150 'em.release_lead': 'Sessions can be reopened and agents may resume as the policy allows.',151 'em.owner_only': 'Only an owner can release the emergency stop.', 'em.reason': 'Reason (required, written to the audit log)',152 'em.engage_confirm': 'I confirm I want to stop everything now.', 'em.release_confirm': 'I confirm the cause is understood and the stop can be released.',153 'em.engage_do': 'Stop everything', 'em.release_do': 'Release the stop',154 'em.banner': 'Emergency stop engaged.', 'em.banner_x': 'No input is forwarded and no agent is working.', 'em.banner_reason': 'Reason:',155 'list.title': 'Remote browser sessions', 'list.lead': 'Each session is a real Chromium with its own profile on a dedicated Mac. You can always watch; to act you must take control.',156 'list.revoked_title': 'Session “{label}” revoked', 'list.reminder_ack': 'Understood', 'list.reminder_default': 'Also sign the session out from Facebook’s own security settings.',157 'list.empty': 'No session yet. Create one below.', 'list.revoked': 'Recently revoked sessions ({n})',158 'list.worker': 'Worker', 'list.browser': 'Browser', 'list.browser_closed': 'closed (profile kept on the worker)', 'list.browser_wanted': 'requested open',159 'list.control': 'Control', 'list.last_host': 'Last host', 'list.scope': 'Confirmed pages', 'list.scope_n': '{n} · confirmed {when}', 'list.scope_none': 'session not confirmed', 'list.reason': 'Reason',160 'list.open': 'Open', 'list.revoke_warn': 'Revoking closes the browser and wipes the local profile (cookies, storage) on the worker. This is final: a new session must be created and signed in by hand.', 'list.revoke_confirm': 'Revoke permanently',161 'workers.title': 'Workers', 'workers.empty': 'No worker registered.', 'workers.name': 'Name', 'workers.status': 'Status', 'workers.host': 'Host', 'workers.beat': 'Last heartbeat',162 'wstatus.online': 'online', 'wstatus.offline': 'offline', 'wstatus.disabled': 'disabled', 'wstatus._': '{code}',163 'lease.none': 'nobody', 'lease.you': 'you', 'lease.other_human': 'another person', 'lease.agent': 'an agent',164 'act.take': 'Take control', 'act.release': 'Release control', 'act.pause': 'Pause', 'act.resume': 'Resume', 'act.reopen': 'Reopen browser', 'act.close': 'Close browser', 'act.revoke': 'Revoke…',165 'create.title': 'New session', 'create.lead': 'Creates a fresh browser profile on the chosen worker. No credential is typed here: signing in to the site is done by hand afterwards, in the remote browser.',166 'create.label': 'Label', 'create.worker': 'Worker', 'create.no_worker': 'No worker available', 'create.url': 'Start address (optional)', 'create.url_hint': 'Must belong to the hosts allowed by the policy.', 'create.submit': 'Create session', 'create.done': 'Session created:',167 'prefs.lang': 'Passer au français', 'prefs.to_light': 'Switch to light theme', 'prefs.to_dark': 'Switch to dark theme',168 'bar.social': 'MacLustr Social', 'bar.logout': 'Sign out',169 'nf.title': 'Page not found', 'nf.lead': 'This address matches no screen.', 'nf.back': 'Back to sessions',170 'state.UNINITIALIZED': 'Uninitialised', 'state.LOGIN_REQUIRED': 'Login required', 'state.MANUAL_CONTROL': 'Manual control', 'state.READY': 'Ready', 'state.BUSY': 'Agent working',171 'state.SECURITY_CHALLENGE': 'Security check', 'state.EXPIRED': 'Expired', 'state.PAUSED': 'Paused', 'state.FAILED': 'Failed', 'state.REVOKED': 'Revoked', 'state._': '{code}',172 'statex.UNINITIALIZED': 'The worker has not observed the browser yet.',173 'statex.LOGIN_REQUIRED': 'The site asks for a sign-in. A human must take control and sign in personally.',174 'statex.MANUAL_CONTROL': 'A human is driving. Agents are suspended, nothing is recorded.',175 'statex.READY': 'Session confirmed: agents may work on the pages in scope.',176 'statex.BUSY': 'An agent is running a task. Taking control interrupts it at once.',177 'statex.SECURITY_CHALLENGE': 'The site shows a security check. Manual control required; no agent touches it.',178 'statex.EXPIRED': 'The site sign-in expired. Take control to sign in again.',179 'statex.PAUSED': 'Paused by an administrator. No agent may use it.',180 'statex.FAILED': 'The browser or the worker hit an error.',181 'statex.REVOKED': 'Revoked: profile wiped, session unusable.', 'statex._': '',182 'confirm.title': 'Confirm session', 'confirm.lead': 'Once signed in to the site, state which pages this session is allowed to manage.', 'confirm.no_pages': 'No confirmed page. Declare and confirm pages in MacLustr Social.',183 'confirm.pages': 'Confirmed pages', 'confirm.attest': 'I attest that I signed in myself, in this browser, to the account that administers these pages.',184 'confirm.after': 'After you release control, the session becomes “Ready” for these pages only.', 'confirm.submit': 'Confirm for {n} page(s)', 'confirm.done': 'Scope saved. Release control for the session to become “Ready”.',185 'confirm.unavailable': 'Available only while you control the session (state “Manual control”).',186 'assist.title': 'Posts to publish', 'assist.lead': 'Approved posts waiting for a human, on pages in this session’s scope.',187 'assist.human_publishes': 'On Facebook, you click “Publish” yourself. MacLustr never clicks that button for you.',188 'assist.empty': 'Nothing waiting for this session.', 'assist.mode': 'Mode', 'assist.hash': 'Content hash', 'assist.media': 'Approved media', 'assist.link': 'Link', 'assist.alt': 'Alt text', 'assist.text': 'Approved text',189 'assist.need_control': 'Take control to act in the browser.', 'assist.open_composer': 'Open the composer', 'assist.insert': 'Insert the approved text',190 'assist.insert_hint': 'The text is typed into the field that has focus in the remote page: click in the post field first.', 'assist.insert_off': 'Text insertion is disabled by policy.',191 'assist.attach': 'Attach the approved media', 'assist.no_media': 'This post has no approved media.', 'assist.cancel_chooser': 'Cancel the file request',192 'assist.ext_url': 'Address of the post (optional)', 'assist.published_attest': 'I clicked “Publish” myself and the post is visible.', 'assist.published': 'I published it',193 'assist.authorize_hint': 'This job is in automatic submission: it is waiting for your explicit authorisation.', 'assist.authorize': 'Authorise submission',194 'assist.published_ok': 'Publication attested.', 'assist.authorized_ok': 'Submission authorised.',195 'jobmode.manual_assisted': 'manual, assisted', 'jobmode.prepare_only': 'prepare only', 'jobmode.auto_submit': 'automatic submission', 'jobmode._': '{code}',196 'viewer.stage_label': 'Remote browser', 'viewer.stage_help': 'Live view of the remote browser. Input is forwarded only while you hold control. Ctrl+Alt+Escape gives the keyboard back to this page.',197 'viewer.kb_label': 'Keyboard to the remote browser', 'viewer.clipboard_off': 'The clipboard is disabled by policy: copy and paste are not forwarded.',198 'viewer.need_control': 'Read only: take control to act.', 'viewer.sessions': 'Sessions', 'viewer.latency': 'Round-trip latency',199 'viewer.kb_captured': 'Keyboard forwarded · Ctrl+Alt+Esc to leave', 'viewer.tabs': 'Remote browser tabs', 'viewer.tab_untitled': 'Untitled', 'viewer.tab_close': 'Close tab {title}',200 'viewer.location': 'Page shown', 'viewer.no_location': 'Address not known yet', 'viewer.reset_zoom': 'Reset zoom', 'viewer.side': 'Session and posts', 'viewer.side_close': 'Close the panel', 'viewer.side_open': 'Open the session and posts panel', 'viewer.toolbar': 'Remote browser controls',201 'blocked.host_not_allowed': 'Navigation refused: this site is not on the list allowed by the policy. {url}', 'blocked.scheme_forbidden': 'Navigation refused: only http(s) addresses are allowed.',202 'blocked.invalid_url': 'This address is not valid.', 'blocked.credentials_in_url': 'Navigation refused: an address must not contain credentials.', 'blocked.private_network': 'Navigation refused: private network address.',203 'blocked.plaintext_forbidden': 'Navigation refused: the connection must be encrypted (https).', 'blocked.emergency_stop': 'Navigation refused: emergency stop engaged.', 'blocked._': 'Navigation refused by policy ({code}). {url}',204 'notice.download_blocked': 'Download blocked: downloads are disabled in the remote browser.', 'notice.dialog': 'The page opened a dialog ({message}); it was closed automatically.', 'notice.no_file_chooser': 'No file chooser is open in the remote page.', 'notice._': 'Worker notice: {code} {message}',205 'assisted.text': 'Approved text inserted into the focused field.', 'assisted.media': 'Approved media handed to the file chooser.', 'assisted._': 'Assistance done ({kind}).',206 'wserr.no_control': 'Input refused: you do not (or no longer) hold control.', 'wserr.worker_offline': 'The worker is offline: the input was not forwarded.', 'wserr.invalid_message': 'The server refused a message (invalid format).',207 'wserr.assist_refused': 'Assistance refused by the server.', 'wserr.policy_forbids_insert': 'The policy forbids inserting the approved text.', 'wserr.not_lease_holder': 'Refused: you do not hold control of this session.', 'wserr.media_not_approved': 'Refused: these media are not part of the approved content.',208 'wserr.unknown_message': 'Unknown message received from the server ({code}).', 'wserr._': 'Error reported by the server: {code}',209 'problem.decode_failed': 'A received picture could not be decoded.', 'problem.bad_frame': 'A malformed picture was received and ignored.', 'problem.bad_json': 'An unreadable message was received from the server.',210 'problem.send_failed': 'Could not send: the connection is not open.', 'problem.socket_failed': 'Could not open the real-time connection.', 'problem.no_pong': 'The server stopped answering: reconnecting.',211 'lost.lease_lost': 'Control lost: the lease expired or was taken over.', 'lost.emergency_stop': 'Control withdrawn: emergency stop.', 'lost.state_changed': 'Control withdrawn: the session state changed.', 'lost.no_control': 'Control lost: the server refuses your input.',212 'lost.disconnected': 'Control suspended: connection lost. It will not be taken back automatically.', 'lost.taken': 'Control taken by another holder.', 'lost.released': 'Control released.', 'lost.other_human': 'Another person controls the session.', 'lost._': 'Control lost ({code}).',213 'ph.unauthorized': 'Sign-in session expired', 'ph.unauthorized.x': 'Sign in again to see the remote browser.',214 'ph.connecting': 'Connecting', 'ph.connecting.x': 'Opening the real-time channel.',215 'ph.reconnecting': 'Connection lost', 'ph.reconnecting.x': 'Next attempt in {s} s. Control will not be taken back automatically.',216 'ph.not_found': 'Session not found', 'ph.not_found.x': 'It does not exist or you have no access to it.',217 'ph.worker_offline': 'Worker offline', 'ph.worker_offline.x': 'The Mac hosting this browser is not connected to the gateway. No picture is available.',218 'ph.browser_closed': 'Browser closed', 'ph.browser_closed.x': 'This session’s browser is not open. Reopen it from the session list.',219 'ph.emergency': 'Emergency stop engaged', 'ph.emergency.x': 'Remote browsers are closed.',220 'ph.first_frame': 'Waiting for the first picture', 'ph.first_frame.x': 'The worker is online; no picture has been received yet.',221 'ph.frozen_closed': 'Browser closed — last picture received, no longer live',222 'conn.open': 'Connected', 'conn.connecting': 'Connecting…', 'conn.unauthorized': 'Signed out', 'conn.waiting': 'Disconnected · retry in {s} s', 'conn.stopped': 'Stopped', 'conn.retry_now': 'Retry now', 'conn.signin': 'Sign in again',223 'mode.control': 'You are in control', 'mode.readonly': 'Read only', 'mode.agent': 'An agent is working (BUSY)', 'mode.challenge': 'Security check: manual control required', 'mode.emergency': 'Emergency stop', 'mode.readonly_x': 'You are watching; nothing you do here is forwarded.',224 'privacy.title': 'You are typing directly into the real site.', 'privacy.body': 'MacLustr records no keystrokes, no captures and no screen, and agents are suspended for as long as manual control lasts.',225 'chooser.title': 'The remote page is asking for a file.', 'chooser.with_job': 'You can attach the approved media of the selected post.', 'chooser.no_job': 'Only the approved media of a pending post can be attached; no file from your device is sent. Select a post or cancel.', 'chooser.pick': 'Choose a post',226 'nav.back': 'Back', 'nav.forward': 'Forward', 'nav.reload': 'Reload', 'nav.address': 'Address to open (allowed list only)', 'nav.address_ph': 'Go to… (allowed hosts)', 'nav.go': 'Open address',227 'nav.zoom': 'Remote page zoom', 'nav.zoom_out': 'Zoom out (remote)', 'nav.zoom_in': 'Zoom in (remote)', 'nav.fit_on': 'Fit to screen (on) — switch to fixed size 1280×800', 'nav.fit_off': 'Fixed size 1280×800 (on) — fit to screen', 'nav.fit_short': 'Fit',228 'nav.kb_show': 'Show keyboard', 'nav.kb_hide': 'Hide keyboard', 'nav.fs_enter': 'Full screen', 'nav.fs_exit': 'Exit full screen', 'nav.more': 'More controls',229};230231export type Lang = 'fr' | 'en';232export type Vars = Record<string, string | number>;233export type T = (key: Key, vars?: Vars) => string;234const dict: Record<Lang, Record<Key, string>> = { fr, en };235export const hasKey = (k: string): k is Key => Object.prototype.hasOwnProperty.call(fr, k);236export function makeT(lang: Lang): T {237 return (key, vars) => {238 const s = dict[lang][key] ?? fr[key] ?? key;239 return vars ? s.replace(/\{(\w+)\}/g, (_, n: string) => (vars[n] !== undefined ? String(vars[n]) : '')).trim() : s;240 };241}242/** For codes coming from the server: a known code gets plain language, an unknown one is shown as is. */243export function tCode(t: T, prefix: string, code: string, vars: Vars = {}): string {244 const k = `${prefix}.${code}`;245 return hasKey(k) ? t(k, vars) : hasKey(`${prefix}._`) ? t(`${prefix}._` as Key, { ...vars, code }) : code;246}247248export const LangCtx = createContext<{ lang: Lang; t: T; setLang: (l: Lang) => void }>({ lang: 'fr', t: makeT('fr'), setLang: () => {} });249export const useT = (): T => useContext(LangCtx).t;250export const useLang = () => useContext(LangCtx);251