figure-modal-help.tsx 1.9 KB

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