figure-modal-help.tsx 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import { FC } from 'react'
  2. import { Trans, useTranslation } from 'react-i18next'
  3. const LearnWikiLink: FC<React.PropsWithChildren<{ article: string }>> = ({
  4. article,
  5. children,
  6. }) => {
  7. return <a href={`/learn/latex/${article}`}>{children}</a>
  8. }
  9. export const FigureModalHelp = () => {
  10. const { t } = useTranslation()
  11. return (
  12. <>
  13. <p>{t('this_tool_helps_you_insert_figures')}</p>
  14. <b>{t('editing_captions')}</b>
  15. <p>{t('when_you_tick_the_include_caption_box')}</p>
  16. <b>{t('understanding_labels')}</b>
  17. <p>
  18. <Trans
  19. i18nKey="labels_help_you_to_easily_reference_your_figures"
  20. components={[
  21. // eslint-disable-next-line react/jsx-key
  22. <code />,
  23. // eslint-disable-next-line react/jsx-key
  24. <LearnWikiLink article="Inserting_Images#Labels_and_cross-references" />,
  25. ]}
  26. />
  27. </p>
  28. <b>{t('customizing_figures')}</b>
  29. <p>
  30. <Trans
  31. i18nKey="there_are_lots_of_options_to_edit_and_customize_your_figures"
  32. components={[
  33. // eslint-disable-next-line react/jsx-key
  34. <LearnWikiLink article="Inserting_Images" />,
  35. ]}
  36. />
  37. </p>
  38. <b>{t('changing_the_position_of_your_figure')}</b>
  39. <p>
  40. <Trans
  41. i18nKey="latex_places_figures_according_to_a_special_algorithm"
  42. components={[
  43. // eslint-disable-next-line react/jsx-key
  44. <LearnWikiLink article="Positioning_images_and_tables" />,
  45. ]}
  46. />
  47. </p>
  48. <b>{t('dealing_with_errors')}</b>
  49. <p>
  50. <Trans
  51. i18nKey="are_you_getting_an_undefined_control_sequence_error"
  52. components={[
  53. // eslint-disable-next-line react/jsx-key
  54. <code />,
  55. // eslint-disable-next-line react/jsx-key
  56. <LearnWikiLink article="Inserting_Images" />,
  57. ]}
  58. />
  59. </p>
  60. </>
  61. )
  62. }