updated translation files

git-svn-id: trunk@3809 -
This commit is contained in:
mattias 2003-01-17 16:28:42 +00:00
parent 600971c0ea
commit d335e42ff5
25 changed files with 9606 additions and 6676 deletions

1
.gitattributes vendored
View File

@ -816,3 +816,4 @@ tools/lazarusmake.ini svneol=native#text/plain
tools/lazres.lpi svneol=native#text/plain
tools/lazres.pp svneol=native#text/pascal
tools/runwait.sh -text svneol=native#application/x-sh
tools/updatepofiles.pas svneol=native#text/pascal

View File

@ -1,5 +1,5 @@
#
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/11/05]
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/09/21]
#
default: all
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx
@ -58,9 +58,6 @@ ifdef inUnix
PATHSEP=/
else
PATHSEP:=$(subst /,\,/)
ifneq ($(findstring sh.exe,$(SHELL)),)
PATHSEP=/
endif
endif
ifdef PWD
BASEDIR:=$(subst \,/,$(shell $(PWD)))
@ -142,16 +139,6 @@ ifndef OS_TARGET
OS_TARGET:=$(shell $(FPC) -iTO)
endif
endif
ifndef CPU_TARGET
ifdef CPU_TARGET_DEFAULT
CPU_TARGET=$(CPU_TARGET_DEFAULT)
endif
endif
ifndef OS_TARGET
ifdef OS_TARGET_DEFAULT
OS_TARGET=$(OS_TARGET_DEFAULT)
endif
endif
FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
ifneq ($(FULL_TARGET),$(FULL_SOURCE))
@ -1489,7 +1476,6 @@ fpc_baseinfo:
@$(ECHO) Rm........ $(RMPROG)
@$(ECHO) GInstall.. $(GINSTALL)
@$(ECHO) Echo...... $(ECHO)
@$(ECHO) Shell..... $(SHELL)
@$(ECHO) Date...... $(DATE)
@$(ECHO) FPCMake... $(FPCMAKE)
@$(ECHO) PPUMove... $(PPUMOVE)

View File

@ -2586,7 +2586,9 @@ begin
DirTempl.AddChild(TDefineTemplate.Create('LCL path addition',
Format(ctsAddsDirToSourcePath,['lcl']),
ExternalMacroStart+'SrcPath',
'..'+ds+'lcl;..'+ds+'lcl'+ds+'interfaces'+ds+WidgetType+';'+SrcPath
'..'+ds+'lcl;..'+ds+'lcl'+ds+'interfaces'+ds+WidgetType
+';..'+ds+'components'+ds+'codetools'
+';'+SrcPath
,da_Define));
MainDir.AddChild(DirTempl);

View File

