Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Commit

Permalink
element-hq/element-ios/issues/4717 - Exposed new room name localizabl…
Browse files Browse the repository at this point in the history
…e string to use for empty direct messages.
  • Loading branch information
stefanceriu committed Sep 27, 2021
1 parent c6f41c9 commit 9a92467
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"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)";

// Settings
"settings" = "Settings";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
/**
The `MXKRoomNameStringLocalizations` implements localization strings for `MXRoomNameStringsLocalizable`.
*/
@interface MXKRoomNameStringLocalizations : NSObject<MXRoomNameStringsLocalizable>

@property (copy, readonly, nonnull) NSString *emptyRoom;
@property (copy, readonly, nonnull) NSString *twoMembers;
@property (copy, readonly, nonnull) NSString *moreThanTwoMembers;
@interface MXKRoomNameStringLocalizations : NSObject <MXRoomNameStringsLocalizable>

@end
10 changes: 10 additions & 0 deletions MatrixKit/Utils/EventFormatter/MXKRoomNameStringLocalizations.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@

#import "NSBundle+MatrixKit.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
Expand All @@ -28,6 +37,7 @@ - (instancetype)init
_emptyRoom = [NSBundle mxk_localizedStringForKey:@"room_displayname_empty_room"];
_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;
}
Expand Down
1 change: 1 addition & 0 deletions changelog.d/4717.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exposed new room name localizable string to use for empty direct messages.

0 comments on commit 9a92467

Please sign in to comment.