Skip to content

Commit 9c558e9

Browse files
committed
chore: set localizations to sample app
1 parent b60aef2 commit 9c558e9

File tree

4 files changed

+37
-23
lines changed

4 files changed

+37
-23
lines changed

packages/uikit-react-native-foundation/src/components/Text/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ const Text = ({ children, color, style, supportRTLAlign = true, originalText, ..
3939
(typeof children === 'string' && isStartsWithRTL(children))
4040
) {
4141
return I18nManager.doLeftAndRightSwapInRTL ? 'left' : 'right';
42+
} else {
43+
return I18nManager.doLeftAndRightSwapInRTL ? 'right' : 'left';
4244
}
4345
}
4446
if (textStyle.textAlign) return textStyle.textAlign;

packages/uikit-react-native-foundation/src/components/TextInput/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type Props = {
1212
} & TextInputProps &
1313
RTLTextAlignSupportProps;
1414
const TextInput = React.forwardRef<RNTextInput, Props>(function TextInput(
15-
{ children, style, variant = 'default', editable = true, originalText, supportRTLAlign, ...props },
15+
{ children, style, variant = 'default', editable = true, originalText, supportRTLAlign = true, ...props },
1616
ref,
1717
) {
1818
const { typography, colors } = useUIKitTheme();
@@ -36,9 +36,11 @@ const TextInput = React.forwardRef<RNTextInput, Props>(function TextInput(
3636
const textAlign = (() => {
3737
if (I18nManager.isRTL && supportRTLAlign) {
3838
const text = originalText || props.value || props.placeholder;
39+
// Note: TextInput is not affected by doLeftAndRightSwapInRTL
3940
if (text && isStartsWithRTL(text)) {
40-
// Note: TextInput is not affected by doLeftAndRightSwapInRTL
4141
return 'right';
42+
} else {
43+
return 'left';
4244
}
4345
}
4446

sample/ios/SendbirdUIKitSample.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,8 @@
297297
knownRegions = (
298298
en,
299299
Base,
300+
ar,
301+
ko,
300302
);
301303
mainGroup = 83CBB9F61A601CBA00E9B192;
302304
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
@@ -801,6 +803,7 @@
801803
CURRENT_PROJECT_VERSION = 2022.0403.1912;
802804
DEBUG_INFORMATION_FORMAT = dwarf;
803805
DEVELOPMENT_TEAM = RM4A5PXTUX;
806+
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RM4A5PXTUX;
804807
GCC_C_LANGUAGE_STANDARD = gnu11;
805808
GENERATE_INFOPLIST_FILE = YES;
806809
INFOPLIST_FILE = NotificationService/Info.plist;
@@ -818,6 +821,7 @@
818821
PRODUCT_BUNDLE_IDENTIFIER = com.sendbird.uikit.reactnative.sample.NotificationService;
819822
PRODUCT_NAME = "$(TARGET_NAME)";
820823
PROVISIONING_PROFILE_SPECIFIER = "match Development com.sendbird.uikit.reactnative.sample.NotificationService";
824+
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match Development com.sendbird.uikit.reactnative.sample.NotificationService 1728707007";
821825
SKIP_INSTALL = YES;
822826
SWIFT_EMIT_LOC_STRINGS = YES;
823827
TARGETED_DEVICE_FAMILY = "1,2";

sample/ios/SendbirdUIKitSample/Info.plist

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key>ITSAppUsesNonExemptEncryption</key>
6-
<false/>
7-
<key>UIBackgroundModes</key>
8-
<array>
9-
<string>remote-notification</string>
10-
</array>
11-
<key>UIFileSharingEnabled</key>
12-
<true/>
13-
<key>LSSupportsOpeningDocumentsInPlace</key>
14-
<true/>
15-
<key>NSCameraUsageDescription</key>
16-
<string>Permission request for Camera usage</string>
17-
<key>NSMicrophoneUsageDescription</key>
18-
<string>Permission request for Microphone usage</string>
19-
<key>NSPhotoLibraryUsageDescription</key>
20-
<string>Permission request for PhotoLibrary usage</string>
21-
<key>NSPhotoLibraryAddUsageDescription</key>
22-
<string>Permission request for PhotoLibrary Additions usage</string>
23-
<key>LSApplicationCategoryType</key>
24-
<string></string>
255
<key>CFBundleDevelopmentRegion</key>
26-
<string>en</string>
6+
<string>$(DEVELOPMENT_LANGUAGE)</string>
277
<key>CFBundleDisplayName</key>
288
<string>SendbirdUIKitSample</string>
299
<key>CFBundleExecutable</key>
@@ -32,6 +12,12 @@
3212
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
3313
<key>CFBundleInfoDictionaryVersion</key>
3414
<string>6.0</string>
15+
<key>CFBundleLocalizations</key>
16+
<array>
17+
<string>ko</string>
18+
<string>ar</string>
19+
<string>en</string>
20+
</array>
3521
<key>CFBundleName</key>
3622
<string>$(PRODUCT_NAME)</string>
3723
<key>CFBundlePackageType</key>
@@ -42,15 +28,35 @@
4228
<string>????</string>
4329
<key>CFBundleVersion</key>
4430
<string>$(CURRENT_PROJECT_VERSION)</string>
31+
<key>ITSAppUsesNonExemptEncryption</key>
32+
<false/>
33+
<key>LSApplicationCategoryType</key>
34+
<string></string>
4535
<key>LSRequiresIPhoneOS</key>
4636
<true/>
37+
<key>LSSupportsOpeningDocumentsInPlace</key>
38+
<true/>
4739
<key>NSAppTransportSecurity</key>
4840
<dict>
4941
<key>NSAllowsArbitraryLoads</key>
5042
<false/>
5143
<key>NSAllowsLocalNetworking</key>
5244
<true/>
5345
</dict>
46+
<key>NSCameraUsageDescription</key>
47+
<string>Permission request for Camera usage</string>
48+
<key>NSMicrophoneUsageDescription</key>
49+
<string>Permission request for Microphone usage</string>
50+
<key>NSPhotoLibraryAddUsageDescription</key>
51+
<string>Permission request for PhotoLibrary Additions usage</string>
52+
<key>NSPhotoLibraryUsageDescription</key>
53+
<string>Permission request for PhotoLibrary usage</string>
54+
<key>UIBackgroundModes</key>
55+
<array>
56+
<string>remote-notification</string>
57+
</array>
58+
<key>UIFileSharingEnabled</key>
59+
<true/>
5460
<key>UILaunchStoryboardName</key>
5561
<string>LaunchScreen</string>
5662
<key>UIRequiredDeviceCapabilities</key>

0 commit comments

Comments
 (0)