How to use the react-jhipster.translate function in react-jhipster

To help you get started, we’ve selected a few react-jhipster 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 oktadeveloper / okta-react-native-spring-boot-example / jhipster-api / src / main / webapp / app / entities / blood-pressure / blood-pressure-update.tsx View on Github external
) : null}
                
                  <label for="timestamp" id="timestampLabel">
                    Timestamp
                  </label>
                  
                
                
                  <label for="systolic" id="systolicLabel">
                    Systolic
                  </label>
github dongyanghe / eikesi / x-im-web / src / main / webapp / app / entities / customer-flock / customer-flock-update.tsx View on Github external
ID
                    
                    
                  
                ) : null}
                
                  <label for="name" id="nameLabel">
                    Name
                  </label>
                  
                  
                    
                  
                
                
                  <label for="py" id="pyLabel">
                    Py
                  </label>
github dongyanghe / eikesi / x-im-web / src / main / webapp / app / entities / customer / customer-update.tsx View on Github external
<label for="resetDate" id="resetDateLabel">
                    Reset Date
                  </label>
                  
                  
                    
                  
                
                
                  <label for="createdBy" id="createdByLabel">
                    Created By
                  </label>
github dongyanghe / eikesi / x-im-web / src / main / webapp / app / entities / history-message / history-message-update.tsx View on Github external
/&gt;
                  
                    
                  
                
                
                  <label for="createdId" id="createdIdLabel">
                    Created Id
                  </label>
                  
                  
                    
                  
                
                
                  <label for="targetDate" id="targetDateLabel">
                    Target Date
                  </label>
github jhipster / jhipster-sample-app-react / src / main / webapp / app / modules / account / settings / settings.reducer.ts View on Github external
export const saveAccountSettings = account => async (dispatch, getState) => {
  await dispatch({
    type: ACTION_TYPES.UPDATE_ACCOUNT,
    payload: axios.post(apiUrl, account),
    meta: {
      successMessage: translate('settings.messages.success')
    }
  });

  if (Storage.session.get(`locale`)) {
    Storage.session.remove(`locale`);
  }

  await dispatch(getSession());
};
github jhipster / jhipster-sample-app-react / src / main / webapp / app / modules / account / password / password.tsx View on Github external
name="confirmPassword"
              label={translate('global.form.confirmpassword.label')}
              placeholder={translate('global.form.confirmpassword.placeholder')}
              type="password"
              validate={{
                required: {
                  value: true,
                  errorMessage: translate('global.messages.validate.confirmpassword.required')
                },
                minLength: {
                  value: 4,
                  errorMessage: translate('global.messages.validate.confirmpassword.minlength')
                },
                maxLength: {
                  value: 50,
                  errorMessage: translate('global.messages.validate.confirmpassword.maxlength')
                },
                match: {
                  value: 'newPassword',
                  errorMessage: translate('global.messages.error.dontmatch')
                }
              }}
            /&gt;
            <button type="submit" color="success">
              Save
            </button>
          
        
      
    
  );
};
github xebialabs / e-commerce-microservice / store / src / main / webapp / app / config / notification-middleware.ts View on Github external
if (action.meta && action.meta.successMessage) {
        toast.success(action.meta.successMessage);
      } else if (response && response.action && response.action.payload && response.action.payload.headers) {
        const headers = response.action.payload.headers;
        let alert: string = null;
        let alertParams: string = null;
        Object.entries(headers).forEach(([k, v]: [string, string]) => {
          if (k.toLowerCase().endsWith('app-alert')) {
            alert = v;
          } else if (k.toLowerCase().endsWith('app-params')) {
            alertParams = v;
          }
        });
        if (alert) {
          const alertParam = alertParams;
          toast.success(translate(alert, { param: alertParam }));
        }
      }
      return Promise.resolve(response);
    })
    .catch(error => {
github jhipster / generator-jhipster / generators / client / templates / react / src / main / webapp / app / modules / account / register / register.tsx View on Github external
type="email"
                validate={{
                  required: { value: true, errorMessage: translate('global.messages.validate.email.required') },
                  minLength: { value: 5, errorMessage: translate('global.messages.validate.email.minlength') },
                  maxLength: { value: 254, errorMessage: translate('global.messages.validate.email.maxlength') }
                }}
              /&gt;
              }
                placeholder={translate('global.form.newpassword.placeholder')}
                type="password"
                onChange={this.updatePassword}
                validate={{
                  required: { value: true, errorMessage: translate('global.messages.validate.newpassword.required') },
                  minLength: { value: 4, errorMessage: translate('global.messages.validate.newpassword.minlength') },
                  maxLength: { value: 50, errorMessage: translate('global.messages.validate.newpassword.maxlength') }
                }}
              /&gt;
              
              }
                placeholder={translate('global.form.confirmpassword.placeholder')}
                type="password"
                validate={{
                  required: { value: true, errorMessage: translate('global.messages.validate.confirmpassword.required') },
                  minLength: { value: 4, errorMessage: translate('global.messages.validate.confirmpassword.minlength') },
                  maxLength: { value: 50, errorMessage: translate('global.messages.validate.confirmpassword.maxlength') },
                  match: { value: 'firstPassword', errorMessage: translate('global.messages.error.dontmatch') }
                }}
              /&gt;
github dongyanghe / eikesi / x-im-web / src / main / webapp / app / modules / account / register / register.tsx View on Github external
validate={{
                  required: { value: true, errorMessage: translate('global.messages.validate.email.required') },
                  minLength: { value: 5, errorMessage: translate('global.messages.validate.email.minlength') },
                  maxLength: { value: 254, errorMessage: translate('global.messages.validate.email.maxlength') }
                }}
              /&gt;
              
              
              
              <button type="submit" color="primary" id="register-submit"></button>