diff --git a/docs/_DASHBOARD_MESSAGES.md b/docs/_DASHBOARD_MESSAGES.md index 50f6779d9..8e228f7b8 100644 --- a/docs/_DASHBOARD_MESSAGES.md +++ b/docs/_DASHBOARD_MESSAGES.md @@ -126,23 +126,23 @@ Separate store for reusable sender definitions: ```json { - "id": "director_of_football", - "name": "Director of Football", - "name_key": "be.sender.directorOfFootball", - "role": "Director of Football", - "role_key": "be.role.directorOfFootball", + "id": "general_manager", + "name": "General Manager", + "name_key": "be.sender.generalManager", + "role": "General Manager", + "role_key": "be.role.generalManager", "icon": "director.jpg" } ``` -Used by templates via `"sender": "director_of_football"` and by inline messages via `with_sender()`. +Used by templates via `"sender": "general_manager"` and by inline messages via `with_sender()`. ### Helper: `with_sender()` Applies sender name, role, and icon from the senders store to any `InboxMessage`: ```rust -crate::messages::with_sender(msg, "director_of_football", vec![("player", &name)]) +crate::messages::with_sender(msg, "general_manager", vec![("player", &name)]) ``` ## Data Format @@ -237,10 +237,10 @@ For template-based messages, the Rust `build_message()` resolves translations in | `season_schedule` | `season/` | board | | `match_preview` | `match_preview/` | assistant_coach | | `match_result` | `match_result/` | assistant_coach | -| `transfer_complete` | `transfer/` | director_of_football | -| `transfer_offer` | `transfer/` | director_of_football | -| `contract_terminated` | `transfer/` | director_of_football | -| `contract_expired` | `contract/` | director_of_football | +| `transfer_complete` | `transfer/` | general_manager | +| `transfer_offer` | `transfer/` | general_manager | +| `contract_terminated` | `transfer/` | general_manager | +| `contract_expired` | `contract/` | general_manager | | `delegated_renewal` | `contract/` | assistant_coach | | `academy_acquired` | `academy/` | assistant_coach | | `academy_player_moved` | `academy/` | assistant_coach | @@ -256,11 +256,11 @@ For template-based messages, the Rust `build_message()` resolves translations in | `low_morale` | `player_event/` | player_relations | | `bench_complaint` | `player_event/` | player_relations | | `happy_player` | `player_event/` | player_relations | -| `contract_concern` | `player_event/` | director_of_football | +| `contract_concern` | `player_event/` | general_manager | | `media_story` | `media/` (20 files) | press | | `podcast` | `podcast/` (10 files) | al_lio | | `stream` | `stream/` (20 files) | yuste | -| `rival_interest` | `rival_interest/` (10 files) | director_of_football | +| `rival_interest` | `rival_interest/` (10 files) | general_manager | ## Services diff --git a/src-tauri/crates/olm_core/src/contracts.rs b/src-tauri/crates/olm_core/src/contracts.rs index e3b37cc11..9d06054e8 100644 --- a/src-tauri/crates/olm_core/src/contracts.rs +++ b/src-tauri/crates/olm_core/src/contracts.rs @@ -795,12 +795,13 @@ fn contract_expired_message( "{} has left {} after their contract expired. The player is now a free agent.", player_name, team_name ), - "Director of Football".to_string(), + "General Manager".to_string(), date.to_string(), ) .with_category(MessageCategory::Contract) - .with_priority(MessagePriority::Urgent), - "director_of_football", + .with_priority(MessagePriority::Urgent) + .with_sender_i18n("be.sender.generalManager", "be.role.generalManager"), + "general_manager", vec![("player", player_name), ("team", team_name)], ) } diff --git a/src-tauri/crates/olm_core/src/messages/mod.rs b/src-tauri/crates/olm_core/src/messages/mod.rs index a5dc79483..60bfb6f87 100644 --- a/src-tauri/crates/olm_core/src/messages/mod.rs +++ b/src-tauri/crates/olm_core/src/messages/mod.rs @@ -309,13 +309,13 @@ pub fn transfer_complete_message(player_name: &str, fee: u64, date: &str) -> Inb ) .with_category(MessageCategory::Transfer) .with_priority(MessagePriority::Normal) - .with_sender_role("Director of Football") + .with_sender_role("General Manager") .with_i18n( "be.msg.transferComplete.subject", "be.msg.transferComplete.body", params(&[("player", player_name), ("fee", &fee_display)]), ) - .with_sender_i18n("be.sender.directorOfFootball", "be.role.directorOfFootball") + .with_sender_i18n("be.sender.generalManager", "be.role.generalManager") } pub fn incoming_transfer_offer_message( @@ -340,12 +340,12 @@ pub fn incoming_transfer_offer_message( "{} have submitted an offer of {} for {}. Review the bid in the Transfers tab to accept or reject it.", buying_team_name, fee_display, player_name ), - "Director of Football".to_string(), + "General Manager".to_string(), date.to_string(), ) .with_category(MessageCategory::Transfer) .with_priority(MessagePriority::High) - .with_sender_role("Director of Football") + .with_sender_role("General Manager") .with_action(action( "view_transfers", "Review Offer", @@ -367,6 +367,6 @@ pub fn incoming_transfer_offer_message( ("player", player_name), ]), ) - .with_sender_i18n("be.sender.directorOfFootball", "be.role.directorOfFootball") + .with_sender_i18n("be.sender.generalManager", "be.role.generalManager") } diff --git a/src-tauri/crates/olm_core/src/transfers.rs b/src-tauri/crates/olm_core/src/transfers.rs index 2f80776cb..becb1a5d1 100644 --- a/src-tauri/crates/olm_core/src/transfers.rs +++ b/src-tauri/crates/olm_core/src/transfers.rs @@ -2718,12 +2718,13 @@ pub fn release_player_contract(game: &mut Game, player_id: &str) -> Result InboxMessage { id: "rival_interest_2025-06-15".to_string(), subject: "Transfer Rumour".to_string(), body: "A rival is interested".to_string(), - sender: "Director of Football".to_string(), - sender_role: "Director of Football".to_string(), + sender: "General Manager".to_string(), + sender_role: "General Manager".to_string(), date: "2025-06-15".to_string(), read: false, category: MessageCategory::Transfer, diff --git a/src/i18n/locales/de.json b/src/i18n/locales/de.json index 46897d0d4..97636dff5 100644 --- a/src/i18n/locales/de.json +++ b/src/i18n/locales/de.json @@ -2514,7 +2514,7 @@ "financialDirector": "Finanzdirektor", "commercialDirector": "Kaufmännischer Leiter", "communityManager": "Community-Manager", - "directorOfFootball": "Sportdirektor", + "generalManager": "General Manager", "intlLiaison": "Internationaler Verbindungsbeauftragter", "player": "Spieler", "pressOfficer": "Pressesprecher", @@ -2535,7 +2535,7 @@ "financialDirector": "Finanzdirektor", "commercialDirector": "Kaufmännischer Leiter", "communityManager": "Community-Manager", - "directorOfFootball": "Sportdirektor", + "generalManager": "General Manager", "intlLiaison": "Internationaler Verbindungsbeauftragter", "player": "Spieler", "scout": "Scout", diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index f0ac73ecf..469a4adf3 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -2664,7 +2664,7 @@ "financialDirector": "Financial Director", "commercialDirector": "Commercial Director", "communityManager": "Community Manager", - "directorOfFootball": "Esports Director", + "generalManager": "General Manager", "intlLiaison": "International Liaison", "player": "Player", "pressOfficer": "Press Officer", @@ -2690,7 +2690,7 @@ "financialDirector": "Financial Director", "commercialDirector": "Commercial Director", "communityManager": "Community Manager", - "directorOfFootball": "Esports Director", + "generalManager": "General Manager", "intlLiaison": "International Liaison", "player": "Player", "scout": "Scout", diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json index ab14d4f11..1b1cca497 100644 --- a/src/i18n/locales/es.json +++ b/src/i18n/locales/es.json @@ -2654,7 +2654,7 @@ "financialDirector": "Director Financiero", "commercialDirector": "Director Comercial", "communityManager": "Responsable de Comunidad", - "directorOfFootball": "Director Deportivo", + "generalManager": "Gerente General", "intlLiaison": "Enlace Internacional", "player": "Jugador", "pressOfficer": "Jefe de Prensa", @@ -2680,7 +2680,7 @@ "financialDirector": "Director Financiero", "commercialDirector": "Director Comercial", "communityManager": "Responsable de Comunidad", - "directorOfFootball": "Director Deportivo", + "generalManager": "Gerente General", "intlLiaison": "Enlace Internacional", "player": "Jugador", "scout": "Ojeador", diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json index 0a00f5516..a0563d65d 100644 --- a/src/i18n/locales/fr.json +++ b/src/i18n/locales/fr.json @@ -2514,7 +2514,7 @@ "financialDirector": "Directeur Financier", "commercialDirector": "Directeur Commercial", "communityManager": "Responsable Communauté", - "directorOfFootball": "Directeur Sportif", + "generalManager": "Directeur Général", "intlLiaison": "Chargé des Relations Internationales", "player": "Joueur", "pressOfficer": "Attaché de Presse", @@ -2535,7 +2535,7 @@ "financialDirector": "Directeur Financier", "commercialDirector": "Directeur Commercial", "communityManager": "Responsable Communauté", - "directorOfFootball": "Directeur Sportif", + "generalManager": "Directeur Général", "intlLiaison": "Chargé des Relations Internationales", "player": "Joueur", "scout": "Recruteur", diff --git a/src/i18n/locales/it.json b/src/i18n/locales/it.json index 5aac71b77..4a1cdf51a 100644 --- a/src/i18n/locales/it.json +++ b/src/i18n/locales/it.json @@ -2349,7 +2349,7 @@ "financialDirector": "Direttore finanziario", "commercialDirector": "Direttore commerciale", "communityManager": "Responsabile comunità", - "directorOfFootball": "Direttore sportivo", + "generalManager": "Direttore Generale", "intlLiaison": "Responsabile relazioni internazionali", "player": "Giocatore", "pressOfficer": "Addetto stampa", @@ -2370,7 +2370,7 @@ "financialDirector": "Direttore finanziario", "commercialDirector": "Direttore commerciale", "communityManager": "Responsabile comunità", - "directorOfFootball": "Direttore sportivo", + "generalManager": "Direttore Generale", "intlLiaison": "Responsabile relazioni internazionali", "player": "Giocatore", "scout": "Osservatore", diff --git a/src/i18n/locales/pt-BR.json b/src/i18n/locales/pt-BR.json index 3253211d2..36f822cc9 100644 --- a/src/i18n/locales/pt-BR.json +++ b/src/i18n/locales/pt-BR.json @@ -2514,7 +2514,7 @@ "financialDirector": "Diretor Financeiro", "commercialDirector": "Diretor Comercial", "communityManager": "Gerente Comunitário", - "directorOfFootball": "Diretor de Equipe", + "generalManager": "Gerente Geral", "intlLiaison": "Relações Internacionais", "player": "Jogador", "pressOfficer": "Assessor de Imprensa", @@ -2535,7 +2535,7 @@ "financialDirector": "Diretor Financeiro", "commercialDirector": "Diretor Comercial", "communityManager": "Gerente Comunitário", - "directorOfFootball": "Diretor de Equipe", + "generalManager": "Gerente Geral", "intlLiaison": "Relações Internacionais", "player": "Jogador", "scout": "Olheiro", diff --git a/src/i18n/locales/pt.json b/src/i18n/locales/pt.json index 1fee504ac..b65c0e29e 100644 --- a/src/i18n/locales/pt.json +++ b/src/i18n/locales/pt.json @@ -2513,7 +2513,7 @@ "financialDirector": "Diretor Financeiro", "commercialDirector": "Diretor Comercial", "communityManager": "Gestor da Comunidade", - "directorOfFootball": "Diretor Desportivo", + "generalManager": "Gerente Geral", "intlLiaison": "Responsável pelas Relações Internacionais", "player": "Jogador", "pressOfficer": "Assessor de Imprensa", @@ -2534,7 +2534,7 @@ "financialDirector": "Diretor Financeiro", "commercialDirector": "Diretor Comercial", "communityManager": "Gestor da Comunidade", - "directorOfFootball": "Diretor Desportivo", + "generalManager": "Gerente Geral", "intlLiaison": "Responsável pelas Relações Internacionais", "player": "Jogador", "scout": "Olheiro", diff --git a/src/i18n/locales/tr.json b/src/i18n/locales/tr.json index 85deac325..f8b984749 100644 --- a/src/i18n/locales/tr.json +++ b/src/i18n/locales/tr.json @@ -2514,7 +2514,7 @@ "financialDirector": "Finans Direktörü", "commercialDirector": "Ticari Direktör", "communityManager": "Topluluk Yöneticisi", - "directorOfFootball": "Espor Direktörü", + "generalManager": "Genel Müdür", "intlLiaison": "Uluslararası İlişkiler", "player": "Oyuncu", "pressOfficer": "Basın Sorumlusu", @@ -2535,7 +2535,7 @@ "financialDirector": "Finans Direktörü", "commercialDirector": "Ticari Direktör", "communityManager": "Topluluk Yöneticisi", - "directorOfFootball": "Espor Direktörü", + "generalManager": "Genel Müdür", "intlLiaison": "Uluslararası İlişkiler", "player": "Oyuncu", "scout": "Gözlemci",