Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n, add chinese lang #15

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

i18n, add chinese lang #15

wants to merge 4 commits into from

Conversation

delez911
Copy link

i18n, add chinese lang

@noworneverev noworneverev self-requested a review September 25, 2024 19:59
Copy link
Owner

@noworneverev noworneverev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for your efforts! Here are a few changes and suggestions:

  1. Please add a switch button in the header to allow users to choose the language, with English set as the default.
  2. Kindly add back the Google Analytics measurement.
  3. Additional minor suggestions are provided in the separate comments.

Please enable "Include Text Unit" and "Include Communities"
{hasCovariates && ', and "Include Covariates"'} to use Local
Search.
{t('apiSearchDrawer.enableLocalSearch', { hasCovariates })}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be fixed. The intention is that when users upload a covariate parquet file, 'hasCovariate' will be set to true. Therefore, displaying this label will be meaningful.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file necessary?


i18n.use(initReactI18next)
.init({
lng: 'zh-Hans',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please set the default language to English.

@@ -46,3 +46,20 @@ The logic for creating relationships for text units, documents, communities, and
| Text Unit | `HAS_COVARIATE` | Covariate |
| Community | `HAS_FINDING` | Finding |
| Entity | `IN_COMMUNITY` | Community |


##
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a title here, e.g., ## Docker Setup.

import { initReactI18next } from 'react-i18next'

import data from './languages.json'
import Introduction from '@/app/components/Introduction';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unused import

@@ -64,13 +76,59 @@ const GraphDataHandler: React.FC = () => {
}, [entities]);

useEffect(() => {
const measurementId = process.env.REACT_APP_GA_MEASUREMENT_ID;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add back the Google Analytics measurement. We still need it for tracking purposes.

});


const GraphDataHandler: React.FC<{ categary: string|null }> = ({ categary }) => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: 'categary' should be 'category'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants