Skip to content

Commit 8ffc16c

Browse files
ss18facebook-github-bot
authored andcommitted
Typos in code
Summary: To fix typos No testing required, changed only internal things names No addtionalStyles -> additionalStyles occured -> occurred recomendedType -> recommendedType markDirtyAndPropogate -> markDirtyAndPropagate targetting -> targeting RCTApplyTranformationAccordingLayoutDirection -> RCTApplyTransformationAccordingLayoutDirection (tranform -> transform) Closes #17587 Differential Revision: D6832696 Pulled By: shergin fbshipit-source-id: 452287e5ce82df5c6b87126cb21889b7bd9d73c1
1 parent 28d60b6 commit 8ffc16c

File tree

7 files changed

+24
-24
lines changed

7 files changed

+24
-24
lines changed

Diff for: Libraries/Inspector/Inspector.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ class Inspector extends React.Component<{
208208
});
209209
}
210210

211-
setTouchTargetting(val: bool) {
211+
setTouchTargeting(val: bool) {
212212
Touchable.TOUCH_TARGET_DEBUG = val;
213213
this.props.onRequestRerenderApp((inspectedViewTag) => {
214214
this.setState({inspectedViewTag});
@@ -247,8 +247,8 @@ class Inspector extends React.Component<{
247247
hierarchy={this.state.hierarchy}
248248
selection={this.state.selection}
249249
setSelection={this.setSelection.bind(this)}
250-
touchTargetting={Touchable.TOUCH_TARGET_DEBUG}
251-
setTouchTargetting={this.setTouchTargetting.bind(this)}
250+
touchTargeting={Touchable.TOUCH_TARGET_DEBUG}
251+
setTouchTargeting={this.setTouchTargeting.bind(this)}
252252
networking={this.state.networking}
253253
setNetworking={this.setNetworking.bind(this)}
254254
/>

Diff for: Libraries/Inspector/InspectorPanel.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ class InspectorPanel extends React.Component<$FlowFixMeProps> {
8282
onClick={this.props.setNetworking}
8383
/>
8484
<Button title={'Touchables'}
85-
pressed={this.props.touchTargetting}
86-
onClick={this.props.setTouchTargetting}
85+
pressed={this.props.touchTargeting}
86+
onClick={this.props.setTouchTargeting}
8787
/>
8888
</View>
8989
</View>
@@ -98,8 +98,8 @@ InspectorPanel.propTypes = {
9898
inspected: PropTypes.object,
9999
perfing: PropTypes.bool,
100100
setPerfing: PropTypes.func,
101-
touchTargetting: PropTypes.bool,
102-
setTouchTargetting: PropTypes.func,
101+
touchTargeting: PropTypes.bool,
102+
setTouchTargeting: PropTypes.func,
103103
networking: PropTypes.bool,
104104
setNetworking: PropTypes.func,
105105
};

Diff for: Libraries/vendor/emitter/EventValidator.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ if (__DEV__) {
7979
return typeRecommendations.sort(recommendationSort)[0];
8080
};
8181

82-
var typeRecommendationFor = function (type, recomendedType) {
82+
var typeRecommendationFor = function (type, recommendedType) {
8383
return {
84-
type: recomendedType,
85-
distance: damerauLevenshteinDistance(type, recomendedType)
84+
type: recommendedType,
85+
distance: damerauLevenshteinDistance(type, recommendedType)
8686
};
8787
};
8888

Diff for: RNTester/js/ScrollViewExample.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ exports.examples = [
8181
render: function() {
8282
function renderScrollView(
8383
title: string,
84-
addtionalStyles: typeof StyleSheet,
84+
additionalStyles: typeof StyleSheet,
8585
) {
8686
let _scrollView: ScrollView;
8787
return (
88-
<View style={addtionalStyles}>
88+
<View style={additionalStyles}>
8989
<Text style={styles.text}>{title}</Text>
9090
<ScrollView
9191
ref={scrollView => {

Diff for: React/Base/Surface/RCTSurface.mm

+4-4
Original file line numberDiff line numberDiff line change
@@ -457,14 +457,14 @@ - (BOOL)synchronouslyWaitForStage:(RCTSurfaceStage)stage timeout:(NSTimeInterval
457457
RCTAssert(NO, @"Only waiting for `RCTSurfaceStageSurfaceDidInitialRendering` and `RCTSurfaceStageSurfaceDidInitialLayout` stages is supported.");
458458
}
459459

460-
BOOL timeoutOccured = dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, timeout * NSEC_PER_SEC));
461-
if (!timeoutOccured) {
460+
BOOL timeoutOccurred = dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, timeout * NSEC_PER_SEC));
461+
if (!timeoutOccurred) {
462462
// Balancing the semaphore.
463-
// Note: `dispatch_semaphore_wait` reverts the decrement in case when timeout occured.
463+
// Note: `dispatch_semaphore_wait` reverts the decrement in case when timeout occurred.
464464
dispatch_semaphore_signal(semaphore);
465465
}
466466

467-
return !timeoutOccured;
467+
return !timeoutOccurred;
468468
}
469469

470470
#pragma mark - RCTSurfaceRootShadowViewDelegate

Diff for: React/Views/ScrollView/RCTScrollView.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ - (instancetype)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher
419419
RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
420420
RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder)
421421

422-
static inline void RCTApplyTranformationAccordingLayoutDirection(UIView *view, UIUserInterfaceLayoutDirection layoutDirection) {
422+
static inline void RCTApplyTransformationAccordingLayoutDirection(UIView *view, UIUserInterfaceLayoutDirection layoutDirection) {
423423
view.transform =
424424
layoutDirection == UIUserInterfaceLayoutDirectionLeftToRight ?
425425
CGAffineTransformIdentity :
@@ -430,8 +430,8 @@ - (void)setReactLayoutDirection:(UIUserInterfaceLayoutDirection)layoutDirection
430430
{
431431
[super setReactLayoutDirection:layoutDirection];
432432

433-
RCTApplyTranformationAccordingLayoutDirection(_scrollView, layoutDirection);
434-
RCTApplyTranformationAccordingLayoutDirection(_contentView, layoutDirection);
433+
RCTApplyTransformationAccordingLayoutDirection(_scrollView, layoutDirection);
434+
RCTApplyTransformationAccordingLayoutDirection(_contentView, layoutDirection);
435435
}
436436

437437
- (void)setRemoveClippedSubviews:(__unused BOOL)removeClippedSubviews
@@ -450,7 +450,7 @@ - (void)insertReactSubview:(UIView *)view atIndex:(NSInteger)atIndex
450450
{
451451
RCTAssert(_contentView == nil, @"RCTScrollView may only contain a single subview");
452452
_contentView = view;
453-
RCTApplyTranformationAccordingLayoutDirection(_contentView, self.reactLayoutDirection);
453+
RCTApplyTransformationAccordingLayoutDirection(_contentView, self.reactLayoutDirection);
454454
[_scrollView addSubview:view];
455455
}
456456
}

Diff for: ReactAndroid/src/main/jni/first-party/fb/jni/fbjni.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,25 @@ jint initialize(JavaVM* vm, std::function<void()>&& init_fn) noexcept {
2121
static std::once_flag flag{};
2222
// TODO (t7832883): DTRT when we have exception pointers
2323
static auto error_msg = std::string{"Failed to initialize fbjni"};
24-
static auto error_occured = false;
24+
static auto error_occurred = false;
2525

2626
std::call_once(flag, [vm] {
2727
try {
2828
Environment::initialize(vm);
2929
} catch (std::exception& ex) {
30-
error_occured = true;
30+
error_occurred = true;
3131
try {
3232
error_msg = std::string{"Failed to initialize fbjni: "} + ex.what();
3333
} catch (...) {
3434
// Ignore, we already have a fall back message
3535
}
3636
} catch (...) {
37-
error_occured = true;
37+
error_occurred = true;
3838
}
3939
});
4040

4141
try {
42-
if (error_occured) {
42+
if (error_occurred) {
4343
throw std::runtime_error(error_msg);
4444
}
4545

0 commit comments

Comments
 (0)