|
@@ -96,24 +96,30 @@ begin
|
|
begin
|
|
begin
|
|
item := FMainPoFile.FindPoItem(AId);
|
|
item := FMainPoFile.FindPoItem(AId);
|
|
if (AId <> '') and Assigned(item) then
|
|
if (AId <> '') and Assigned(item) then
|
|
- exit(item.Translation) else
|
|
|
|
|
|
+ exit(item.Translation);
|
|
|
|
+
|
|
|
|
+ item := FMainPoFile.OriginalToItem(AText);
|
|
|
|
+ if Assigned(item) then exit(item.Translation);
|
|
|
|
+
|
|
|
|
+ item := FMainPoFile.OriginalToItem(AText+':');
|
|
|
|
+ if item = nil then item := FMainPoFile.OriginalToItem(AText+' :');
|
|
|
|
+ if Assigned(item) then
|
|
begin
|
|
begin
|
|
- item := FMainPoFile.OriginalToItem(AText);
|
|
|
|
- if Assigned(item) then exit(item.Translation) else
|
|
|
|
|
|
+ result := item.Translation.TrimRight;
|
|
|
|
+ if result.EndsWith(':') then
|
|
begin
|
|
begin
|
|
- item := FMainPoFile.OriginalToItem(AText+':');
|
|
|
|
- if item = nil then item := FMainPoFile.OriginalToItem(AText+' :');
|
|
|
|
- if Assigned(item) then
|
|
|
|
- begin
|
|
|
|
- result := item.Translation.TrimRight;
|
|
|
|
- if result.EndsWith(':') then
|
|
|
|
- begin
|
|
|
|
- delete(result, length(result), 1);
|
|
|
|
- result := result.TrimRight;
|
|
|
|
- end;
|
|
|
|
- exit;
|
|
|
|
- end;
|
|
|
|
|
|
+ delete(result, length(result), 1);
|
|
|
|
+ result := result.TrimRight;
|
|
end;
|
|
end;
|
|
|
|
+ exit;
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+ item := FMainPoFile.OriginalToItem(AText+'...');
|
|
|
|
+ if Assigned(item) then
|
|
|
|
+ begin
|
|
|
|
+ result := item.Translation.TrimRight;
|
|
|
|
+ if result.EndsWith('...') then delete(result, length(result)-2, 3);
|
|
|
|
+ exit;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
result := AText;
|
|
result := AText;
|