Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-03

[patch] - Translation lookups always fail on Identifier lookups

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

I have sent a patch for the following bug report.
http://bugs.freepascal.org/view.php?id=10938

Summary description:
------------------------------
In the translations.pas unit Translate() method, the first attempt at looking up a translations is via the ResourceString Identifier. The Identifier consists of a unitname and resource constant name. eg: StrConst.rsOK

When using 'convrst' to generate .po files that identifier changes to 'strconst:rsok'. Note the '.' becomes ':'.

This is what causes the Translate() method to always fail it's first lookup via the ResourceString constants.

A attached two patches.
to_show_the_bug.diff ---> Shows the bug via DebugLn() output

To fix the bug, revert the previous patch and apply the following patch. translations.diff ---> It does a string replace changing . to : as it's defined in the .po files.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email