Skip to content

Commit

Permalink
Typos in code
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ss18 authored and facebook-github-bot committed Jan 30, 2018
1 parent 28d60b6 commit 8ffc16c
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
6 changes: 3 additions & 3 deletions Libraries/Inspector/Inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class Inspector extends React.Component<{
});
}

setTouchTargetting(val: bool) {
setTouchTargeting(val: bool) {
Touchable.TOUCH_TARGET_DEBUG = val;
this.props.onRequestRerenderApp((inspectedViewTag) => {
this.setState({inspectedViewTag});
Expand Down Expand Up @@ -247,8 +247,8 @@ class Inspector extends React.Component<{
hierarchy={this.state.hierarchy}
selection={this.state.selection}
setSelection={this.setSelection.bind(this)}
touchTargetting={Touchable.TOUCH_TARGET_DEBUG}
setTouchTargetting={this.setTouchTargetting.bind(this)}
touchTargeting={Touchable.TOUCH_TARGET_DEBUG}
setTouchTargeting={this.setTouchTargeting.bind(this)}
networking={this.state.networking}
setNetworking={this.setNetworking.bind(this)}
/>
Expand Down
8 changes: 4 additions & 4 deletions Libraries/Inspector/InspectorPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ class InspectorPanel extends React.Component<$FlowFixMeProps> {
onClick={this.props.setNetworking}
/>
<Button title={'Touchables'}
pressed={this.props.touchTargetting}
onClick={this.props.setTouchTargetting}
pressed={this.props.touchTargeting}
onClick={this.props.setTouchTargeting}
/>
</View>
</View>
Expand All @@ -98,8 +98,8 @@ InspectorPanel.propTypes = {
inspected: PropTypes.object,
perfing: PropTypes.bool,
setPerfing: PropTypes.func,
touchTargetting: PropTypes.bool,
setTouchTargetting: PropTypes.func,
touchTargeting: PropTypes.bool,
setTouchTargeting: PropTypes.func,
networking: PropTypes.bool,
setNetworking: PropTypes.func,
};
Expand Down
6 changes: 3 additions & 3 deletions Libraries/vendor/emitter/EventValidator.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ if (__DEV__) {
return typeRecommendations.sort(recommendationSort)[0];
};

var typeRecommendationFor = function (type, recomendedType) {
var typeRecommendationFor = function (type, recommendedType) {
return {
type: recomendedType,
distance: damerauLevenshteinDistance(type, recomendedType)
type: recommendedType,
distance: damerauLevenshteinDistance(type, recommendedType)
};
};

Expand Down
4 changes: 2 additions & 2 deletions RNTester/js/ScrollViewExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ exports.examples = [
render: function() {
function renderScrollView(
title: string,
addtionalStyles: typeof StyleSheet,
additionalStyles: typeof StyleSheet,
) {
let _scrollView: ScrollView;
return (
<View style={addtionalStyles}>
<View style={additionalStyles}>
<Text style={styles.text}>{title}</Text>
<ScrollView
ref={scrollView => {
Expand Down
8 changes: 4 additions & 4 deletions React/Base/Surface/RCTSurface.mm
Original file line number Diff line number Diff line change
Expand Up @@ -457,14 +457,14 @@ - (BOOL)synchronouslyWaitForStage:(RCTSurfaceStage)stage timeout:(NSTimeInterval
RCTAssert(NO, @"Only waiting for `RCTSurfaceStageSurfaceDidInitialRendering` and `RCTSurfaceStageSurfaceDidInitialLayout` stages is supported.");
}

BOOL timeoutOccured = dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, timeout * NSEC_PER_SEC));
if (!timeoutOccured) {
BOOL timeoutOccurred = dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, timeout * NSEC_PER_SEC));
if (!timeoutOccurred) {
// Balancing the semaphore.
// Note: `dispatch_semaphore_wait` reverts the decrement in case when timeout occured.
// Note: `dispatch_semaphore_wait` reverts the decrement in case when timeout occurred.
dispatch_semaphore_signal(semaphore);
}

return !timeoutOccured;
return !timeoutOccurred;
}

#pragma mark - RCTSurfaceRootShadowViewDelegate
Expand Down
8 changes: 4 additions & 4 deletions React/Views/ScrollView/RCTScrollView.m
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ - (instancetype)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher
RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder)

static inline void RCTApplyTranformationAccordingLayoutDirection(UIView *view, UIUserInterfaceLayoutDirection layoutDirection) {
static inline void RCTApplyTransformationAccordingLayoutDirection(UIView *view, UIUserInterfaceLayoutDirection layoutDirection) {
view.transform =
layoutDirection == UIUserInterfaceLayoutDirectionLeftToRight ?
CGAffineTransformIdentity :
Expand All @@ -430,8 +430,8 @@ - (void)setReactLayoutDirection:(UIUserInterfaceLayoutDirection)layoutDirection
{
[super setReactLayoutDirection:layoutDirection];

RCTApplyTranformationAccordingLayoutDirection(_scrollView, layoutDirection);
RCTApplyTranformationAccordingLayoutDirection(_contentView, layoutDirection);
RCTApplyTransformationAccordingLayoutDirection(_scrollView, layoutDirection);
RCTApplyTransformationAccordingLayoutDirection(_contentView, layoutDirection);
}

- (void)setRemoveClippedSubviews:(__unused BOOL)removeClippedSubviews
Expand All @@ -450,7 +450,7 @@ - (void)insertReactSubview:(UIView *)view atIndex:(NSInteger)atIndex
{
RCTAssert(_contentView == nil, @"RCTScrollView may only contain a single subview");
_contentView = view;
RCTApplyTranformationAccordingLayoutDirection(_contentView, self.reactLayoutDirection);
RCTApplyTransformationAccordingLayoutDirection(_contentView, self.reactLayoutDirection);
[_scrollView addSubview:view];
}
}
Expand Down
8 changes: 4 additions & 4 deletions ReactAndroid/src/main/jni/first-party/fb/jni/fbjni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ jint initialize(JavaVM* vm, std::function<void()>&& init_fn) noexcept {
static std::once_flag flag{};
// TODO (t7832883): DTRT when we have exception pointers
static auto error_msg = std::string{"Failed to initialize fbjni"};
static auto error_occured = false;
static auto error_occurred = false;

std::call_once(flag, [vm] {
try {
Environment::initialize(vm);
} catch (std::exception& ex) {
error_occured = true;
error_occurred = true;
try {
error_msg = std::string{"Failed to initialize fbjni: "} + ex.what();
} catch (...) {
// Ignore, we already have a fall back message
}
} catch (...) {
error_occured = true;
error_occurred = true;
}
});

try {
if (error_occured) {
if (error_occurred) {
throw std::runtime_error(error_msg);
}

Expand Down

0 comments on commit 8ffc16c

Please sign in to comment.