How to use the i18n.i18n function in i18n

To help you get started, we’ve selected a few i18n 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 felipepastorelima / react-pet-hotel / 3-Customization / 16-Booking Statuses with different colors / frontend / src / view / booking / list / BookingListTable.js View on Github external
render: (_, record) => (
        <div>
          
            {i18n('common.view')}
          
          {this.props.hasPermissionToEditRecord(record) &amp;&amp; (
            
              {i18n('common.edit')}
            
          )}
          {this.props.hasPermissionToDestroy &amp;&amp; (
             this.doDestroy(record.id)}
              okText={i18n('common.yes')}
              cancelText={i18n('common.no')}
            &gt;
              
                {i18n('common.destroy')}
              
            
          )}
        </div>
      ),
    },
github felipepastorelima / react-pet-hotel / 3-Customization / 22-Only Managers can register Employees and other Managers / frontend / src / view / iam / list / users / IamUsersToolbar.js View on Github external
render() {
    return (
      
        {this.props.hasPermissionToCreate &amp;&amp; (
          
            <button type="primary">
              {i18n('common.new')}
            </button>
          
        )}

        {this.props.hasPermissionToImport &amp;&amp; (
          
            <button type="primary">
              {i18n('common.import')}
            </button>
          
        )}

        {this.renderRemoveButton()}
        {this.renderEnableButton()}
        {this.renderDisableButton()}

        {this.props.hasPermissionToAuditLogs &amp;&amp; (
          
            <button>
              {i18n('auditLog.menu')}
            </button>
          
        )}
github felipepastorelima / react-pet-hotel / 3-Customization / 05-First page is New Pet (when none) or Bookings / frontend / src / modules / auth / authActions.js View on Github external
doSendEmailConfirmation: () => async (
    dispatch,
    getState,
  ) => {
    try {
      dispatch({ type: actions.EMAIL_CONFIRMATION_START });
      await service.sendEmailVerification(
        selectors.selectAuthenticationUser(getState()),
      );
      Message.success(
        i18n('auth.verificationEmailSuccess'),
      );
      dispatch({
        type: actions.EMAIL_CONFIRMATION_SUCCESS,
      });
    } catch (error) {
      Errors.handle(error);
      dispatch({ type: actions.EMAIL_CONFIRMATION_ERROR });
    }
  },
github felipepastorelima / react-pet-hotel / 3-Customization / 17-Manager can set daily fee and capacity / src / view / settings / SettingsForm.js View on Github external
&gt;
                  <button type="primary" loading="{saveLoading}">
                    {i18n('common.save')}
                  </button>

                  <button disabled="{saveLoading}">
                    {i18n('common.reset')}
                  </button>
                
              
            );
          }}
        /&gt;
github felipepastorelima / react-pet-hotel / 3-Cutomizations / 22-Only Managers can register Employees and other Managers / frontend / src / view / iam / view / IamViewToolbar.js View on Github external
)}`}
          &gt;
            <button>
              {i18n('auditLog.menu')}
            </button>
          
        )}

        {user &amp;&amp; user.email &amp;&amp; hasPermissionToAuditLogs &amp;&amp; (
          
            <button>
              {i18n('iam.view.activity')}
            </button>
          
        )}
      
    );
  }
}
github felipepastorelima / react-pet-hotel / 3-Customization / 22-Only Managers can register Employees and other Managers / frontend / src / view / iam / list / users / IamUsersToolbar.js View on Github external
const disabled = !selectedKeys.length || loading;

    const button = (
      <button type="primary" disabled="{disabled}">
        {i18n('iam.disable')}
      </button>
    );

    if (disabled) {
      return (
        
          {button}
        
      );
    }

    return button;
  }
github felipepastorelima / react-pet-hotel / 3-Customization / 02-Themes, Images and Icons / frontend / src / view / routes.js View on Github external
{
    path: '/settings',
    icon: 'setting',
    label: i18n('settings.menu'),
    loader: () => import('view/settings/SettingsFormPage'),
    permissionRequired: permissions.settingsEdit,
    menu: true,
  },

  {
    path: '/pet',
    loader: () => import('view/pet/list/PetListPage'),
    permissionRequired: permissions.petRead,
    exact: true,
    icon: 'github',
    label: i18n('entities.pet.menu'),
    menu: true,
  },
  {
    path: '/pet/new',
    loader: () => import('view/pet/form/PetFormPage'),
    menu: false,
    permissionRequired: permissions.petCreate,
    exact: true,
  },
  {
    path: '/pet/importer',
    loader: () =>
      import('view/pet/importer/PetImporterPage'),
    menu: false,
    permissionRequired: permissions.petImport,
    exact: true,
github felipepastorelima / react-pet-hotel / 3-Cutomizations / 22-Only Managers can register Employees and other Managers / frontend / src / view / iam / view / IamViewToolbar.js View on Github external
match,
      user,
      hasPermissionToEditRecord,
      hasPermissionToAuditLogs,
      hasPermissionToChangeStatus,
      loading,
    } = this.props;

    const id = match.params.id;

    return (
      
        {hasPermissionToEditRecord(user) &amp;&amp; (
          
            <button type="primary">
              {i18n('common.edit')}
            </button>
          
        )}

        {user &amp;&amp; hasPermissionToChangeStatus &amp;&amp; (
           this.doToggleStatus()}
            okText={i18n('common.yes')}
            cancelText={i18n('common.no')}
          &gt;
            <button disabled="{loading}" type="primary"></button>
github felipepastorelima / react-pet-hotel / 3-Customization / 10-Pet Owners can only edit bookings at Booked status / frontend / src / view / booking / view / BookingViewToolbar.js View on Github external
icon="delete"
              disabled={destroyLoading}
            &gt;
              {i18n('common.destroy')}
            
          
        )}

        {hasPermissionToAuditLogs &amp;&amp; (
          
            <button>
              {i18n('auditLog.menu')}
            </button>
          
        )}
      
    );
  }
}
github felipepastorelima / react-pet-hotel / 3-Customization / 08-Pet Owners can only see their bookings / frontend / src / view / booking / list / BookingListTable.js View on Github external
render: (_, record) =&gt; (
        <div>
          
            {i18n('common.view')}
          
          {this.props.hasPermissionToEdit &amp;&amp; (
            
              {i18n('common.edit')}
            
          )}
          {this.props.hasPermissionToDestroy &amp;&amp; (
             this.doDestroy(record.id)}
              okText={i18n('common.yes')}
              cancelText={i18n('common.no')}
            &gt;
              
                {i18n('common.destroy')}
              
            
          )}
        </div>
      ),
    },