CTK icon indicating copy to clipboard operation
CTK copied to clipboard

solve internationalization problems when using ctk dicom widget with languages other than english

Open CodingFatman opened this issue 6 years ago • 2 comments

the modifications below aim to solve the internationalization problem when people who want to use different language to display information when using CTK DICOM Library

the details are described as below: 1、ctkDicomTableView add a new private member QLabel to store the internal use of queryTableName, use the original QLabel just to display the table view's caption on ui. add function setDisplayText to set the table view's caption on ui add a function applyHeaderTextList to supply a way to use different language formating the table column title

2、ctkDICOMQueryRetrieveWidget set the ctkDICOMQuery Parameters with QApplication::translate() result to solve the internationalization problem

3、ctkDICOMServerNodeWidget modify addServerNode function to set the table widget column title with QApplication::translate() result to solve the internationalization problem modify readSettings function to set the default server node parameters with QApplication::translate() result to solve the internationalization problem

4、ctkDICOMTableManager modify init function, add function call of setDisplayText to patientsTable,studiesTable and seriesTable to format the table view caption with different language

CodingFatman avatar Jun 22 '18 07:06 CodingFatman

@pieper request changes have been modified

CodingFatman avatar Jun 26 '18 06:06 CodingFatman

@pieper all request have been finished

CodingFatman avatar Jun 27 '18 06:06 CodingFatman

We have received grant funding for translation of Slicer to French and Spanish, so we would like to revive and integrate this pull request. We'll set up crowdsourcing translation on Weblate.

One change that I would consider making is to generate one single .ts file for entire CTK instead of one .ts file for each component (ctkDICOM2, ctkDICOMQueryRetrieve, etc.). Having less .ts files would make managament of translations a bit easier: we would have one .ts file for each major component (Slicer, CTK, and for each extension, about a total of 100) for each language - a total of 1000-2000 files. If we had a .ts file for each component then we could end up with tens of thousands of very small .ts files.

@pieper @mhdiop @nolden

lassoan avatar Jan 11 '23 15:01 lassoan

Yes, now that we have some resources more experience with the translation options we can revisit this code and get it merged.

@nolden let us know if there are considerations for internationalization of MITK we should take into account for this.

pieper avatar Jan 11 '23 16:01 pieper

@pieper Thanks! :) Nothing to consider regarding i18n and MITK.

kislinsk avatar Jan 17 '23 14:01 kislinsk

Closing.

This pull request was superseded by:

  • https://github.com/commontk/CTK/pull/1068
  • https://github.com/commontk/CTK/pull/1077

jcfr avatar Apr 13 '23 23:04 jcfr