figure-modal-help.tsx 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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>{t('this_tool_helps_you_insert_figures')}</p>
  11. <b>{t('editing_captions')}</b>
  12. <p>{t('when_you_tick_the_include_caption_box')}</p>
  13. <b>{t('understanding_labels')}</b>
  14. <p>
  15. <Trans
  16. i18nKey="labels_help_you_to_easily_reference_your_figures"
  17. components={[
  18. // eslint-disable-next-line react/jsx-key
  19. <code />,
  20. // eslint-disable-next-line react/jsx-key
  21. <LearnWikiLink article="Inserting_Images#Labels_and_cross-references" />,
  22. ]}
  23. />
  24. </p>
  25. <b>{t('customizing_figures')}</b>
  26. <p>
  27. <Trans
  28. i18nKey="there_are_lots_of_options_to_edit_and_customize_your_figures"
  29. components={[
  30. // eslint-disable-next-line react/jsx-key
  31. <LearnWikiLink article="Inserting_Images" />,
  32. ]}
  33. />
  34. </p>
  35. <b>{t('changing_the_position_of_your_figure')}</b>
  36. <p>
  37. <Trans
  38. i18nKey="latex_places_figures_according_to_a_special_algorithm"
  39. components={[
  40. // eslint-disable-next-line react/jsx-key
  41. <LearnWikiLink article="Positioning_images_and_tables" />,
  42. ]}
  43. />
  44. </p>
  45. <b>{t('dealing_with_errors')}</b>
  46. <p>
  47. <Trans
  48. i18nKey="are_you_getting_an_undefined_control_sequence_error"
  49. components={[
  50. // eslint-disable-next-line react/jsx-key
  51. <code />,
  52. // eslint-disable-next-line react/jsx-key
  53. <LearnWikiLink article="Inserting_Images" />,
  54. ]}
  55. />
  56. </p>
  57. </>
  58. )
  59. }