Skip to content

Conversation

@mbellehumeur
Copy link
Contributor

@mbellehumeur mbellehumeur commented Nov 12, 2025

Context

Update french version with toolbar and other items.

Changes & Results

Add local date overlays and left panel.
Added translation for user preferences (hotkeys).
Fixed bug with the display of the hotkeys on first load.

Testing

Check menus and messages for non translated labels.

Checklist

PR

  • My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

  • My code has been well-documented (function documentation, inline comments,
    etc.)

Public Documentation Updates

  • The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • OS:

@netlify
Copy link

netlify bot commented Nov 12, 2025

Deploy Preview for ohif-dev ready!

Name Link
🔨 Latest commit 03b10d2
🔍 Latest deploy log https://app.netlify.com/projects/ohif-dev/deploys/6926ce8a74a0240008f825eb
😎 Deploy Preview https://deploy-preview-5561--ohif-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mbellehumeur mbellehumeur changed the title [WIP] Chore: update French i18n. Add user preferences. Add locale date overlays. Chore: update French i18n Nov 12, 2025
@mbellehumeur mbellehumeur changed the title Chore: update French i18n chore: update French i18n Nov 13, 2025
@mbellehumeur
Copy link
Contributor Author

Ready for review. I would like to use this to add another language next week.

@sedghi sedghi requested a review from jbocce December 3, 2025 20:01
@jbocce
Copy link
Collaborator

jbocce commented Dec 10, 2025

I also did some testing and noticed the following were not translated into French...

image

In fact many if not all of the tooltips in the segmentation panel were NOT translated. However stuff is translated...

image

Please have a look. I won't do more testing until these are addressed.

@jbocce
Copy link
Collaborator

jbocce commented Dec 10, 2025

There is a Test-LNG folder that is used for testing and we try to keep it up-to-date. Could you please update that with ALL the strings you added? Grazie.

@jbocce
Copy link
Collaborator

jbocce commented Dec 10, 2025

There is a Test-LNG folder that is used for testing and we try to keep it up-to-date. Could you please update that with ALL the strings you added? Grazie.

Or I should say merci. 😊

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.

Très bien, monsieur. Merci beaucoup.

Thanks for this tremendous effort. A few comments to address.

I did not review the language files themselves, so if you put any profanity in there it is on you. 🤣🤣🤣

segments: Segment[];
placeholder?: string;
}) {
const { t } = useTranslation('SegmentationTable');
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think a better name is SegmentationPanel since the table is technically part of the panel and it is best to keep ALL the segmentation strings in one place.

Copy link
Collaborator

Choose a reason for hiding this comment

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

All of the strings in here pertain to the segmentation panel, yet it looks like the strings were put into the buttons i18n file. Please reconsider this.

*/
export function formatDICOMDate(date, strFormat = 'MMM D, YYYY') {
return moment(date, 'YYYYMMDD').format(strFormat);
export function formatDICOMDate(date, strFormat?: string) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have this function a few times. Can we put it someplace central, like maybe in ui-next/utils or something?

let translatedEmpty = '(empty)';
try {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const i18n = require('@ohif/i18n').default;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think using require here might be a no-no. @sedghi thoughts about require?

Copy link
Collaborator

Choose a reason for hiding this comment

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

similar to a comment I made about segmentation, these strings in this file are particular to TMTV, not sure if they should be lumped in with "buttons".

},
ref
) => {
const { t } = useTranslation('MeasurementTable');
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure it is the correct assumption to use MeasurementTable here because DataRow is supposed to be a generic ui component. It is used in various places including the segmentation panel. I think here we either

  • create a DataRow i18n fine OR
  • consider passing in the t as a property OR
  • perhaps even the translation file name as a property OR
  • put the strings into Common.js

I think I like the DataRow (first option best).

maxWidth?: string;
maxHeight?: string;
/** Optional labels/placeholders for localization */
widthLabel?: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

From the file below it appears that there is an assumption here that these are already translated or am I missing something?

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