Recent

Author Topic: Localization of TAChart: Translators needed  (Read 2708 times)

wp

  • Hero Member
  • *****
  • Posts: 13398
Localization of TAChart: Translators needed
« on: December 12, 2015, 11:10:52 pm »
The current trunk version of TAChart is localized now. Currently there is only one translation (German). I would appreciate if users would contribute translations in their native language. The file to be translated is called TAChartStrConsts.po and resides in the "languages" folder of the TAChart installation. Use POEdit for translation, and save the file with the language code inserted before the ".po", i.e. an Italian translation file would be named "TAChartStrConsts.it.po". Submit the file by means of a bugtracker report, or upload it here.

A note to rare users having written their own series, tool or transformation types: The registration procedure had to be modified a little bit. So far, a new series type has been registered by calling
Code: Pascal  [Select][+][-]
  1. initialization
  2.   RegisterSeriesClass(TMySpecialSeries, 'Special series');
The second parameter, the string, is used in the series editor for selection of the series types. In order to allow translation of these strings, the parameter is replaced by the address of the string which is a resourcestring preferrably:
Code: Pascal  [Select][+][-]
  1. resourestring
  2.   rsSpecialSeries = 'Special series';
  3. initalization
  4.   RegisterSeriesClass(TMySpecialSeries, @rsSpecialSeries);
The same holds true for user-written ChartTools and AxisTransformations.

kapibara

  • Hero Member
  • *****
  • Posts: 656
Re: Localization of TAChart: Translators needed
« Reply #1 on: December 13, 2015, 03:43:27 am »
Hi wp, I made a Swedish translation. How to get it into the chart to verify it there? POEdit didn't show swedish chars correctly so I made it by hand.
« Last Edit: December 13, 2015, 05:46:51 am by kapibara »
Lazarus trunk / fpc 3.2.2 / Kubuntu 24.04 - 64 bit

wp

  • Hero Member
  • *****
  • Posts: 13398
Re: Localization of TAChart: Translators needed
« Reply #2 on: December 13, 2015, 11:28:46 am »
Thank you for your contribution, I just uploaded it to trunk (--> r50760).

I should have been more specific: TAChart does not expose translated strings for programs, the translation affects the Lazarus designer only. So, to test your translation, switch the Lazarus language to Swedish, restart Lazarus, add a chart to a new form, right-click on the form -> the first popup menu item ("Edit series") should be in Swedish now. The Series editor should have button captions in your language, and after clicking at "Add" you should see the series type names in Swedish as well. The same with the Transformations and ChartTools editors. And if you add a TListChartSource and click on the "..." of "DataPoints" in the object inspector you should see the Datapoint editor in Swedish as well.

 

TinyPortal © 2005-2018