summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2011-08-31 15:02:03 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2011-08-31 15:02:03 +0200
commit4386377a59dc066a34d94e470247fe18fd00db9b (patch)
tree1a2132be7462dd1de875878c069d408e98a14048 /src
parent2299e05089dd38d319fb55dc982687596c1efea5 (diff)
downloadfpGUI-4386377a59dc066a34d94e470247fe18fd00db9b.tar.xz
pofile unit now uses the UTF-8 safe file functions.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/fpg_pofiles.pas13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/corelib/fpg_pofiles.pas b/src/corelib/fpg_pofiles.pas
index 5f8ff7bc..656e776d 100644
--- a/src/corelib/fpg_pofiles.pas
+++ b/src/corelib/fpg_pofiles.pas
@@ -101,7 +101,8 @@ implementation
uses
fpg_main,
- fpg_stringutils;
+ fpg_stringutils,
+ fpg_utils;
function UTF8ToSystemCharSet(const s: string): string; {$ifndef MultiLocale} inline;
@@ -161,8 +162,8 @@ begin
ToolkitOnly := False;
// build correct filename for fpGUI Toolkit translations.
- lPath := ExtractFilePath(AFilename);
- lFile := ExtractFileName(AFilename);
+ lPath := fpgExtractFilePath(AFilename);
+ lFile := fpgExtractFileName(AFilename);
lPos := Pos('.', lFile);
lFile := lPath + 'fpgui' + Copy(lFile, lPos, Length(lFile)-lPos+1);
{$IFDEF DEBUG}
@@ -171,14 +172,14 @@ begin
writeln(' AFilename="', AFilename, '"');
{$ENDIF}
- if {(ResUnitName = '') or} (AFilename = '') or (not FileExists(AFilename)) then
+ if {(ResUnitName = '') or} (AFilename = '') or (not fpgFileExists(AFilename)) then
ToolkitOnly := True; // we don't have a application translation file
try
po := nil;
// read .po file
if ToolkitOnly then
begin
- if not FileExists(lFile) then
+ if not fpgFileExists(lFile) then
Exit;
{$IFDEF DEBUG}
writeln(' ************ Only translating the toolkit ***********');
@@ -415,7 +416,7 @@ var
f: TStream;
begin
// Now fpGUI translation
- if (AFilename = '') or (not FileExists(AFilename)) then
+ if (AFilename = '') or (not fpgFileExists(AFilename)) then
Exit;
f := TFileStream.Create(AFilename, fmOpenRead);
try