How to use the aws-amplify.I18n.get function in aws-amplify

To help you get started, we’ve selected a few aws-amplify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws-amplify / amplify-js / packages / aws-amplify-react-native / src / Auth / SignUp.js View on Github external
showComponent(theme) {
        if (this.checkCustomSignUpFields()) {
            this.signUpFields = this.props.signUpConfig.signUpFields;
        }
        this.sortFields();
        return (
            
                
                    <header>{I18n.get(this.header)}</header>
github aws-amplify / amplify-js / packages / aws-amplify-react-native / src / Auth / AuthPiece.js View on Github external
theme={theme}
					key={'phone_number'}
					onChangeText={text =&gt; this.setState({ phone_number: text })}
					label={I18n.get('Phone Number')}
					placeholder={I18n.get('Enter your phone number')}
					keyboardType="phone-pad"
					required={true}
				/&gt;
			);
		} else {
			return (
				 this.setState({ username: text })}
					label={I18n.get(this.getUsernameLabel())}
					placeholder={I18n.get('Enter your username')}
					required={true}
				/&gt;
			);
		}
	}
github aws-amplify / amplify-js / packages / aws-amplify-react-native / dist / Auth / VerifyContact.js View on Github external
if (!unverified) {
            logger.debug('no unverified contact');
            return null;
        }

        const { email, phone_number } = unverified;
        return React.createElement(
            View,
            { style: theme.sectionBody },
            React.createElement(
                Picker,
                {
                    selectedValue: this.state.pickAttr,
                    onValueChange: (value, index) => this.setState({ pickAttr: value })
                },
                email ? React.createElement(Picker.Item, { label: I18n.get('Email'), value: 'email' }) : null,
                phone_number ? React.createElement(Picker.Item, { label: I18n.get('Phone Number'), value: 'phone_number' }) : null
            ),
            React.createElement(Button, {
                title: I18n.get('Verify'),
                onPress: this.verify,
                disabled: !this.state.pickAttr
            })
        );
    }
github aws-amplify / amplify-js / packages / aws-amplify-react-native / src / Auth / SignUp.js View on Github external
showComponent(theme) {
		if (this.checkCustomSignUpFields()) {
			this.signUpFields = this.props.signUpConfig.signUpFields;
		}
		this.sortFields();
		return (
			
				
					<header>{I18n.get(this.header)}</header>
github aws-amplify / amplify-js / packages / aws-amplify-react-native / dist / Auth / SignIn.js View on Github external
render() {
        const { authState, hide, federated, onStateChange } = this.props;
        if (!['signIn', 'signedOut', 'signedUp'].includes(this.props.authState)) {
            return null;
        }

        const theme = this.props.theme || AmplifyTheme;
        return React.createElement(
            View,
            { style: theme.section },
            React.createElement(
                Header,
                { theme: theme },
                I18n.get('Sign In')
            ),
            React.createElement(
                View,
                { style: theme.sectionBody },
                React.createElement(Username, {
                    theme: theme,
                    onChangeText: text => this.setState({ username: text })
                }),
                React.createElement(Password, {
                    theme: theme,
                    onChangeText: text => this.setState({ password: text })
                }),
                React.createElement(Button, {
                    title: I18n.get('Sign In'),
                    style: theme.button,
                    onPress: this.signIn,
github aws-amplify / amplify-js / packages / aws-amplify-react / src / Auth / RequireNewPassword.jsx View on Github external
{I18n.get('Change')}
                    
                
                
                     this.changeState('signIn')}&gt;
                        {I18n.get('Back to Sign In')}
                    
                
            
        )
    }
}
github aws-amplify / amplify-js / packages / aws-amplify-react-native / dist / Auth / RequireNewPassword.js View on Github external
const Footer = props => {
    const theme = props.theme || AmplifyTheme;
    return React.createElement(
        View,
        { style: theme.sectionFooter },
        React.createElement(
            LinkCell,
            { theme: theme, onPress: () => onStateChange('signIn') },
            I18n.get('Back to Sign In')
        )
    );
};