@ -1,14 +1,346 @@
#: codetoolsstrconsts:ctsothercompilerdefines
msgid "%s Compiler Defines"
msgstr ""
#: codetoolsstrconsts:ctsnameddirectory
msgid "%s Directory"
msgstr ""
#: codetoolsstrconsts:ctsstrexpectedbutatomfound
msgid "%s expected, but %s found"
msgstr ""
#: codetoolsstrconsts:ctsfilehascircularsymlink
msgid "%s has a circular symbolic link"
msgstr ""
#: codetoolsstrconsts:ctsfileisnotexecutable
msgid "%s is not executable"
msgstr ""
#: codetoolsstrconsts:ctsnamedproject
msgid "%s Project"
msgstr ""
#: codetoolsstrconsts:ctsawithoutb
msgid "%s without %s"
msgstr ""
#: codetoolsstrconsts:ctsunknownmainfilename
msgid "(unknown mainfilename)"
msgstr ""
#: codetoolsstrconsts:ctsunknownsubdescriptor
msgid "(unknown subdescriptor %s)"
msgstr "(unbekannter subdescriptor %s)"
#: codetoolsstrconsts:ctspointhintprocstartat
msgid ". Hint: proc start at "
msgstr ""
#: codetoolsstrconsts:ctspointstartat
msgid ". start at "
msgstr ""
#: codetoolsstrconsts:ctssemicolonafterpropspecmissing
msgid "; expected after \"%s\" property specifier, but %s found"
msgstr ""
#: codetoolsstrconsts:ctswordnotfound
msgid "\"%s\" not found"
msgstr ""
#: codetoolsstrconsts:ctsendforclassnotfound
msgid "\"end\" for class/object not found"
msgstr ""
#: codetoolsstrconsts:ctsdircomponentdoesnotexistsorisdanglingsymlink
msgid "a directory component in %s does not exist or is a dangling symlink"
msgstr ""
#: codetoolsstrconsts:ctsdircomponentisnotdir
msgid "a directory component in %s is not a directory"
msgstr ""
#: codetoolsstrconsts:ctsaddsdirtosourcepath
msgid "adds %s to SrcPath"
msgstr ""
#: codetoolsstrconsts:ctsanlclproject
msgid "an LCL project"
msgstr ""
#: codetoolsstrconsts:ctsancestorisnotproperty
msgid "ancestor of untyped property is not a property"
msgstr ""
#: codetoolsstrconsts:ctsanoymdefinitionsarenotallowed
msgid "Anonym %s definitions are not allowed"
msgstr ""
#: codetoolsstrconsts:ctsbasetypeofnotfound
msgid "base type of \"%s\" not found"
msgstr ""
#: codetoolsstrconsts:ctsbinaryoperator
msgid "binary operator"
msgstr ""
#: codetoolsstrconsts:ctsbracketnotfound
msgid "bracket %s not found"
msgstr ""
#: codetoolsstrconsts:ctsbracketcloseexpectedbutatomfound
msgid "bracket close expected, but %s found"
msgstr ""
#: codetoolsstrconsts:ctsbracketopenexpectedbutatomfound
msgid "bracket open expected, but %s found"
msgstr ""
#: codetoolsstrconsts:ctscircleindefinitions
msgid "circle in definitions"
msgstr ""
#: codetoolsstrconsts:ctsclassidentifierexpected
msgid "class identifier expected"
msgstr ""
#: codetoolsstrconsts:ctsclassnodewithoutparentnode
msgid "class node without parent node"
msgstr ""
#: codetoolsstrconsts:ctsclasswithoutname
msgid "class without name"
msgstr ""
#: codetoolsstrconsts:ctscommentendnotfound
msgid "Comment end not found"
msgstr ""
#: codetoolsstrconsts:ctscompiler
msgid "Compiler"
msgstr ""
#: codetoolsstrconsts:ctscomponentsdirectory
msgid "Components Directory"
msgstr ""
#: codetoolsstrconsts:ctsconstant
msgid "constant"
msgstr ""
#: codetoolsstrconsts:ctscursorposoutsideofcode
msgid "cursor pos outside of code"
msgstr ""
#: codetoolsstrconsts:ctscustomcomponentsdirectory
msgid "Custom Components Directory"
msgstr ""
#: codetoolsstrconsts:ctsdebuggerdirectory
msgid "Debugger Directory"
msgstr ""
#: codetoolsstrconsts:ctsdefaultclassancestortobjectnotfound
msgid "default class ancestor TObject not found"
msgstr ""
#: codetoolsstrconsts:ctsdefaultinterfaceancestoriinterfacenotfound
msgid "default interface ancestor IInterface not found"
msgstr ""
#: codetoolsstrconsts:ctsdefaultparameterexpectedbutatomfound
msgid "default parameter expected, but %s found"
msgstr ""
#: codetoolsstrconsts:ctsdefaultppc386sourceoperatingsystem
msgid "Default ppc386 source Operating System"
msgstr ""
#: codetoolsstrconsts:ctsdefaultppc386symbol
msgid "Default ppc386 symbol"
msgstr ""
#: codetoolsstrconsts:ctsdefaultppc386targetoperatingsystem
msgid "Default ppc386 target Operating System"
msgstr ""
#: codetoolsstrconsts:ctsdefaultppc386targetprocessor
msgid "Default ppc386 target processor"
msgstr ""
#: codetoolsstrconsts:ctsdefaultpropertynotfound
msgid "default property not found"
msgstr ""
#: codetoolsstrconsts:ctsdefaultspecifierredefined
msgid "default specifier redefined"
msgstr ""
#: codetoolsstrconsts:ctsdefinemacroname
msgid "Define Macro %s"
msgstr ""
#: codetoolsstrconsts:ctsdefinemacrogtk2
msgid "Define macro gtk2"
msgstr ""
#: codetoolsstrconsts:ctsdefsforlazarussources
msgid "Definitions for the Lazarus Sources"
msgstr ""
#: codetoolsstrconsts:ctsdesignerdirectory
msgid "Designer Directory"
msgstr ""
#: codetoolsstrconsts:ctsduplicateidentifier
msgid "duplicate identifier: %s"
msgstr ""
#: codetoolsstrconsts:ctsendforrecordnotfound
msgid "end for record not found"
msgstr ""
#: codetoolsstrconsts:ctsendofsourcenotfound
msgid "End of source not found"
msgstr ""
#: codetoolsstrconsts:ctserrorduringcreationofnewprocbodies
msgid "error during creation of new proc bodies"
msgstr ""
#: codetoolsstrconsts:ctserrorduringinsertingnewclassparts
msgid "error during inserting new class parts"
msgstr ""
#: codetoolsstrconsts:ctserrorindirectiveexpression
msgid "error in directive expression"
msgstr ""
#: codetoolsstrconsts:ctserrorinparamlist
msgid "error in paramlist"
msgstr ""
#: codetoolsstrconsts:ctsexecuteaccessdeniedforfile
msgid "execute access denied for %s"
msgstr ""
#: codetoolsstrconsts:ctsexprtypemustbeclassorrecord
msgid "expression type must be class or record type"
msgstr ""
#: codetoolsstrconsts:ctsfiledoesnotexists
msgid "file \"%s\" does not exist"
msgstr ""
#: codetoolsstrconsts:ctsforward
msgid "Forward"
msgstr "Forward"
#: codetoolsstrconsts:ctsunparsed
msgid "Unparsed"
msgstr "Unparsed"
#: codetoolsstrconsts:ctsforwardclassdefinitionnotresolved
msgid "Forward class definition not resolved: %s"
msgstr ""
#: codetoolsstrconsts:ctsfreepascalcompilerinitialmacros
msgid "Free Pascal Compiler initial macros"
msgstr ""
#: codetoolsstrconsts:ctsfreepascalcomponentlibrary
msgid "Free Pascal Component Library"
msgstr ""
#: codetoolsstrconsts:ctsfreepascalsourcedir
msgid "Free Pascal Source Directory"
msgstr ""
#: codetoolsstrconsts:ctsfreepascalsourcesplusdesc
msgid "Free Pascal Sources, %s"
msgstr ""
#: codetoolsstrconsts:ctsgnomeintfdirectory
msgid "gnome interface directory"
msgstr ""
#: codetoolsstrconsts:ctsgtkintfdirectory
msgid "gtk interface directory"
msgstr ""
#: codetoolsstrconsts:ctsgtk2intfdirectory
msgid "gtk2 interface directory"
msgstr ""
#: codetoolsstrconsts:ctsidentifier
msgid "identifier"
msgstr ""
#: codetoolsstrconsts:ctsidentifieralreadydefined
msgid "Identifier %s already defined"
msgstr ""
#: codetoolsstrconsts:ctsidentexpectedbutatomfound
msgid "identifier expected, but %s found"
msgstr ""
#: codetoolsstrconsts:ctsidentexpectedbutkeywordfound
msgid "identifier expected, but keyword %s found"
msgstr ""
#: codetoolsstrconsts:ctsidentifiernotfound
msgid "identifier not found: %s"
msgstr ""
#: codetoolsstrconsts:ctsiflclwidgettypeequalsgtk2
msgid "If LCLWidgetType=gtk2 then"
msgstr ""
#: codetoolsstrconsts:ctsillegalcircleinusedunits
msgid "illegal circle using unit: %s"
msgstr ""
#: codetoolsstrconsts:ctsillegalqualifier
msgid "illegal qualifier %s found"
msgstr ""
#: codetoolsstrconsts:ctsimplementationnodenotfound
msgid "implementation node not found"
msgstr ""
#: codetoolsstrconsts:ctsincludecircledetected
msgid "Include circle detected"
msgstr ""
#: codetoolsstrconsts:ctsincludedirectoriesplusdirs
msgid "include directories: %s"
msgstr ""
#: codetoolsstrconsts:ctsincludefilenotfound
msgid "include file not found \"%s\""
msgstr ""
#: codetoolsstrconsts:ctsincompatibletypesgotexpected
msgid "incompatibles types: expected \"%s\" but got \"%s\""
msgstr ""
#: codetoolsstrconsts:ctsindexparameterexpectedbutatomfound
msgid "index parameter expected, but %s found"
msgstr ""
#: codetoolsstrconsts:ctsindexspecifierredefined
msgid "index specifier redefined"
msgstr ""
#: codetoolsstrconsts:ctsinheritedkeywordonlyallowedinmethods
msgid "inherited keyword only allowed in methods"
msgstr ""
#: codetoolsstrconsts:ctsinsufficientmemory
msgid "insufficient memory"
msgstr ""
#: codetoolsstrconsts:ctsinterfacesectionnotfound
msgid "interface section not found"
msgstr ""
#: codetoolsstrconsts:ctsinvalidflagvaluefordirective
msgid "invalid flag value \"%s\" for directive %s"
@ -18,4 +350,227 @@ msgstr "ungueltiges Flag \"%s\" bei Directive %s"
msgid "invalid mode \"%s\""
msgstr "ungueltiger Mode \"%s\""
#: codetoolsstrconsts:ctsinvalidsubrange
msgid "invalid subrange"
msgstr ""
#: codetoolsstrconsts:ctsinvalidtype
msgid "invalid type"
msgstr ""
#: codetoolsstrconsts:ctskeyword
msgid "keyword"
msgstr ""
#: codetoolsstrconsts:ctskeywordexampleexpectedbutatomfound
msgid "keyword (e.g. %s) expected, but %s found"
msgstr ""
#: codetoolsstrconsts:ctskeywordin
msgid "keyword \"in\""
msgstr ""
#: codetoolsstrconsts:ctslazarusmaindirectory
msgid "lazarus main directory"
msgstr ""
#: codetoolsstrconsts:ctslazarussources
msgid "Lazarus Sources"
msgstr ""
#: codetoolsstrconsts:ctsmethodname
msgid "method name"
msgstr ""
#: codetoolsstrconsts:ctsmethodtypedefinitionnotfound
msgid "method type definition not found"
msgstr ""
#: codetoolsstrconsts:ctsmissingpointafterend
msgid "missing . after end"
msgstr ""
#: codetoolsstrconsts:ctsmissingenumlist
msgid "missing enum list"
msgstr ""
#: codetoolsstrconsts:ctsmissingtypeidentifier
msgid "missing type identifier"
msgstr ""
#: codetoolsstrconsts:ctsnestedcommentson
msgid "Nested Comments On"
msgstr ""
#: codetoolsstrconsts:ctsnewprocbodynotfound
msgid "new proc body not found"
msgstr ""
#: codetoolsstrconsts:ctsnocontextnodefoundatcursor
msgid "no context node found at cursor"
msgstr ""
#: codetoolsstrconsts:ctsnopascalcodefound
msgid "no pascal code found (first token is %s)"
msgstr ""
#: codetoolsstrconsts:ctsnonodefoundatcursor
msgid "no pascal node found at cursor (i.e. in unparsed code)"
msgstr ""
#: codetoolsstrconsts:ctsnoscanneravailable
msgid "No scanner available"
msgstr ""
#: codetoolsstrconsts:ctsnoscannerfound
msgid "No scanner found for \"%s\". If this is an include file, please open the main source first."
msgstr ""
#: codetoolsstrconsts:ctsnodefaultspecifierdefinedtwice
msgid "nodefault specifier defined twice"
msgstr ""
#: codetoolsstrconsts:ctsoldmethodnotfound
msgid "old method not found: %s"
msgstr ""
#: codetoolsstrconsts:ctspackagedirectories
msgid "Package directories"
msgstr ""
#: codetoolsstrconsts:ctsprocedureorfunction
msgid "procedure or function"
msgstr ""
#: codetoolsstrconsts:ctsprocessorspecific
msgid "processor specific"
msgstr ""
#: codetoolsstrconsts:ctspropertyspecifieralreadydefined
msgid "property specifier already defined: %s"
msgstr ""
#: codetoolsstrconsts:ctsproperttypeexpectedbutatomfound
msgid "property type expected, but %s found"
msgstr ""
#: codetoolsstrconsts:ctsqualifierexpectedbutatomfound
msgid "qualifier expected but %s found"
msgstr ""
#: codetoolsstrconsts:ctsresetalldefines
msgid "Reset all defines"
msgstr ""
#: codetoolsstrconsts:ctsruntimelibrary
msgid "Runtime library"
msgstr ""
#: codetoolsstrconsts:ctssemicolonnotfound
msgid "semicolon not found"
msgstr ""
#: codetoolsstrconsts:ctssetsincpathto
msgid "sets IncPath to %s"
msgstr ""
#: codetoolsstrconsts:ctssetssrcpathto
msgid "sets SrcPath to %s"
msgstr ""
#: codetoolsstrconsts:ctssourcefilenamesforstandardfpcunits
msgid "Source filenames for the standard fpc units"
msgstr ""
#: codetoolsstrconsts:ctssourceisnotunit
msgid "source is not unit"
msgstr ""
#: codetoolsstrconsts:ctssrcpathinitialization
msgid "SrcPath Initialization"
msgstr ""
#: codetoolsstrconsts:ctsstringconstant
msgid "string constant"
msgstr ""
#: codetoolsstrconsts:ctssyntaxerrorinexpr
msgid "Syntax Error in expression \"%s\""
msgstr ""
#: codetoolsstrconsts:ctstermnotsimple
msgid "Term has no simple type"
msgstr ""
#: codetoolsstrconsts:ctstoolsdirectory
msgid "Tools Directory"
msgstr ""
#: codetoolsstrconsts:ctstypeidentifier
msgid "type identifier"
msgstr ""
#: codetoolsstrconsts:ctstypesectionofclassnotfound
msgid "type section of class not found"
msgstr ""
#: codetoolsstrconsts:ctsunabletoapplychanges
msgid "unable to apply changes"
msgstr ""
#: codetoolsstrconsts:ctsunabletocompleteproperty
msgid "unable to complete property"
msgstr ""
#: codetoolsstrconsts:ctsidentexpectedbuteoffound
msgid "unexpected end of file (identifier expected)"
msgstr ""
#: codetoolsstrconsts:ctsunexpectedendofsource
msgid "unexpected end of source"
msgstr ""
#: codetoolsstrconsts:ctsunexpectedkeyword
msgid "unexpected keyword \"%s\""
msgstr ""
#: codetoolsstrconsts:ctsunexpectedkeywordwhilereadingbackwards
msgid "unexpected keyword \"%s\" found while reading blocks backwards"
msgstr ""
#: codetoolsstrconsts:ctsunexpectedkeywordinasmblock
msgid "unexpected keyword \"%s\" in asm block found"
msgstr ""
#: codetoolsstrconsts:ctsunexpectedsubrangeoperatorfound
msgid "unexpected subrange operator '..' found"
msgstr ""
#: codetoolsstrconsts:ctsunitnotfound
msgid "unit not found: %s"
msgstr ""
#: codetoolsstrconsts:ctsunknownfunction
msgid "Unknown function %s"
msgstr ""
#: codetoolsstrconsts:ctsunknownsectionkeyword
msgid "unknown section keyword %s found"
msgstr ""
#: codetoolsstrconsts:ctsunparsed
msgid "Unparsed"
msgstr "Unparsed"
#: codetoolsstrconsts:ctsusedunitisnotapascalunit
msgid "used unit is not a pascal unit"
msgstr ""
#: codetoolsstrconsts:ctsutilsdirectories
msgid "Utils directories"
msgstr ""
#: codetoolsstrconsts:ctswidgetdirectory
msgid "Widget Directory"
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -209,7 +209,7 @@ endif
endif
export LCL_PLATFORM
override TARGET_UNITS+=allunits
override TARGET_IMPLICITUNITS+=syntextdrawer syneditkeycmds synedittypes syneditstrconst syneditsearch syneditmiscprocs syneditmiscclasses synedittextbuffer synedit synedithighlighter synhighlightermulti synregexpr synexporthtml syneditexport synmemo synmacrorecorder syneditplugins syneditregexsearch synhighlighterposition
override TARGET_IMPLICITUNITS+=syntextdrawer syneditkeycmds synedittypes syneditstrconst syneditsearch syneditmiscprocs syneditmiscclasses synedittextbuffer synedit synedithighlighter synhighlightermulti synregexpr synexporthtml syneditexport synmemo synmacrorecorder syneditplugins syneditregexsearch synhighlighterposition synhighlighterjava
override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
override COMPILER_OPTIONS+=-gl
override COMPILER_UNITDIR+=../../lcl/units/$(LCL_PLATFORM) ../../lcl/units .

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,3 @@
#: objinspstrconsts:oisobjectinspector
msgid "Object Inspector"
msgstr "Object Inspector"
#: objinspstrconsts:oisitemsselected
msgid " items selected"
msgstr " selektiert"
@ -14,11 +10,15 @@ msgstr "Hinzufuegen"
msgid "&Delete"
msgstr "Loeschen"
#: objinspstrconsts:oisproperties
msgid "Properties"
msgstr "Properties"
#: objinspstrconsts:oisevents
msgid "Events"
msgstr "Events"
#: objinspstrconsts:oisobjectinspector
msgid "Object Inspector"
msgstr "Object Inspector"
#: objinspstrconsts:oisproperties
msgid "Properties"
msgstr "Properties"

