Open LeonGeorgi opened 4 months ago
If some people are invited to the group, the info text is wrong in some languages.
The German one says C hat eingeladenA where it should say C hat A eingeladen:
C hat eingeladenA
C hat A eingeladen
The Dutch one says C nodigde uitA where it should probably (I don't speak Dutch) say C nodigde A uit
C nodigde uitA
C nodigde A uit
In English it works, but most likely just because the invited peers are naturally the last part of the sentence in English:
I already checked the translations, but they are not the problem. In German, for example, it is defined correctly as %1$@ hat %2$@ eingeladen. I am almost 100% sure the problem is coming from this code: https://github.com/overtake/TelegramSwift/blob/a09ea6e609c648264239a5cdbb72947f7aefb531/Telegram-Mac/ChatServiceItem.swift#L202-L213
%1$@ hat %2$@ eingeladen
More specifically, you can see that the string is generated here:
attributedString.append(string: strings().chatServiceGroupAddedMembers1(authorName, ""), …)
And after that the names are appended:
attributedString.append(string: peer.displayTitle, …) … attributedString.append(string: ", ", …)
This behaviour is clearly wrong. I hope this can be fixed soon, because this problem has been bothering me for years. Only now I had the courage to finally find out more about the problem.
If some people are invited to the group, the info text is wrong in some languages.
Problem
The German one says![telegram-cloud-photo-size-2-5359674201482581276-x](https://github.com/overtake/TelegramSwift/assets/10584088/b958957e-bd4d-4411-801b-69e9cc7e14ee)
C hat eingeladenA
where it should sayC hat A eingeladen
:The Dutch one says![telegram-cloud-photo-size-2-5359674201482581278-x](https://github.com/overtake/TelegramSwift/assets/10584088/05855195-de7a-4b1a-8856-3e32063ca11c)
C nodigde uitA
where it should probably (I don't speak Dutch) sayC nodigde A uit
In English it works, but most likely just because the invited peers are naturally the last part of the sentence in English:![telegram-cloud-photo-size-2-5359674201482581275-x](https://github.com/overtake/TelegramSwift/assets/10584088/386a48d2-e303-4d55-98f4-f7216c25d281)
Problem origin
I already checked the translations, but they are not the problem. In German, for example, it is defined correctly as
%1$@ hat %2$@ eingeladen
. I am almost 100% sure the problem is coming from this code: https://github.com/overtake/TelegramSwift/blob/a09ea6e609c648264239a5cdbb72947f7aefb531/Telegram-Mac/ChatServiceItem.swift#L202-L213More specifically, you can see that the string is generated here:
And after that the names are appended:
This behaviour is clearly wrong. I hope this can be fixed soon, because this problem has been bothering me for years. Only now I had the courage to finally find out more about the problem.