vector-im/element-ios/issues/4899 - Added dynamism and compile time safety to room name and send reply event localizable strings.
MODIFY
MatrixKit.xcodeproj/project.pbxproj
MatrixKit.xcodeproj/project.pbxproj
328E410424CB135100DC4490 /* MatrixKitVersion.m in Sources */ = {isa = PBXBuildFile; fileRef = 328E410224CB135100DC4490 /* MatrixKitVersion.m */; };
329CF77B1AA9FDE000A4753F /* MXKRoomIOSBubbleTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 329CF77A1AA9FDE000A4753F /* MXKRoomIOSBubbleTableViewCell.m */; };
32B046722101EB5E002A24A1 /* MXRoom+Sync.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B046712101EB5E002A24A1 /* MXRoom+Sync.m */; };
- 32BA86B721538B35008F277E /* MXKRoomNameStringLocalizations.m in Sources */ = {isa = PBXBuildFile; fileRef = 32BA86B621538B35008F277E /* MXKRoomNameStringLocalizations.m */; };
+ 32BA86B721538B35008F277E /* MXKRoomNameStringLocalizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 32BA86B621538B35008F277E /* MXKRoomNameStringLocalizer.m */; };
32BA86BA21538FFC008F277E /* MXKEventFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 32BA86B821538FFC008F277E /* MXKEventFormatter.m */; };
32C3ABBA22C4F23B00CA0449 /* MXAggregatedReactions+MatrixKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 32C3ABB922C4F23B00CA0449 /* MXAggregatedReactions+MatrixKit.m */; };
32CEE2231AB1E37600F7C74D /* MXKRecentListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32CEE2211AB1E37600F7C74D /* MXKRecentListViewController.m */; };
B12C471020BED312004FBF96 /* MXKErrorPresentableBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = B12C470F20BED312004FBF96 /* MXKErrorPresentableBuilder.m */; };
B12C56F22396D75500FAC6DE /* UITextView+MatrixKit.m in Sources */ = {isa = PBXBuildFile; fileRef = B12C56F12396D75500FAC6DE /* UITextView+MatrixKit.m */; };
B13652F8221E9E7A00313B09 /* MXKMessageTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = B13652F7221E9E7A00313B09 /* MXKMessageTextView.m */; };
- B164380C210603CD00DBB3FD /* MXKSendReplyEventStringLocalizations.m in Sources */ = {isa = PBXBuildFile; fileRef = B164380B210603CD00DBB3FD /* MXKSendReplyEventStringLocalizations.m */; };
+ B164380C210603CD00DBB3FD /* MXKSendReplyEventStringLocalizer.m in Sources */ = {isa = PBXBuildFile; fileRef = B164380B210603CD00DBB3FD /* MXKSendReplyEventStringLocalizer.m */; };
B1668AC021072F93002B14F1 /* MXKSlashCommands.m in Sources */ = {isa = PBXBuildFile; fileRef = B1668ABF21072F93002B14F1 /* MXKSlashCommands.m */; };
CE14CA661E80122600E329A3 /* MXKAttachmentAnimator.m in Sources */ = {isa = PBXBuildFile; fileRef = CE14CA631E80122600E329A3 /* MXKAttachmentAnimator.m */; };
CE14CA671E80122600E329A3 /* MXKAttachmentInteractionController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE14CA651E80122600E329A3 /* MXKAttachmentInteractionController.m */; };
329CF77A1AA9FDE000A4753F /* MXKRoomIOSBubbleTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MXKRoomIOSBubbleTableViewCell.m; sourceTree = "<group>"; };
32B046702101EB5E002A24A1 /* MXRoom+Sync.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MXRoom+Sync.h"; sourceTree = "<group>"; };
32B046712101EB5E002A24A1 /* MXRoom+Sync.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "MXRoom+Sync.m"; sourceTree = "<group>"; };
- 32BA86B521538B35008F277E /* MXKRoomNameStringLocalizations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MXKRoomNameStringLocalizations.h; sourceTree = "<group>"; };
- 32BA86B621538B35008F277E /* MXKRoomNameStringLocalizations.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MXKRoomNameStringLocalizations.m; sourceTree = "<group>"; };
+ 32BA86B521538B35008F277E /* MXKRoomNameStringLocalizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MXKRoomNameStringLocalizer.h; sourceTree = "<group>"; };
+ 32BA86B621538B35008F277E /* MXKRoomNameStringLocalizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MXKRoomNameStringLocalizer.m; sourceTree = "<group>"; };
32BA86B821538FFC008F277E /* MXKEventFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MXKEventFormatter.m; sourceTree = "<group>"; };
32BA86B921538FFC008F277E /* MXKEventFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MXKEventFormatter.h; sourceTree = "<group>"; };
32BDC981211AD6D10064AF51 /* AUTHORS.rst */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUTHORS.rst; sourceTree = "<group>"; };
B13652F6221E9E7A00313B09 /* MXKMessageTextView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MXKMessageTextView.h; sourceTree = "<group>"; };
B13652F7221E9E7A00313B09 /* MXKMessageTextView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MXKMessageTextView.m; sourceTree = "<group>"; };
B13AC545246447ED00A6B899 /* MatrixKit.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = MatrixKit.podspec; sourceTree = "<group>"; };
- B164380A210603CD00DBB3FD /* MXKSendReplyEventStringLocalizations.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MXKSendReplyEventStringLocalizations.h; sourceTree = "<group>"; };
- B164380B210603CD00DBB3FD /* MXKSendReplyEventStringLocalizations.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MXKSendReplyEventStringLocalizations.m; sourceTree = "<group>"; };
+ B164380A210603CD00DBB3FD /* MXKSendReplyEventStringLocalizer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MXKSendReplyEventStringLocalizer.h; sourceTree = "<group>"; };
+ B164380B210603CD00DBB3FD /* MXKSendReplyEventStringLocalizer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MXKSendReplyEventStringLocalizer.m; sourceTree = "<group>"; };
B1668ABE21072F93002B14F1 /* MXKSlashCommands.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MXKSlashCommands.h; sourceTree = "<group>"; };
B1668ABF21072F93002B14F1 /* MXKSlashCommands.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MXKSlashCommands.m; sourceTree = "<group>"; };
B455B95A7B9ECAD75BA21E12 /* Pods_MatrixKitSamplePods_MatrixKitTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MatrixKitSamplePods_MatrixKitTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
32BA86B921538FFC008F277E /* MXKEventFormatter.h */,
32BA86B821538FFC008F277E /* MXKEventFormatter.m */,
EC6DC7BA24F9562600B6C40F /* MarkdownToHTMLRenderer.swift */,
- 32BA86B521538B35008F277E /* MXKRoomNameStringLocalizations.h */,
- 32BA86B621538B35008F277E /* MXKRoomNameStringLocalizations.m */,
+ 32BA86B521538B35008F277E /* MXKRoomNameStringLocalizer.h */,
+ 32BA86B621538B35008F277E /* MXKRoomNameStringLocalizer.m */,
);
path = EventFormatter;
sourceTree = "<group>";
F07E180C1ABC2EDA00DE3766 /* MXKRoomDataSource.m */,
3230A3731ACADC1800CC57F5 /* MXKRoomDataSourceManager.h */,
3230A3741ACADC1800CC57F5 /* MXKRoomDataSourceManager.m */,
- B164380A210603CD00DBB3FD /* MXKSendReplyEventStringLocalizations.h */,
- B164380B210603CD00DBB3FD /* MXKSendReplyEventStringLocalizations.m */,
+ B164380A210603CD00DBB3FD /* MXKSendReplyEventStringLocalizer.h */,
+ B164380B210603CD00DBB3FD /* MXKSendReplyEventStringLocalizer.m */,
B1668ABE21072F93002B14F1 /* MXKSlashCommands.h */,
B1668ABF21072F93002B14F1 /* MXKSlashCommands.m */,
91FE762A27047EB700E035D9 /* MXKURLPreviewDataProtocol.h */,
328E410324CB135100DC4490 /* MatrixKitVersion.m in Sources */,
F095E5101B25899F009606CE /* MXKEmail.m in Sources */,
321313C91AEFC2D500A9B035 /* MXKRoomIOSOutgoingBubbleTableViewCell.m in Sources */,
- B164380C210603CD00DBB3FD /* MXKSendReplyEventStringLocalizations.m in Sources */,
+ B164380C210603CD00DBB3FD /* MXKSendReplyEventStringLocalizer.m in Sources */,
F0FDF2671E53586A00D23C47 /* MXKCountryPickerViewController.m in Sources */,
B12C471020BED312004FBF96 /* MXKErrorPresentableBuilder.m in Sources */,
F00FA85C1C0867F900E25826 /* MXKRoomIncomingAttachmentBubbleCell.m in Sources */,
F095E50F1B25899F009606CE /* MXKContactManager.m in Sources */,
F09617C31DE881D800093E9D /* MXKEncryptionInfoView.m in Sources */,
F0CE56EB1AA8BB5E003BE77A /* MXKSampleMainTableViewController.m in Sources */,
- 32BA86B721538B35008F277E /* MXKRoomNameStringLocalizations.m in Sources */,
+ 32BA86B721538B35008F277E /* MXKRoomNameStringLocalizer.m in Sources */,
F0AD3CC71B289441002E0899 /* MXKInterleavedRecentTableViewCell.m in Sources */,
F0DB1AC51B025D9400A3FA54 /* MXKSampleRoomMemberTableViewCell.m in Sources */,
F08D35211FD0134900A0C2FB /* MXKPieChartHUD.m in Sources */,