View File

@ -1,17 +1,3 @@
msgid ""
msgstr ""
""
"Last-Translator: Luis R. Hilario B. <luisdigital@BonBon.net>\n"
"PO-Revision-Date: 2002-12-29 20:40-0400\n"
"Language-Team: Español\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 0.9.6\n"
#: objinspstrconsts:oisobjectinspector
msgid "Object Inspector"
msgstr "Inspector de Objetos"
#: objinspstrconsts:oisitemsselected
msgid " items selected"
msgstr " elementos seleccionados"
@ -24,12 +10,15 @@ msgstr "&A
msgid "&Delete"
msgstr "&Suprimir"
#: objinspstrconsts:oisproperties
msgid "Properties"
msgstr "Propiedades"
#: objinspstrconsts:oisevents
msgid "Events"
msgstr "Eventos"
#: objinspstrconsts:oisobjectinspector
msgid "Object Inspector"
msgstr "Inspector de Objetos"
#: objinspstrconsts:oisproperties
msgid "Properties"
msgstr "Propiedades"

View File

@ -1,17 +1,3 @@
msgid ""
msgstr ""
""
"Last-Translator: \n"
"PO-Revision-Date: 2003-01-09 01:15+0100\n"
"Language-Team: <fr@li.org>\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 0.9.6\n"
#: objinspstrconsts:oisobjectinspector
msgid "Object Inspector"
msgstr "Inspecteur d'objet"
#: objinspstrconsts:oisitemsselected
msgid " items selected"
msgstr "Sélection"
@ -24,11 +10,15 @@ msgstr "&Ajouter"
msgid "&Delete"
msgstr "&Supprimer"
#: objinspstrconsts:oisproperties
msgid "Properties"
msgstr "Propriétés"
#: objinspstrconsts:oisevents
msgid "Events"
msgstr "Evénements"
#: objinspstrconsts:oisobjectinspector
msgid "Object Inspector"
msgstr "Inspecteur d'objet"
#: objinspstrconsts:oisproperties
msgid "Properties"
msgstr "Propriétés"

