feat: Added support for i18n (#2439)

* Added translation for various react components in OHIF-v3

* Added a test language for debugging- test-LNG 

* Added copy for test language to not get overwritten
This commit is contained in:
Alireza authored and GitHub committed 2021-06-15 10:56:33 -04:00
1 parent fdb6ca41d6
commit 1bf651e763
42 files changed
+365 -63

No files matched your search

@@ -1,6 +1,7 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { useTranslation } from 'react-i18next';
import './tooltip.css';
@@ -33,6 +34,7 @@ const Tooltip = ({
isDisabled,
}) => {
const [isActive, setIsActive] = useState(false);
const { t } = useTranslation('Buttons');
const handleMouseOver = () => {
if (!isActive) {
@@ -72,7 +74,7 @@ const Tooltip = ({
}
)}
>
{content}
{typeof content === 'string' ? t(content) : content}
<svg
className="absolute h-4 text-primary-dark stroke-secondary-main"
style={arrowPositionStyle[position]}