From c5a6d221928df8aee148da3bc0f146352eed0a8a Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Tue, 23 Jan 2018 21:23:29 +1000 Subject: [PATCH] Hopefully apply new languages better, esp. during rehash --- CHANGELOG.md | 1 + irc/server.go | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8150b1a5..fc2e19fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ New release of Oragono! ### Security ### Added +* Added new Turkish translation (thanks to [Yaser](https://crowdin.com/profile/Apsimati)!). * Added proposed IRCv3 capability [`draft/languages`](https://gist.github.com/DanielOaks/8126122f74b26012a3de37db80e4e0c6). * Added proposed IRCv3 capability [`draft/resume`](https://github.com/ircv3/ircv3-specifications/pull/306). * Added user modes, including: diff --git a/irc/server.go b/irc/server.go index 152b9393..91375d62 100644 --- a/irc/server.go +++ b/irc/server.go @@ -1299,6 +1299,13 @@ func (server *Server) applyConfig(config *Config, initial bool) error { CapValues.Set(caps.Languages, newLanguageValue) } + lm := NewLanguageManager(config.Languages.Default, config.Languages.Data) + + server.logger.Debug("rehash", "Regenerating HELP indexes for new languages") + GenerateHelpIndices(lm) + + server.languages = lm + // SASL if config.Accounts.AuthenticationEnabled && !server.accountAuthenticationEnabled { // enabling SASL