How to use the cozy-ui/transpiled/react.translate function in cozy-ui

To help you get started, we’ve selected a few cozy-ui 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 cozy / cozy.github.io / en / cozy-banks / src / ducks / transactions / actions / ReimbursementStatusAction / ReimbursementStatusModal.jsx View on Github external
// TODO use stack layout when https://github.com/cozy/cozy-banks/pull/1312 has been merged (see https://github.com/cozy/cozy-banks/pull/1312/commits/2bc1d75a25fe2c61f219579ac56407e356997105 more particularly)
                    className={cx({
                      'u-mt-1-half': index !== 0
                    })}
                  />
                ))}
            
          ) : null}
        
      
    )
  }
}

const ReimbursementStatusModal = compose(
  translate(),
  withBreakpoints()
)(_ReimbursementStatusModal)

export default ReimbursementStatusModal
github cozy / cozy.github.io / en / cozy-banks / src / ducks / settings / NewAccountSettings.jsx View on Github external
id="account-type"
          label={t('AccountSettings.type')}
          value={getAccountType(account)}
          disabled
          variant={fieldVariant}
          className={styles.Form__field}
        />
      
      
    
  )
}

const AccountSettingsForm = compose(
  withBreakpoints(),
  translate()
)(DumbAccountSettingsForm)

const FormControls = props => {
  const { t } = useI18n()
  const { onCancel, form, className, ...rest } = props

  return (
    <div>
      <button label="{t('General.cancel')}">
      </button></div>
github cozy / cozy.github.io / en / cozy-banks / src / ducks / balance / AccountRowLoading.jsx View on Github external
)
  }
}

AccountRowLoading.propTypes = {
  t: PropTypes.func.isRequired,
  konnector: PropTypes.string.isRequired,
  account: PropTypes.string,
  status: PropTypes.string.isRequired
}

export default compose(
  translate(),
  withClient
)(AccountRowLoading)
github cozy / cozy.github.io / en / cozy-banks / src / ducks / transactions / Transactions.jsx View on Github external
)
  }
}

TransactionsDumb.propTypes = {
  showTriggerErrors: PropTypes.bool
}

TransactionsDumb.defaultProps = {
  showTriggerErrors: true
}

const Transactions = compose(
  withBreakpoints(),
  translate()
)(TransactionsDumb)

export const TransactionList = Transactions
github cozy / cozy.github.io / en / cozy-banks / src / ducks / balance / BalancePanels.jsx View on Github external
}
}

export const BalanceAddAccountButton = ({ theme, onClick }) =&gt; {
  const { t } = useI18n()
  return (
    <button label="{t('Accounts.add_bank')}">
  )
}

BalanceAddAccountButton.defaultProps = {
  theme: 'ghost'
}

export default compose(
  translate(),
  withRouter
)(BalancePanels)
</button>
github cozy / cozy.github.io / en / cozy-banks / src / ducks / categories / Categories.jsx View on Github external
),
      ...(isCollapsed || subcategory
        ? []
        : subcategories.map(subcategory =&gt;
            this.renderCategoryMobile(category, subcategory)
          ))
    ]
  }
}

export default compose(
  withRouter,
  withBreakpoints(),
  translate()
)(Categories)
github cozy / cozy.github.io / en / cozy-banks / src / components / SelectDates / SelectDates.jsx View on Github external
)
  }
}

SelectDates.defaultProps = {
  options: getDefaultOptions()
}

SelectDates.propTypes = {
  onChange: PropTypes.func.isRequired
}

export default compose(
  translate(),
  scrollAware,
  withBreakpoints(),
  themed
)(SelectDates)
github cozy / cozy.github.io / en / cozy-banks / src / ducks / settings / GroupSettings.jsx View on Github external
}}
        
        <p>
          <button label="{t('Groups.delete')}">
        <p></p>
      
    )
  }
}

export const GroupSettings = compose(
  translate(),
  withBreakpoints()
)(DumbGroupSettings)

const enhance = Component =&gt;
  compose(
    withRouter,
    withClient
  )(Component)

const ExistingGroupSettings = enhance(props =&gt; (
   client.get(GROUP_DOCTYPE, props.routeParams.groupId)}&gt;
    {({ data: group, fetchStatus }) =&gt;
      fetchStatus === 'loading' || fetchStatus === 'pending' ? (
        &lt;&gt;
          
          </button></p>
github cozy / cozy.github.io / en / cozy-banks / src / ducks / settings / Configuration.jsx View on Github external
{Configuration.renderExtraItems()}
      
    )
  }
}

export default compose(
  withClient,
  queryConnect({
    settingsCollection: settingsConn
  }),
  withAccountOrGroupLabeller('getAccountOrGroupLabel'),
  flag.connect,
  translate()
)(Configuration)
github cozy / cozy.github.io / en / cozy-banks / src / ducks / balance / HistoryChart.jsx View on Github external
pointStrokeColor="rgba(255, 255, 255, 0.3)"
          getTooltipContent={this.getTooltipContent}
          data={data}
          width={width}
          height={height}
          {...this.props}
        /&gt;
      
    )
  }
}

const EnhancedHistoryChart = compose(
  withRouter,
  withBreakpoints(),
  translate()
)(HistoryChart)

export const ConnectedHistoryChart = compose(
  withRouter,
  connect((state, ownProps) =&gt; ({
    data: getChartData(state, ownProps)
  })),
  withBreakpoints(),
  translate()
)(HistoryChart)

export default EnhancedHistoryChart