Ticket #4410: 4410_late_observer_join_v2.patch

File 4410_late_observer_join_v2.patch, 1.6 KB (added by Imarok, 7 years ago)

Add translation comments to clarify the difference between join and rejoin

  • binaries/data/mods/public/gui/session/messages.js

     
    8080var g_FormatChatMessage = {
    8181    "system": msg => msg.text,
    8282    "connect": msg =>
    83         sprintf(translate("%(player)s is starting to rejoin the game."), {
    84             "player": colorizePlayernameByGUID(msg.guid)
    85         }),
     83        sprintf(
     84            g_GameAttributes.settings.PlayerData[g_PlayerAssignments[msg.guid].player - 1] ?
     85                // Translation: A player that left the game joins again
     86                translate("%(player)s is starting to rejoin the game.") :
     87                // Translation: A player joins the game the first time
     88                translate("%(player)s is starting to join the game."),
     89            { "player": colorizePlayernameByGUID(msg.guid) }
     90        ),
    8691    "disconnect": msg =>
    8792        sprintf(translate("%(player)s has left the game."), {
    8893            "player": colorizePlayernameByGUID(msg.guid)
    8994        }),
    9095    "rejoined": msg =>
    91         sprintf(translate("%(player)s has rejoined the game."), {
    92             "player": colorizePlayernameByGUID(msg.guid)
    93         }),
     96        sprintf(
     97            g_GameAttributes.settings.PlayerData[g_PlayerAssignments[msg.guid].player - 1] ?
     98                // Translation: A player that left the game joins again
     99                translate("%(player)s has rejoined the game.") :
     100                // Translation: A player joins the game the first time
     101                translate("%(player)s has joined the game."),
     102            { "player": colorizePlayernameByGUID(msg.guid) }
     103        ),
    94104    "kicked": msg =>
    95105        sprintf(
    96106            msg.banned ?