How to use the aws-amplify.I18n 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 / dist / Auth / SignIn.js View on Github external
{ theme: theme },
                    _awsAmplify.I18n.get('Sign In Account')
                ),
                _react2.default.createElement(
                    _AmplifyUI.SectionBody,
                    { theme: theme },
                    _react2.default.createElement(_AmplifyUI.InputRow, {
                        autoFocus: true,
                        placeholder: _awsAmplify.I18n.get('Username'),
                        theme: theme,
                        key: 'username',
                        name: 'username',
                        onChange: this.handleInputChange
                    }),
                    _react2.default.createElement(_AmplifyUI.InputRow, {
                        placeholder: _awsAmplify.I18n.get('Password'),
                        theme: theme,
                        key: 'password',
                        type: 'password',
                        name: 'password',
                        onChange: this.handleInputChange
                    }),
                    _react2.default.createElement(
                        _AmplifyUI.ButtonRow,
                        { theme: theme, onClick: this.signIn },
                        _awsAmplify.I18n.get('Sign In')
                    ),
                    _react2.default.createElement(_FederatedSignIn.FederatedButtons, {
                        federated: federated,
                        theme: theme,
                        authState: authState,
                        onStateChange: onStateChange
github aws-amplify / amplify-js / packages / aws-amplify-react / dist / Auth / VerifyContact.js View on Github external
value: function submitView() {
            var theme = this.props.theme || _AmplifyTheme2.default;
            return _react2.default.createElement(
                'div',
                null,
                _react2.default.createElement(_AmplifyUI.InputRow, {
                    placeholder: _awsAmplify.I18n.get('Code'),
                    theme: theme,
                    key: 'code',
                    name: 'code',
                    autoComplete: 'off',
                    onChange: this.handleInputChange
                }),
                _react2.default.createElement(
                    _AmplifyUI.ButtonRow,
                    { theme: theme, onClick: this.submit },
                    _awsAmplify.I18n.get('Submit')
                )
            );
        }
    }, {
github aws-amplify / amplify-js / packages / aws-amplify-react / dist / Widget / MFASetupComp.js View on Github external
function showSecretCode(code, theme) {
                if (!code) return null;
                return _react2['default'].createElement(
                    'div',
                    null,
                    _react2['default'].createElement(_qrcode2['default'], { value: code }),
                    _react2['default'].createElement(_AmplifyUI.InputRow, {
                        autoFocus: true,
                        placeholder: _awsAmplify.I18n.get('totp verification token'),
                        theme: theme,
                        key: 'totpCode',
                        name: 'totpCode',
                        onChange: this.handleInputChange
                    }),
                    _react2['default'].createElement(
                        _AmplifyUI.ButtonRow,
                        { theme: theme, onClick: this.verifyTotpToken },
                        _awsAmplify.I18n.get('Verify')
                    )
                );
            }
github aws-amplify / amplify-js / packages / aws-amplify-react / dist / Auth / ConfirmSignIn.js View on Github external
}

            return _react2.default.createElement(
                _AmplifyUI.FormSection,
                { theme: theme },
                _react2.default.createElement(
                    _AmplifyUI.SectionHeader,
                    { theme: theme },
                    _awsAmplify.I18n.get('Confirm ' + this.state.mfaType + ' Code')
                ),
                _react2.default.createElement(
                    _AmplifyUI.SectionBody,
                    { theme: theme },
                    _react2.default.createElement(_AmplifyUI.InputRow, {
                        autoFocus: true,
                        placeholder: _awsAmplify.I18n.get('Code'),
                        theme: theme,
                        key: 'code',
                        name: 'code',
                        autoComplete: 'off',
                        onChange: this.handleInputChange
                    }),
                    _react2.default.createElement(
                        _AmplifyUI.ButtonRow,
                        { theme: theme, onClick: this.confirm },
                        _awsAmplify.I18n.get('Confirm')
                    )
                ),
                _react2.default.createElement(
                    _AmplifyUI.SectionFooter,
                    { theme: theme },
                    _react2.default.createElement(
github aws-amplify / amplify-js / packages / aws-amplify-react / dist / Auth / MFASetup.js View on Github external
var _this4 = this;

                var hide = this.props.hide;

                if (hide && hide.includes(MFASetup)) {
                    return null;
                }
                var code = this.state.code;

                return _react2['default'].createElement(
                    _AmplifyUI.FormSection,
                    { theme: theme },
                    _react2['default'].createElement(
                        _AmplifyUI.SectionHeader,
                        { theme: theme },
                        _awsAmplify.I18n.get('MFA Setup')
                    ),
                    _react2['default'].createElement(
                        _AmplifyUI.SectionBody,
                        { theme: theme },
                        this.showSecretCode(code),
                        _react2['default'].createElement(
                            _AmplifyUI.ButtonRow,
                            { theme: theme, onClick: this.setup },
                            _awsAmplify.I18n.get('Get secret key')
                        ),
                        _react2['default'].createElement(_AmplifyUI.InputRow, {
                            autoFocus: true,
                            placeholder: _awsAmplify.I18n.get('totp verification token'),
                            theme: theme,
                            key: 'totpCode',
                            name: 'totpCode',
github aws-amplify / amplify-js / packages / aws-amplify-react / dist / Auth / ConfirmSignUp.js View on Github external
var hide = this.props.hide;

            var username = this.usernameFromAuthData();

            if (hide && hide.includes(ConfirmSignUp)) {
                return null;
            }

            return _react2.default.createElement(
                _AmplifyUI.FormSection,
                { theme: theme },
                _react2.default.createElement(
                    _AmplifyUI.SectionHeader,
                    { theme: theme },
                    _awsAmplify.I18n.get('Confirm'),
                    ' ',
                    _awsAmplify.I18n.get('Sign Up')
                ),
                _react2.default.createElement(
                    _AmplifyUI.SectionBody,
                    { theme: theme },
                    username ? _react2.default.createElement(
                        _AmplifyUI.MessageRow,
                        null,
                        username
                    ) : _react2.default.createElement(_AmplifyUI.InputRow, {
                        placeholder: _awsAmplify.I18n.get('Username'),
                        theme: theme,
                        key: 'username',
                        name: 'username',
                        onChange: this.handleInputChange
github aws-amplify / amplify-js / packages / aws-amplify-react / dist / Widget / SelectMFAType.js View on Github external
null,
                        'less than 2 mfa types available'
                    )
                );
            }
            var SMS = MFATypes.SMS,
                TOTP = MFATypes.TOTP,
                Optional = MFATypes.Optional;

            return _react2.default.createElement(
                _AmplifyUI.FormSection,
                { theme: theme },
                _react2.default.createElement(
                    _AmplifyUI.SectionHeader,
                    { theme: theme },
                    _awsAmplify.I18n.get('Select MFA Type')
                ),
                _react2.default.createElement(
                    _AmplifyUI.SectionBody,
                    { theme: theme },
                    _react2.default.createElement(
                        _AmplifyUI.MessageRow,
                        { theme: theme },
                        _awsAmplify.I18n.get('Select your preferred MFA Type')
                    ),
                    _react2.default.createElement(
                        'div',
                        null,
                        SMS ? _react2.default.createElement(_AmplifyUI.RadioRow, {
                            placeholder: _awsAmplify.I18n.get('SMS'),
                            theme: theme,
                            key: 'sms',
github aws-amplify / amplify-js / packages / aws-amplify-react / dist / Widget / TOTPSetupComp.js View on Github external
value: function render() {
            var theme = this.props.theme ? this.props.theme : _AmplifyTheme2.default;
            var code = this.state.code;

            return _react2.default.createElement(
                _AmplifyUI.FormSection,
                { theme: theme },
                _react2.default.createElement(
                    _AmplifyUI.SectionHeader,
                    { theme: theme },
                    _awsAmplify.I18n.get('TOTP Setup')
                ),
                _react2.default.createElement(
                    _AmplifyUI.SectionBody,
                    { theme: theme },
                    _react2.default.createElement(
                        _AmplifyUI.ButtonRow,
                        { theme: theme, onClick: this.setup },
                        _awsAmplify.I18n.get('Get secret key')
                    ),
                    this.showSecretCode(code, theme),
                    this.state.setupMessage ? _react2.default.createElement(
                        _AmplifyUI.MessageRow,
                        { theme: theme },
                        _awsAmplify.I18n.get(this.state.setupMessage)
                    ) : null
                )
github aws-amplify / amplify-js / packages / aws-amplify-react / dist / Widget / SelectMFAType.js View on Github external
theme: theme,
                            key: 'noMFA',
                            name: 'MFAType',
                            value: 'NOMFA',
                            onChange: this.handleInputChange
                        }) : null,
                        _react2.default.createElement(
                            _AmplifyUI.ButtonRow,
                            { theme: theme, onClick: this.verify },
                            _awsAmplify.I18n.get('Verify')
                        )
                    ),
                    this.state.selectMessage ? _react2.default.createElement(
                        _AmplifyUI.MessageRow,
                        { theme: theme },
                        _awsAmplify.I18n.get(this.state.selectMessage)
                    ) : null
                )
            );
        }
    }, {
github aws-amplify / amplify-js / packages / aws-amplify-react / dist / Auth / RequireNewPassword.js View on Github external
value: function showComponent(theme) {
            var _this4 = this;

            var hide = this.props.hide;

            if (hide && hide.includes(RequireNewPassword)) {
                return null;
            }

            return _react2.default.createElement(
                _AmplifyUI.FormSection,
                { theme: theme },
                _react2.default.createElement(
                    _AmplifyUI.SectionHeader,
                    { theme: theme },
                    _awsAmplify.I18n.get('Change Password')
                ),
                _react2.default.createElement(
                    _AmplifyUI.SectionBody,
                    null,
                    _react2.default.createElement(_AmplifyUI.InputRow, {
                        autoFocus: true,
                        placeholder: _awsAmplify.I18n.get('New Password'),
                        theme: theme,
                        key: 'password',
                        name: 'password',
                        type: 'password',
                        onChange: this.handleInputChange
                    }),
                    _react2.default.createElement(
                        _AmplifyUI.ButtonRow,
                        { theme: theme, onClick: this.change },