chore: update French i18n (#5561)

This commit is contained in:
Martin Bellehumeur, M. Eng. authored and GitHub committed 2025-12-12 10:46:56 -05:00
1 parent ba140a05f7
commit 181c0f32c5
185 files changed
+2779 -374

No files matched your search

@@ -1,6 +1,8 @@
import { useSystem } from '../contextProviders/SystemProvider';
import i18n from 'i18next';
import { seriesSortCriteria } from './sortStudy';
/**
* Tab properties that drive which tab group is used for thumbnail display.
*/
@@ -98,17 +100,17 @@ export function createStudyBrowserTabs(
const tabs = [
{
name: 'primary',
label: 'Primary',
label: i18n.t('StudyBrowser:Primary'),
studies: primaryStudies.sort((studyA, studyB) => _byDate(studyA.date, studyB.date)),
},
{
name: 'recent',
label: 'Recent',
label: i18n.t('StudyBrowser:Recent'),
studies: recentStudies.sort((studyA, studyB) => _byDate(studyA.date, studyB.date)),
},
{
name: 'all',
label: 'All',
label: i18n.t('StudyBrowser:All'),
studies: allStudies.sort((studyA, studyB) => _byDate(studyA.date, studyB.date)),
},
];
+13 -3
View File
@@ -8,7 +8,17 @@ import i18n from 'i18next';
* @param {string} format Desired date format
* @returns {string} Formatted date
*/
export default (date, format = i18n.t('Common:localDateFormat','DD-MMM-YYYY')) => {
// moment(undefined) returns the current date, so return the empty string instead
return date ? moment(date).format(format) : '';
export default (date, format = i18n.t('Common:localDateFormat', 'DD-MMM-YYYY')) => {
if (!date) {
return '';
}
const locale = i18n.language || 'en';
const parsed = moment(date, ['YYYYMMDD', 'YYYY.MM.DD'], true);
if (!parsed.isValid()) {
return moment(date).locale(locale).format(format);
}
return parsed.locale(locale).format(format);
};