Browse Source

feat: Showing mumble address in "session started" message.

Refs: #36
develop
Martin Bober 1 month ago
parent
commit
d20d8a77b1
  1. 6
      app/assets/javascripts/session_logs.coffee
  2. 1
      app/views/layouts/application.html.erb
  3. 2
      config/locales/campaign_sessions/de.yml
  4. 2
      config/locales/campaign_sessions/en.yml
  5. 1
      docker-compose.yml

6
app/assets/javascripts/session_logs.coffee

@ -3,6 +3,7 @@
constructor: (container, path, session_id) ->
@container = container
@path = path
@session_id = session_id;
self = @
secret = undefined
@ -252,7 +253,10 @@
processSessionStarted: (entry) ->
div = @prepareSystemEntryDiv(entry, 'success')
textSpan = createHtmlElement('span', {class: 'session-log-system-content'})
textSpan.appendChild(document.createTextNode(' ' + I18n['campaign_session']['log']['session_started']))
textSpan.appendChild(document.createTextNode(' ' + t(I18n['campaign_session']['log']['session_started'], {
mumble_server: window.MUMBLE_SERVER,
session_id: @session_id
})))
div.appendChild(textSpan)
@container.appendChild(div)
@entries.push(entry)

1
app/views/layouts/application.html.erb

@ -17,6 +17,7 @@
window.DICEBOT_URL = "<%= ENV['DICEBOT_URL']%>";
window.I18n = <%= current_translations.to_json.html_safe %>;
window.I18nLocale = "<%=I18n.locale %>";
window.MUMBLE_SERVER = "<%= ENV['MUMBLE_ADDRESS'] %>";
</script>
</head>
<body onload="load()">

2
config/locales/campaign_sessions/de.yml

@ -187,7 +187,7 @@ de:
submit: "Registrierung abschicken"
wo_login: "Weiter ohne Login"
log:
session_started: "Sitzung wurde gestartet."
session_started: "Sitzung wurde gestartet. Du kannst am Sprach-Chat teilnehmen in dem du auf den Telefonhörer im Menü ganz oben klickst oder in dem du dich mit einem Mumble Client auf den Server '%{mumble_server}' verbindest und den Kanal betrittst, der mit '%{session_id}-' beginnt."
session_ended: "Sitzung wurde beendet."
user_joined_channel: "%{name} ist der Sitzung beigetreten."
user_left_channel: "%{name} hat die Sitzung verlassen."

2
config/locales/campaign_sessions/en.yml

@ -187,7 +187,7 @@ en:
submit: "Submit registration"
wo_login: "Continue without log in"
log:
session_started: "Session has been started."
session_started: "Session has been started. You can join the voice chat by clicking on the phone button in the top menu or you can use a Mumble client to connect to '%{mumble_server}' and join the channel starting with '%{session_id}-'"
session_ended: "Session has been terminated."
user_joined_channel: "%{name} has joined the session."
user_left_channel: "%{name} has left the session."

1
docker-compose.yml

@ -97,6 +97,7 @@ services:
DICEBOT_URL_INTERNAL: "http://dicebot:8080"
DICEBOT_SECRET: "FOOBAR"
OPEN_GRAPH_PROXY_URL: "http://localhost:8101"
MUMBLE_ADDRESS: "localhost"
MUMBLE_URL: "ws://localhost:64737"
PPB_NEW_PLAYER_WELCOME_BY: "1"
STUN_URL: "stun.mbober.de"

Loading…
Cancel
Save