View File

@ -44,6 +44,7 @@ uses
Classes, SysUtils;
// file attributes and states
function CompareFilenames(const Filename1, Filename2: string): integer;
function FilenameIsAbsolute(TheFilename: string):boolean;
procedure CheckIfFileIsExecutable(const AFilename: string);
procedure CheckIfFileIsSymlink(const AFilename: string);
@ -109,6 +110,9 @@ end.
{
$Log$
Revision 1.10 2003/01/17 16:28:42 mattias
updated translation files
Revision 1.9 2002/12/23 13:20:46 mattias
fixed backuping symlinks

View File

@ -33,6 +33,18 @@ begin
Result := dirExist;
end;
{------------------------------------------------------------------------------
function CompareFilenames(const Filename1, Filename2: string): integer;
------------------------------------------------------------------------------}
function CompareFilenames(const Filename1, Filename2: string): integer;
begin
{$IFDEF WIN32}
Result:=AnsiCompareText(Filename1, Filename2);
{$ELSE}
Result:=AnsiCompareStr(Filename1, Filename2);
{$ENDIF}
end;
{------------------------------------------------------------------------------
function FilenameIsAbsolute(TheFilename: string):boolean;
------------------------------------------------------------------------------}
@ -710,6 +722,9 @@ end;
{
$Log$
Revision 1.10 2003/01/17 16:28:42 mattias
updated translation files
Revision 1.9 2002/12/27 08:46:32 mattias
changes for fpc 1.1

View File

@ -1,58 +1,46 @@
#: lclstrconsts:rsmbyes
msgid "Yes"
msgstr "Ja"
#: lclstrconsts:rsmball
msgid "&All"
msgstr ""
#: lclstrconsts:rsmbclose
msgid "&Close"
msgstr ""
#: lclstrconsts:rsmbhelp
msgid "&Help"
msgstr ""
#: lclstrconsts:rsmbignore
msgid "&Ignore"
msgstr ""
#: lclstrconsts:rsmbno
msgid "No"
msgstr "Nein"
msgid "&No"
msgstr ""
#: lclstrconsts:rsmbok
msgid "OK"
msgstr "OK"
msgid "&OK"
msgstr ""
#: lclstrconsts:rsmbcancel
msgid "Cancel"
msgstr "Stop"
#: lclstrconsts:rsmbretry
msgid "&Retry"
msgstr ""
#: lclstrconsts:rsmbyes
msgid "&Yes"
msgstr ""
#: lclstrconsts:rsmbabort
msgid "Abort"
msgstr "Abbruch"
#: lclstrconsts:rsmbretry
msgid "Retry"
msgstr "Wiederholen"
#: lclstrconsts:rsmbignore
msgid "Ignore"
msgstr "Ignorieren"
#: lclstrconsts:rsmball
msgid "All?"
msgstr "All?"
#: lclstrconsts:rsmbnotoall
msgid "No to all"
msgstr "Immer Nein"
#: lclstrconsts:rsmbyestoall
msgid "Yes to all"
msgstr "Immer Ja"
#: lclstrconsts:rsmbhelp
msgid "Help"
msgstr "Hilfe"
#: lclstrconsts:rsmtwarning
msgid "Warning"
msgstr "Warnung"
#: lclstrconsts:rsmterror
msgid "Error"
msgstr "Fehler"
#: lclstrconsts:rsmtinformation
msgid "Information"
msgstr "Information"
#: lclstrconsts:rsmbcancel
msgid "Cancel"
msgstr "Stop"
#: lclstrconsts:rsmtconfirmation
msgid "Confirmation"
@ -62,3 +50,47 @@ msgstr "Bestaetigung"
msgid "Custom"
msgstr "Spezial"
#: lclstrconsts:rsmterror
msgid "Error"
msgstr "Fehler"
#: lclstrconsts:rsmbhelp
msgid "Help"
msgstr "Hilfe"
#: lclstrconsts:rsmbignore
msgid "Ignore"
msgstr "Ignorieren"
#: lclstrconsts:rsmtinformation
msgid "Information"
msgstr "Information"
#: lclstrconsts:rsmbno
msgid "No"
msgstr "Nein"
#: lclstrconsts:rsmbnotoall
msgid "No to all"
msgstr "Immer Nein"
#: lclstrconsts:rsmbok
msgid "OK"
msgstr "OK"
#: lclstrconsts:rsmbretry
msgid "Retry"
msgstr "Wiederholen"
#: lclstrconsts:rsmtwarning
msgid "Warning"
msgstr "Warnung"
#: lclstrconsts:rsmbyes
msgid "Yes"
msgstr "Ja"
#: lclstrconsts:rsmbyestoall
msgid "Yes to all"
msgstr "Immer Ja"

View File

@ -1,68 +1,46 @@
msgid ""
#: lclstrconsts:rsmball
msgid "&All"
msgstr ""
""
"Last-Translator: Luis R. Hilario B. <luisdigital@BonBon.net>\n"
"PO-Revision-Date: 2002-12-22 20:15-0400\n"
"Language-Team: Español\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 0.9.6\n"
#: lclstrconsts:rsmbyes
msgid "Yes"
msgstr "Sí"
#: lclstrconsts:rsmbclose
msgid "&Close"
msgstr ""
#: lclstrconsts:rsmbhelp
msgid "&Help"
msgstr ""
#: lclstrconsts:rsmbignore
msgid "&Ignore"
msgstr ""
#: lclstrconsts:rsmbno
msgid "No"
msgstr "No"
msgid "&No"
msgstr ""
#: lclstrconsts:rsmbok
msgid "OK"
msgstr "Aceptar"
msgid "&OK"
msgstr ""
#: lclstrconsts:rsmbcancel
msgid "Cancel"
msgstr "Cancelar"
#: lclstrconsts:rsmbretry
msgid "&Retry"
msgstr ""
#: lclstrconsts:rsmbyes
msgid "&Yes"
msgstr ""
#: lclstrconsts:rsmbabort
msgid "Abort"
msgstr "Abortar"
#: lclstrconsts:rsmbretry
msgid "Retry"
msgstr "Reintentar"
#: lclstrconsts:rsmbignore
msgid "Ignore"
msgstr "Ignorar"
#: lclstrconsts:rsmball
msgid "All?"
msgstr "¿Todo?"
#: lclstrconsts:rsmbnotoall
msgid "No to all"
msgstr "No a todo"
#: lclstrconsts:rsmbyestoall
msgid "Yes to all"
msgstr "Sí a todo"
#: lclstrconsts:rsmbhelp
msgid "Help"
msgstr "Ayuda"
#: lclstrconsts:rsmtwarning
msgid "Warning"
msgstr "Advertencia"
#: lclstrconsts:rsmterror
msgid "Error"
msgstr "Error"
#: lclstrconsts:rsmtinformation
msgid "Information"
msgstr "Información"
#: lclstrconsts:rsmbcancel
msgid "Cancel"
msgstr "Cancelar"
#: lclstrconsts:rsmtconfirmation
msgid "Confirmation"
@ -72,5 +50,56 @@ msgstr "Confirmaci
msgid "Custom"
msgstr "Personalizar"
#: lclstrconsts:rsmterror
msgid "Error"
msgstr "Error"
#: lclstrconsts:rsmbhelp
msgid "Help"
msgstr "Ayuda"
#: lclstrconsts:rsmbignore
msgid "Ignore"
msgstr "Ignorar"
#: lclstrconsts:rsmtinformation
msgid "Information"
msgstr "Información"
#: lclstrconsts:rsmbno
msgid "No"
msgstr "No"
#: lclstrconsts:rsmbnotoall
msgid "No to all"
msgstr "No a todo"
#: lclstrconsts:rsmbok
msgid "OK"
msgstr "Aceptar"
#: lclstrconsts:rsmbretry
msgid "Retry"
msgstr "Reintentar"
#: lclstrconsts:rsmtwarning
msgid "Warning"
msgstr "Advertencia"
msgid ""
msgstr ""
""
"Last-Translator: Luis R. Hilario B. <luisdigital@BonBon.net>\n"
"PO-Revision-Date: 2002-12-22 20:15-0400\n"
"Language-Team: Español\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 0.9.6\n"
#: lclstrconsts:rsmbyes
msgid "Yes"
msgstr "Sí"
#: lclstrconsts:rsmbyestoall
msgid "Yes to all"
msgstr "Sí a todo"

View File

@ -1,68 +1,46 @@
msgid ""
#: lclstrconsts:rsmball
msgid "&All"
msgstr ""
""
"Last-Translator: Olivier GUILBAUD (golivier@free.fr)\n"
"PO-Revision-Date: 2003-01-09 01:15+0100\n"
"Language-Team: <fr@li.org>\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 0.9.6\n"
#: lclstrconsts:rsmbyes
msgid "Yes"
msgstr "Oui"
#: lclstrconsts:rsmbclose
msgid "&Close"
msgstr ""
#: lclstrconsts:rsmbhelp
msgid "&Help"
msgstr ""
#: lclstrconsts:rsmbignore
msgid "&Ignore"
msgstr ""
#: lclstrconsts:rsmbno
msgid "No"
msgstr "Non"
msgid "&No"
msgstr ""
#: lclstrconsts:rsmbok
msgid "OK"
msgstr "Ok"
msgid "&OK"
msgstr ""
#: lclstrconsts:rsmbcancel
msgid "Cancel"
msgstr "Annuler"
#: lclstrconsts:rsmbretry
msgid "&Retry"
msgstr ""
#: lclstrconsts:rsmbyes
msgid "&Yes"
msgstr ""
#: lclstrconsts:rsmbabort
msgid "Abort"
msgstr "Abandonner"
#: lclstrconsts:rsmbretry
msgid "Retry"
msgstr "Réessayer"
#: lclstrconsts:rsmbignore
msgid "Ignore"
msgstr "Ignorer"
#: lclstrconsts:rsmball
msgid "All?"
msgstr "Tout"
#: lclstrconsts:rsmbnotoall
msgid "No to all"
msgstr "Non pour tout"
#: lclstrconsts:rsmbyestoall
msgid "Yes to all"
msgstr "Oui pour tout"
#: lclstrconsts:rsmbhelp
msgid "Help"
msgstr "Aide"
#: lclstrconsts:rsmtwarning
msgid "Warning"
msgstr "Avertissement"
#: lclstrconsts:rsmterror
msgid "Error"
msgstr "Erreur"
#: lclstrconsts:rsmtinformation
msgid "Information"
msgstr "Information"
#: lclstrconsts:rsmbcancel
msgid "Cancel"
msgstr "Annuler"
#: lclstrconsts:rsmtconfirmation
msgid "Confirmation"
@ -72,3 +50,56 @@ msgstr "Confirmation"
msgid "Custom"
msgstr "Personalisé"
#: lclstrconsts:rsmterror
msgid "Error"
msgstr "Erreur"
#: lclstrconsts:rsmbhelp
msgid "Help"
msgstr "Aide"
#: lclstrconsts:rsmbignore
msgid "Ignore"
msgstr "Ignorer"
#: lclstrconsts:rsmtinformation
msgid "Information"
msgstr "Information"
#: lclstrconsts:rsmbno
msgid "No"
msgstr "Non"
#: lclstrconsts:rsmbnotoall
msgid "No to all"
msgstr "Non pour tout"
#: lclstrconsts:rsmbok
msgid "OK"
msgstr "Ok"
#: lclstrconsts:rsmbretry
msgid "Retry"
msgstr "Réessayer"
#: lclstrconsts:rsmtwarning
msgid "Warning"
msgstr "Avertissement"
msgid ""
msgstr ""
""
"Last-Translator: Olivier GUILBAUD (golivier@free.fr)\n"
"PO-Revision-Date: 2003-01-09 01:15+0100\n"
"Language-Team: <fr@li.org>\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 0.9.6\n"
#: lclstrconsts:rsmbyes
msgid "Yes"
msgstr "Oui"
#: lclstrconsts:rsmbyestoall
msgid "Yes to all"
msgstr "Oui pour tout"

View File

@ -1,17 +1,29 @@
#!/bin/bash
# This script may be used to compile all language.
#
# Usage: sh localize.sh
#
# This script should be executed after adding new resource strings and after
# udating the translated .po files.
#
# This script
# - converts all compiled .rst files to .po files,
# - updates all translated xx.po files
# - converts all translated .po files into .mo files
#
set -x
#set -e
# IDE without objectinspector
rstconv -i lazarusidestrconsts.rst -o languages/lazaruside.po
./tools/updatepofiles languages/lazaruside.po
for lang in de ru es fr; do
msgfmt languages/lazaruside.$lang.po -o languages/lazaruside.$lang.mo
done
# objectinspector
rstconv -i objinspstrconsts.rst -o languages/objinspstrconsts.po
tools/updatepofiles languages/objinspstrconsts.po
for lang in de es fr; do
msgfmt languages/objinspstrconsts.$lang.po \
-o languages/objinspstrconsts.$lang.mo
@ -20,6 +32,7 @@ done
# CodeTools
rstconv -i components/units/codetoolsstrconsts.rst \
-o components/codetools/languages/codetools.po
./tools/updatepofiles components/codetools/languages/codetools.po
for lang in de fr; do
msgfmt components/codetools/languages/codetools.$lang.po \
-o components/codetools/languages/codetools.$lang.mo
@ -27,6 +40,7 @@ done
# LCL
rstconv -i lcl/units/lclstrconsts.rst -o lcl/languages/lcl.po
./tools/updatepofiles lcl/languages/lcl.po
for lang in de es fr; do
msgfmt lcl/languages/lcl.$lang.po -o lcl/languages/lcl.$lang.mo
done

View File

@ -201,10 +201,18 @@ PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/ext
override PACKAGE_NAME=lazarus-tools
override PACKAGE_VERSION=0.8a
LAZDIR=..
ifndef LCL_PLATFORM
ifeq ($(OS_TARGET),win32)
LCL_PLATFORM=win32
else
LCL_PLATFORM=gtk
endif
endif
export LCL_PLATFORM
override TARGET_DIRS+=apiwizz
override TARGET_PROGRAMS+=lazres
override COMPILER_OPTIONS+=-gl
override COMPILER_UNITDIR+=. $(LAZDIR)/lcl/units $(LAZDIR)/components/units $(LAZDIR)/lcl/units/$(LCLPLATFORM)
override COMPILER_UNITDIR+=. $(LAZDIR)/lcl/units $(LAZDIR)/components/units $(LAZDIR)/lcl/units/$(LCL_PLATFORM)/
override COMPILER_TARGETDIR+=.
ifdef REQUIRE_UNITSDIR
override UNITSDIR+=$(REQUIRE_UNITSDIR)
@ -1533,6 +1541,7 @@ endif
.PHONY: all makefile makefiles
all: apiwizz_all
$(MAKE) --assume-new=lazres.pp lazres$(EXEEXT)
$(MAKE) --assume-new=updatepofiles.pas updatepofiles$(EXEEXT)
makefile: Makefile.fpc
-$(FPCMAKE) -w
makefiles: makefile

View File

@ -16,18 +16,31 @@ packages=rtl fcl
[compiler]
options=-gl
unitdir=. $(LAZDIR)/lcl/units $(LAZDIR)/components/units $(LAZDIR)/lcl/units/$(LCLPLATFORM)
unitdir=. $(LAZDIR)/lcl/units $(LAZDIR)/components/units \
$(LAZDIR)/lcl/units/$(LCL_PLATFORM)/
targetdir=.
[prerules]
LAZDIR=..
[prerules]
# LCL Platform
ifndef LCL_PLATFORM
ifeq ($(OS_TARGET),win32)
LCL_PLATFORM=win32
else
LCL_PLATFORM=gtk
endif
endif
export LCL_PLATFORM
[rules]
.PHONY: all makefile makefiles
all: apiwizz_all
$(MAKE) --assume-new=lazres.pp lazres$(EXEEXT)
$(MAKE) --assume-new=updatepofiles.pas updatepofiles$(EXEEXT)
makefile: Makefile.fpc
-$(FPCMAKE) -w

View File

@ -1,8 +1,8 @@
#
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/04/23]
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/09/21]
#
default: all
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx
override PATH:=$(subst \,/,$(PATH))
ifeq ($(findstring ;,$(PATH)),)
inUnix=1
@ -42,6 +42,9 @@ endif
ifeq ($(OS_TARGET),netbsd)
BSDhier=1
endif
ifeq ($(OS_TARGET),openbsd)
BSDhier=1
endif
ifdef inUnix
BATCHEXT=.sh
else
@ -198,9 +201,17 @@ PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/ext
override PACKAGE_NAME=lazarus-apiwizz
override PACKAGE_VERSION=0.7a
LAZDIR=../..
ifndef LCL_PLATFORM
ifeq ($(OS_TARGET),win32)
LCL_PLATFORM=win32
else
LCL_PLATFORM=gtk
endif
endif
export LCL_PLATFORM
override TARGET_PROGRAMS+=apiwizz
override COMPILER_OPTIONS+=-gl
override COMPILER_UNITDIR+=. $(LAZDIR)/lcl/units $(LAZDIR)/components/units $(LAZDIR)/lcl/units/$(LCLPLATFORM)
override COMPILER_UNITDIR+=. $(LAZDIR)/lcl/units $(LAZDIR)/components/units $(LAZDIR)/lcl/units/$(LCL_PLATFORM)
override COMPILER_TARGETDIR+=.
ifdef REQUIRE_UNITSDIR
override UNITSDIR+=$(REQUIRE_UNITSDIR)
@ -218,9 +229,15 @@ endif
ifeq ($(OS_TARGET),netbsd)
UNIXINSTALLDIR=1
endif
ifeq ($(OS_TARGET),openbsd)
UNIXINSTALLDIR=1
endif
ifeq ($(OS_TARGET),sunos)
UNIXINSTALLDIR=1
endif
ifeq ($(OS_TARGET),qnx)
UNIXINSTALLDIR=1
endif
else
ifeq ($(OS_SOURCE),linux)
UNIXINSTALLDIR=1
@ -231,9 +248,15 @@ endif
ifeq ($(OS_SOURCE),netbsd)
UNIXINSTALLDIR=1
endif
ifeq ($(OS_SOURCE),openbsd)
UNIXINSTALLDIR=1
endif
ifeq ($(OS_TARGET),sunos)
UNIXINSTALLDIR=1
endif
ifeq ($(OS_TARGET),qnx)
UNIXINSTALLDIR=1
endif
endif
ifndef INSTALL_PREFIX
ifdef PREFIX
@ -443,6 +466,12 @@ HASSHAREDLIB=1
FPCMADE=fpcmade.netbsd
ZIPSUFFIX=netbsd
endif
ifeq ($(OS_TARGET),openbsd)
EXEEXT=
HASSHAREDLIB=1
FPCMADE=fpcmade.openbsd
ZIPSUFFIX=openbsd
endif
ifeq ($(OS_TARGET),win32)
PPUEXT=.ppw
OEXT=.ow
@ -468,7 +497,7 @@ ECHO=echo
endif
ifeq ($(OS_TARGET),amiga)
EXEEXT=
PPUEXT=.ppa
PPUEXT=.ppu
ASMEXT=.asm
OEXT=.o
SMARTEXT=.sl
@ -477,7 +506,7 @@ SHAREDLIBEXT=.library
FPCMADE=fpcmade.amg
endif
ifeq ($(OS_TARGET),atari)
PPUEXT=.ppt
PPUEXT=.ppu
ASMEXT=.s
OEXT=.o
SMARTEXT=.sl
@ -792,6 +821,8 @@ REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_INET=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_MYSQL=1
REQUIRE_PACKAGES_IBASE=1
endif
ifeq ($(OS_TARGET),amiga)
REQUIRE_PACKAGES_RTL=1
@ -818,6 +849,19 @@ REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL=1
endif
ifeq ($(OS_TARGET),openbsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_INET=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_MYSQL=1
REQUIRE_PACKAGES_IBASE=1
endif
ifeq ($(OS_TARGET),wdosx)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL=1
endif
ifdef REQUIRE_PACKAGES_RTL
PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/$(OS_TARGET)/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_RTL),)
@ -980,6 +1024,9 @@ endif
ifneq ($(OS_TARGET),$(OS_SOURCE))
override FPCOPT+=-T$(OS_TARGET)
endif
ifeq ($(OS_SOURCE),openbsd)
override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
endif
ifdef UNITDIR
override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
endif

