Browse Source

* slightly adapted patch from Mantis 17224 from Maxim Ganetsky
also look ups with gettext-context if given.

git-svn-id: trunk@15865 -

marco 15 years ago
parent
commit
0d4d22690c
1 changed files with 7 additions and 1 deletions
  1. 7 1
      packages/fcl-base/src/gettext.pp

+ 7 - 1
packages/fcl-base/src/gettext.pp

@@ -261,8 +261,14 @@ end;
 
 
 function Translate (Name,Value : AnsiString; Hash : Longint; arg:pointer) : AnsiString;
+var contextempty : boolean;
 begin
-  Result:=TMOFile(arg).Translate(Value,Hash);
+  contextempty:=name='';
+  Result:='';
+  if not contextempty then
+    Result:=TMOFile(arg).Translate(Name+#4+Value);
+  if contextempty or (Result='') then
+    Result:=TMOFile(arg).Translate(Value,Hash);
 end;