Skip to content

Conversation

@hns1971
Copy link

@hns1971 hns1971 commented Sep 25, 2025

Description

This pull request aims to improve the project's internationalization (i18n) support, ensuring that all previously unsupported components are now internationalized.

Changes

  • Component Internationalization: Internationalize static text in core components, replacing hard-coded text with the $t('key') method.

描述

本 PR 旨在修改项目的国际化 (i18n) 支持,使未支持国际化的部分,都能支持国际化。

修改内容

​- ​组件国际化​:对核心组件中的静态文本进行了国际化改造,使用 $t('key')方法替换硬编码文本。

@netlify
Copy link

netlify bot commented Sep 25, 2025

Deploy Preview for ohif-dev canceled.

Name Link
🔨 Latest commit 35d2024
🔍 Latest deploy log https://app.netlify.com/projects/ohif-dev/deploys/68d4c435df6f520008f05cdb

@sedghi sedghi requested a review from jbocce September 30, 2025 13:47
@jbocce
Copy link
Collaborator

jbocce commented Sep 30, 2025

Looks like there are conflicts on this branch. Please fix them. Thanks.

props: {
icon: 'tool-move',
label: 'Pan',
label: 'Buttons:Pan',
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is not a bad approach, however we currently are using i18n right in the various toolbarButton files. I think once you update your branch you will see what I mean. Or see this:

label: i18n.t('Buttons:Status'),

Copy link
Collaborator

Choose a reason for hiding this comment

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

These changes will no longer be needed once you switch to the standard way we do i18n. Thanks.

Copy link
Collaborator

@jbocce jbocce left a comment

Choose a reason for hiding this comment

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

Thanks for this effort. See my comments.

@pedrokohler
Copy link
Collaborator

@jbocce not my business, but shouldn’t commit messages be in English for readability?

Also, having the PR description in English would be great so anyone can reference it later. I’ve lost count of how many times I had to dig through old PRs just to understand what was going on while fixing or investigating an issue.

@jbocce jbocce changed the title 国际化支持方式 International support methods - 国际化支持方式 Oct 3, 2025
@jbocce
Copy link
Collaborator

jbocce commented Oct 3, 2025

@jbocce not my business, but shouldn’t commit messages be in English for readability?

Also, having the PR description in English would be great so anyone can reference it later. I’ve lost count of how many times I had to dig through old PRs just to understand what was going on while fixing or investigating an issue.

@pedrokohler You make a good point. I respectfully used Google translate to translate what was there for the PR and left the original text too.

As for the commit message, I will discuss with the core OHIF members.

Thank you.

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.

3 participants