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 https://github.com/facebook/react-native/pull/17587

Differential Revision: D6832696

Pulled By: shergin

fbshipit-source-id: 452287e5ce82df5c6b87126cb21889b7bd9d73c1
This commit is contained in:
Semen Zhydenko 2018-01-29 19:10:33 -08:00 committed by Facebook Github Bot
parent 28d60b68ad
commit 8ffc16c6e7
7 changed files with 24 additions and 24 deletions

View File

@ -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});
@ -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)}
/>

View File

@ -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>
@ -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,
};

View File

@ -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)
};
};

View File

@ -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 => {

View File

@ -457,14 +457,14 @@
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

View File

@ -419,7 +419,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
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 :
@ -430,8 +430,8 @@ static inline void RCTApplyTranformationAccordingLayoutDirection(UIView *view, U
{
[super setReactLayoutDirection:layoutDirection];
RCTApplyTranformationAccordingLayoutDirection(_scrollView, layoutDirection);
RCTApplyTranformationAccordingLayoutDirection(_contentView, layoutDirection);
RCTApplyTransformationAccordingLayoutDirection(_scrollView, layoutDirection);
RCTApplyTransformationAccordingLayoutDirection(_contentView, layoutDirection);
}
- (void)setRemoveClippedSubviews:(__unused BOOL)removeClippedSubviews
@ -450,7 +450,7 @@ static inline void RCTApplyTranformationAccordingLayoutDirection(UIView *view, U
{
RCTAssert(_contentView == nil, @"RCTScrollView may only contain a single subview");
_contentView = view;
RCTApplyTranformationAccordingLayoutDirection(_contentView, self.reactLayoutDirection);
RCTApplyTransformationAccordingLayoutDirection(_contentView, self.reactLayoutDirection);
[_scrollView addSubview:view];
}
}

View File

@ -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);
}