overtake / TelegramSwift

Source code of Telegram for macos on Swift 5.0
https://macos.telegram.org
GNU General Public License v2.0
4.99k stars 841 forks source link

Group join messages have broken format in German #498

Open timmy31113 opened 4 years ago

timmy31113 commented 4 years ago

When a person is added to a group, the join message in German is not formatted correctly. See image:

grafik

The name of the added person (violet) should be between the two spaces after "hat" and before "hinzugefügt".

timmy31113 commented 4 years ago

Okay, I didn't get the build to work on my machine, but as a wild guess I blame these two lines for the issue:

https://github.com/overtake/TelegramSwift/blob/5cc7d2475fe4738a6aa0486c23eaf80a89d33b97/Telegram-Mac/ChatServiceItem.swift#L82 This calls the localization function but uses an empty string instead of the display names of the peers that were invited.

https://github.com/overtake/TelegramSwift/blob/5cc7d2475fe4738a6aa0486c23eaf80a89d33b97/Telegram-Mac/ChatServiceItem.swift#L86 This then appends the display names of all added peers to the end of the localized string.

That is exactly what happened in my screenshot

timmy31113 commented 4 years ago

Okay I think I found a fix, can someone try if this actually works: https://github.com/timmy31113/TelegramSwift/commit/595a60e18a591e5b6bb564191711836bc97993c9