View File

@ -17,12 +17,21 @@ packages=rtl fcl
[compiler]
options=-gl
unitdir=. $(LAZDIR)/lcl/units $(LAZDIR)/components/units $(LAZDIR)/lcl/units/$(LCLPLATFORM)
unitdir=. $(LAZDIR)/lcl/units $(LAZDIR)/components/units \
$(LAZDIR)/lcl/units/$(LCL_PLATFORM)
targetdir=.
[prerules]
LAZDIR=../..
# LCL Platform
ifndef LCL_PLATFORM
ifeq ($(OS_TARGET),win32)
LCL_PLATFORM=win32
else
LCL_PLATFORM=gtk
endif
endif
export LCL_PLATFORM
[rules]
.PHONY: all makefile makefiles

View File

@ -27,6 +27,7 @@
program APIWizz;
uses
Interfaces,
Forms,
APIWizard;
@ -38,6 +39,9 @@ end.
{ =============================================================================
$Log$
Revision 1.2 2003/01/17 16:28:42 mattias
updated translation files
Revision 1.1 2000/07/13 10:28:31 michael
+ Initial import

317
tools/updatepofiles.pas Normal file
View File

@ -0,0 +1,317 @@
{
***************************************************************************
* *
* This source is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This code is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* A copy of the GNU General Public License is available on the World *
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
* obtain it by writing to the Free Software Foundation, *
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
* *
***************************************************************************
Author: Mattias Gaertner
Name:
updatepofiles - creates an lazarus resource file from files
Synopsis:
updatepofiles filename1.po [filename2.po ... filenameN.po]
Description:
updatepofiles deletes doubles in the po file and merges new strings into
all translated po files (filename1.po.xx)
}
program UpdatePoFiles;
{$mode objfpc}{$H+}
uses
Classes, SysUtils, FileCtrl, AVL_Tree;
type
TMsgItem = record
Comment: string;
ID: string;
Str: string;
end;
PMsgItem = ^TMsgItem;
function CompareMsgItems(Data1, Data2: pointer): integer;
var
MsgItem1: PMsgItem;
MsgItem2: PMsgItem;
begin
MsgItem1:=PMsgItem(Data1);
MsgItem2:=PMsgItem(Data2);
Result:=AnsiCompareText(MsgItem1^.ID,MsgItem2^.ID);
end;
//==============================================================================
var
Files: TStringList;
Prefix: string;
procedure IncPrefix;
begin
Prefix:=Prefix+' ';
end;
procedure DecPrefix;
begin
Prefix:=LeftStr(Prefix,length(Prefix)-2);
end;
function ParamsValid: boolean;
var
i: Integer;
Filename: String;
Ext: String;
Name: string;
begin
Result:=false;
if ParamCount<1 then exit;
for i:=1 to ParamCount do begin
Filename:=ParamStr(1);
Ext:=ExtractFileExt(Filename);
if not FileExists(Filename) then begin
writeln('ERROR: file not found: ',FileName);
exit;
end;
if (Ext<>'.po') then begin
writeln('ERROR: invalid extension: ',Filename);
exit;
end;
Name:=ExtractFileName(Filename);
Name:=LeftStr(Name,length(Name)-length(Ext));
if Pos('.',Name)>0 then begin
writeln('ERROR: invalid unitname: ',Name);
exit;
end;
if Files=nil then Files:=TStringList.Create;
Files.Add(Filename);
end;
Result:=true;
end;
function ReadMessageItem(SrcFile: TStringList; var Line: integer): PMsgItem;
var
s: string;
CommentStarted: boolean;
begin
New(Result);
CommentStarted:=false;
while Line<SrcFile.Count do begin
s:=SrcFile[Line];
if (LeftStr(s,7)='msgid "') and (length(s)>8) then begin
Result^.ID:=copy(s,8,length(s)-8);
inc(Line);
if Line<SrcFile.Count then begin
s:=SrcFile[Line];
if LeftStr(s,8)='msgstr "' then begin
Result^.Str:=copy(s,9,length(s)-9);
inc(Line);
end;
end;
exit;
end;
if s<>'' then begin
if CommentStarted then
Result^.Comment:=Result^.Comment+#10+s
else begin
Result^.Comment:=s;
CommentStarted:=true;
end;
end;
inc(Line);
end;
end;
procedure WriteMessageItem(MsgItem: PMsgItem; DestFile: TStringList);
begin
DestFile.Add(MsgItem^.Comment);
DestFile.Add('msgid "'+MsgItem^.ID+'"');
DestFile.Add('msgstr "'+MsgItem^.Str+'"');
DestFile.Add('');
end;
function ReadPoTree(const Filename: string): TAVLTree;
var
SrcFile: TStringList;
MsgItem: PMsgItem;
Line: Integer;
begin
Result:=TAVLTree.Create(@CompareMsgItems);
// read source .po file
//writeln(Prefix,'Loading ',Filename,' ...');
SrcFile:=TStringList.Create;
SrcFile.LoadFromFile(Filename);
Line:=0;
while Line<SrcFile.Count do begin
MsgItem:=ReadMessageItem(SrcFile,Line);
// ignore doubles
if (MsgItem^.ID='')
or (Result.FindKey(MsgItem,@CompareMsgItems)<>nil) then begin
Dispose(MsgItem);
continue;
end;
// add message
Result.Add(MsgItem);
end;
SrcFile.Free;
end;
procedure WritePoTree(Tree: TAVLTree; const Filename: string);
var
DestFile: TStringList;
Node: TAVLTreeNode;
MsgItem: PMsgItem;
begin
//writeln(Prefix,'Saving ',Filename,' ...');
DestFile:=TStringList.Create;
Node:=Tree.FindLowest;
while Node<>nil do begin
MsgItem:=PMsgItem(Node.Data);
WriteMessageItem(MsgItem,DestFile);
Node:=Tree.FindSuccessor(Node);
end;
DestFile.SaveToFile(Filename);
DestFile.Free;
end;
function FindAllTranslatedPoFiles(const Filename: string): TStringList;
const
{$IFDEF Win32}
FindMask = '*.*';
{$ELSE}
FindMask = '*';
{$ENDIF}
var
Path: String;
Name: String;
NameOnly: String;
Ext: String;
FileInfo: TSearchRec;
CurExt: String;
begin
Result:=TStringList.Create;
Path:=ExtractFilePath(Filename);
Name:=ExtractFilename(Filename);
Ext:=ExtractFileExt(Filename);
NameOnly:=LeftStr(Name,length(Name)-length(Ext));
if SysUtils.FindFirst(Path+FindMask,faAnyFile,FileInfo)=0 then begin
repeat
if (FileInfo.Name='.') or (FileInfo.Name='..')
or (CompareFilenames(FileInfo.Name,Name)=0) then continue;
CurExt:=ExtractFileExt(FileInfo.Name);
if (CompareFilenames(CurExt,'.po')<>0)
or (CompareFilenames(LeftStr(FileInfo.Name,length(NameOnly)),NameOnly)<>0)
then
continue;
Result.Add(Path+FileInfo.Name);
until SysUtils.FindNext(FileInfo)<>0;
end;
SysUtils.FindClose(FileInfo);
end;
procedure MergePoTrees(SrcTree, DestTree: TAVLTree);
var
SrcNode: TAVLTreeNode;
SrcMsgItem, DestMsgItem: PMsgItem;
DestNode: TAVLTreeNode;
begin
// add all message items from SrcTree into DestTree
SrcNode:=SrcTree.FindLowest;
while SrcNode<>nil do begin
SrcMsgItem:=PMsgItem(SrcNode.Data);
DestNode:=DestTree.FindKey(SrcMsgItem,@CompareMsgItems);
if DestNode<>nil then begin
// ID already exists -> update comment
DestMsgItem:=PMsgItem(DestNode.Data);
DestMsgItem^.Comment:=SrcMsgItem^.Comment;
end else begin
// new ID -> add new message item to DestTree
New(DestMsgItem);
DestMsgItem^.Comment:=SrcMsgItem^.Comment;
DestMsgItem^.ID:=SrcMsgItem^.ID;
DestMsgItem^.Str:=SrcMsgItem^.Str;
DestTree.Add(DestMsgItem);
end;
SrcNode:=SrcTree.FindSuccessor(SrcNode);
end;
end;
procedure DisposeMsgTree(var Tree: TAVLTree);
var
Node: TAVLTreeNode;
MsgItem: PMsgItem;
begin
Node:=Tree.FindLowest;
while Node<>nil do begin
MsgItem:=PMsgItem(Node.Data);
Dispose(MsgItem);
Node:=Tree.FindSuccessor(Node);
end;
Tree.Free;
Tree:=nil;
end;
procedure UpdatePoFile(const Filename: string);
var
SrcTree, DestTree: TAVLTree;
DestFiles: TStringList;
i: Integer;
begin
writeln('Loading ',Filename,' ...');
SrcTree:=ReadPoTree(Filename);
DestFiles:=FindAllTranslatedPoFiles(Filename);
IncPrefix;
for i:=0 to DestFiles.Count-1 do begin
writeln(Prefix,'Updating ',DestFiles[i]);
IncPrefix;
DestTree:=ReadPoTree(DestFiles[i]);
MergePoTrees(SrcTree,DestTree);
WritePoTree(DestTree,DestFiles[i]);
DisposeMsgTree(DestTree);
DecPrefix;
end;
DecPrefix;
DestFiles.Free;
DisposeMsgTree(SrcTree);
end;
procedure UpdateAllPoFiles;
var
i: Integer;
begin
for i:=0 to Files.Count-1 do begin
UpdatePoFile(Files[i]);
end;
end;
begin
Prefix:='';
Files:=nil;
if not ParamsValid then begin
writeln('Usage: ',ExtractFileName(ParamStr(0))
,' filename1.po [filename2.po ... filenameN.po]');
exit;
end else begin
UpdateAllPoFiles;
end;
Files.Free;
end.