MODIFY
MatrixKit/Assets/MatrixKitAssets.bundle/en.lproj/MatrixKit.strings
MatrixKit/Assets/MatrixKitAssets.bundle/en.lproj/MatrixKit.strings
"room_displayname_empty_room" = "Empty room";
"room_displayname_two_members" = "%@ and %@";
"room_displayname_more_than_two_members" = "%@ and %@ others";
-"room_displayname_all_other_participants_left" = "%@ (Left)";
+"room_displayname_all_other_members_left" = "%@ (Left)";
// Settings
"settings" = "Settings";

MODIFY
MatrixKit/Generated/Strings.swift
MatrixKit/Generated/Strings.swift
@@ -1395,6 +1395,10 @@ public class MatrixKitL10n: NSObject {
public static var roomDetailsTitle: String {
return MatrixKitL10n.tr("room_details_title")
}
+ /// %@ (Left)
+ public static func roomDisplaynameAllOtherMembersLeft(_ p1: String) -> String {
+ return MatrixKitL10n.tr("room_displayname_all_other_members_left", p1)
+ }
/// Empty room
public static var roomDisplaynameEmptyRoom: String {
return MatrixKitL10n.tr("room_displayname_empty_room")

MODIFY
MatrixKit/Models/Room/MXKRoomDataSource.m
MatrixKit/Models/Room/MXKRoomDataSource.m
#import "MXKAppSettings.h"
-#import "MXKSendReplyEventStringLocalizations.h"
+#import "MXKSendReplyEventStringLocalizer.h"
#import "MXKSlashCommands.h"
@@ -1736,9 +1736,9 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
NSString *sanitizedText = [self sanitizedMessageText:text];
NSString *html = [self htmlMessageFromSanitizedText:sanitizedText];
- id<MXSendReplyEventStringsLocalizable> stringLocalizations = [MXKSendReplyEventStringLocalizations new];
+ id<MXSendReplyEventStringLocalizer> stringLocalizer = [MXKSendReplyEventStringLocalizer new];
- [_room sendReplyToEvent:eventToReply withTextMessage:sanitizedText formattedTextMessage:html stringLocalizations:stringLocalizations localEcho:&localEchoEvent success:success failure:failure];
+ [_room sendReplyToEvent:eventToReply withTextMessage:sanitizedText formattedTextMessage:html stringLocalizer:stringLocalizer localEcho:&localEchoEvent success:success failure:failure];
if (localEchoEvent)
{

DELETE
MatrixKit/Models/Room/MXKSendReplyEventStringLocalizations.h
-/*
- Copyright 2018 New Vector Ltd
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import <Foundation/Foundation.h>
-#import <MatrixSDK/MXSendReplyEventStringsLocalizable.h>
-
-/**
- A `MXKSendReplyEventStringLocalizations` instance represents string localizations used when send reply event to a message in a room.
- */
-@interface MXKSendReplyEventStringLocalizations : NSObject<MXSendReplyEventStringsLocalizable>
-
-@property (copy, readonly, nonnull) NSString *senderSentAnImage;
-@property (copy, readonly, nonnull) NSString *senderSentAVideo;
-@property (copy, readonly, nonnull) NSString *senderSentAnAudioFile;
-@property (copy, readonly, nonnull) NSString *senderSentAVoiceMessage;
-@property (copy, readonly, nonnull) NSString *senderSentAFile;
-@property (copy, readonly, nonnull) NSString *messageToReplyToPrefix;
-
-@end

DELETE
MatrixKit/Models/Room/MXKSendReplyEventStringLocalizations.m
-/*
- Copyright 2018 New Vector Ltd
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-
-#import "MXKSendReplyEventStringLocalizations.h"
-
-#import "NSBundle+MatrixKit.h"
-
-@implementation MXKSendReplyEventStringLocalizations
-
-- (instancetype)init
-{
- self = [super init];
- if (self) {
- _senderSentAnImage = [NSBundle mxk_localizedStringForKey:@"message_reply_to_sender_sent_an_image"];
- _senderSentAVideo = [NSBundle mxk_localizedStringForKey:@"message_reply_to_sender_sent_a_video"];
- _senderSentAnAudioFile = [NSBundle mxk_localizedStringForKey:@"message_reply_to_sender_sent_an_audio_file"];
- _senderSentAVoiceMessage = [NSBundle mxk_localizedStringForKey:@"message_reply_to_sender_sent_a_voice_message"];
- _senderSentAFile = [NSBundle mxk_localizedStringForKey:@"message_reply_to_sender_sent_a_file"];
- _messageToReplyToPrefix = [NSBundle mxk_localizedStringForKey:@"message_reply_to_message_to_reply_to_prefix"];
- }
- return self;
-}
-
-@end

ADD
MatrixKit/Models/Room/MXKSendReplyEventStringLocalizer.h
+/*
+ Copyright 2018 New Vector Ltd
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import <MatrixSDK/MXSendReplyEventStringLocalizer.h>
+
+/**
+ A `MXKSendReplyEventStringLocalizer` instance represents string localizations used when send reply event to a message in a room.
+ */
+@interface MXKSendReplyEventStringLocalizer : NSObject<MXSendReplyEventStringLocalizer>
+
+@end

ADD
MatrixKit/Models/Room/MXKSendReplyEventStringLocalizer.m
+/*
+ Copyright 2018 New Vector Ltd
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+
+#import "MXKSendReplyEventStringLocalizer.h"
+#import "MXKSwiftHeader.h"
+
+@implementation MXKSendReplyEventStringLocalizer
+
+- (NSString *)senderSentAnImage
+{
+ return [MatrixKitL10n messageReplyToSenderSentAnImage];
+}
+
+- (NSString *)senderSentAVideo
+{
+ return [MatrixKitL10n messageReplyToSenderSentAVideo];
+}
+
+- (NSString *)senderSentAnAudioFile
+{
+ return [MatrixKitL10n messageReplyToSenderSentAnAudioFile];
+}
+
+- (NSString *)senderSentAVoiceMessage
+{
+ return [MatrixKitL10n messageReplyToSenderSentAVoiceMessage];
+}
+
+- (NSString *)senderSentAFile
+{
+ return [MatrixKitL10n messageReplyToSenderSentAFile];
+}
+
+- (NSString *)messageToReplyToPrefix
+{
+ return [MatrixKitL10n messageReplyToMessageToReplyToPrefix];
+}
+
+@end

MODIFY
MatrixKit/Utils/EventFormatter/MXKEventFormatter.m
MatrixKit/Utils/EventFormatter/MXKEventFormatter.m
#import "MXKTools.h"
#import "MXRoom+Sync.h"
-#import "MXKRoomNameStringLocalizations.h"
+#import "MXKRoomNameStringLocalizer.h"
static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
@@ -101,7 +101,7 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
defaultRoomSummaryUpdater = [MXRoomSummaryUpdater roomSummaryUpdaterForSession:matrixSession];
defaultRoomSummaryUpdater.ignoreMemberProfileChanges = YES;
defaultRoomSummaryUpdater.ignoreRedactedEvent = !_settings.showRedactionsInRoomHistory;
- defaultRoomSummaryUpdater.roomNameStringLocalizations = [MXKRoomNameStringLocalizations new];
+ defaultRoomSummaryUpdater.roomNameStringLocalizer = [MXKRoomNameStringLocalizer new];
linkDetector = [NSDataDetector dataDetectorWithTypes:NSTextCheckingTypeLink error:nil];

DELETE
MatrixKit/Utils/EventFormatter/MXKRoomNameStringLocalizations.m
-/*
- Copyright 2018 New Vector Ltd
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import "MXKRoomNameStringLocalizations.h"
-
-#import "NSBundle+MatrixKit.h"
-
-#import "MXKSwiftHeader.h"
-
-@interface MXKRoomNameStringLocalizations ()
-
-@property (nonatomic, copy) NSString *emptyRoom;
-@property (nonatomic, copy) NSString *twoMembers;
-@property (nonatomic, copy) NSString *moreThanTwoMembers;
-@property (nonatomic, copy) NSString *allOtherParticipantsLeft;
-
-@end
-
-@implementation MXKRoomNameStringLocalizations
-
-- (instancetype)init
-{
- self = [super init];
- if (self)
- {
- _emptyRoom = [MatrixKitL10n roomDisplaynameEmptyRoom];
- _twoMembers = [NSBundle mxk_localizedStringForKey:@"room_displayname_two_members"];
- _moreThanTwoMembers = [NSBundle mxk_localizedStringForKey:@"room_displayname_more_than_two_members"];
- _allOtherParticipantsLeft = [NSBundle mxk_localizedStringForKey:@"room_displayname_all_other_participants_left"];
- }
- return self;
-}
-
-@end

RENAME
MatrixKit/Utils/EventFormatter/MXKRoomNameStringLocalizations.h
MatrixKit/Utils/EventFormatter/MXKRoomNameStringLocalizer.h
@import Foundation;
-#import <MatrixSDK/MXRoomNameStringsLocalizable.h>
+#import <MatrixSDK/MXRoomNameStringLocalizer.h>
/**
- The `MXKRoomNameStringLocalizations` implements localization strings for `MXRoomNameStringsLocalizable`.
+ The `MXKRoomNameStringLocalizer` implements localization strings for `MXRoomNameStringLocalizable`.
*/
-@interface MXKRoomNameStringLocalizations : NSObject <MXRoomNameStringsLocalizable>
+@interface MXKRoomNameStringLocalizer : NSObject <MXRoomNameStringLocalizer>
@end

ADD
MatrixKit/Utils/EventFormatter/MXKRoomNameStringLocalizer.m
+/*
+ Copyright 2018 New Vector Ltd
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+#import "MXKRoomNameStringLocalizer.h"
+#import "MXKSwiftHeader.h"
+
+@implementation MXKRoomNameStringLocalizer
+
+- (NSString *)emptyRoom
+{
+ return [MatrixKitL10n roomDisplaynameEmptyRoom];
+}
+
+- (NSString *)twoMembers:(NSString *)firstMember second:(NSString *)secondMember
+{
+ return [MatrixKitL10n roomDisplaynameTwoMembers:firstMember :secondMember];
+}
+
+- (NSString *)moreThanTwoMembers:(NSString *)firstMember count:(NSNumber *)memberCount
+{
+ return [MatrixKitL10n roomDisplaynameMoreThanTwoMembers:firstMember :memberCount.stringValue];
+}
+
+- (NSString *)allOtherMembersLeft:(NSString *)member
+{
+ return [MatrixKitL10n roomDisplaynameAllOtherMembersLeft:member];
+}
+
+@end

vector-im/element-ios/issues/4899 - Added dynamism and compile time safety to room name and send reply event localizable strings.