added synedit localization

git-svn-id: trunk@3402 -
This commit is contained in:
mattias 2002-10-01 15:45:32 +00:00
parent be090f6f5d
commit cefa78f0c5
9 changed files with 518 additions and 13 deletions

4
.gitattributes vendored
View File

@ -45,6 +45,10 @@ components/gtk/gtkglarea/nvgl.pp svneol=native#text/pascal
components/gtk/gtkglarea/nvglx.pp svneol=native#text/pascal
components/gtk/gtkglarea/tgtkglareacontrol.xpm -text svneol=native#image/x-xpixmap
components/synedit/allunits.pp svneol=native#text/pascal
components/synedit/languages/synedit.de.po svneol=native#text/plain
components/synedit/languages/synedit.po svneol=native#text/plain
components/synedit/languages/synmacrorecorder.de.po svneol=native#text/plain
components/synedit/languages/synmacrorecorder.po svneol=native#text/plain
components/synedit/syncompletion.pas svneol=native#text/pascal
components/synedit/synedit.inc svneol=native#text/pascal
components/synedit/synedit.pp svneol=native#text/pascal

View File

@ -4,7 +4,12 @@ for internationalization of the codetools.
All text and messages used in the codetools should be placed into the unit
codetoolsstrconsts.pas. This unit uses a resourcestring section, so that the
compiler will create the
<lazarusdir>/components/codetools/codetoolsstrconsts.rst file.
<lazarusdir>/components/units/codetoolsstrconsts.rst file.
The following is a in detail description of updating the language files for
the codetools. Normally you can just execute the <lazarusdir>/localize.sh
script.
Since this is a fpc-only format it must be converted with the rstconv program:
cd <lazarusdir>/components/codetools/languages

View File

@ -0,0 +1,35 @@
The <lazarusdir>/components/synedit/languages directory contains all the stuff
for localization of synedit.
All text and messages used in synedit should be placed into the unit
syneditstrconst.pp. This unit uses resourcestring sections, so that the
compiler will create the
<lazarusdir>/components/units/syneditstrconst.rst file.
<lazarusdir>/components/units/synmacrorecorder.rst file.
The following is a in detail description of updating the language files for
synedit. Normally you can just execute the <lazarusdir>/localize.sh script.
Because this is a fpc-only format it must be converted with the rstconv program:
cd <lazarusdir>/components/synedit/languages
rstconv -i ../../units/syneditstrconst.rst -o synedit.po
rstconv -i ../../units/synmacrorecorder.rst -o synmacrorecorder.po
This will create the files synedit.po and synmacrorecorder.po, which should be
translated in all required languages to a synedit.xx.po and a
synmacrorecorder.xx.po file. For the xx see the gettext unit in the procedure
TranslateResourceStrings of the IDE.
german: synedit.de.po and synmacrorecorder.de.po
After the translation, the both po file are converted to .mo files with the
msgfmt program:
msgfmt -v -o synedit.xx.mo synedit.xx.po
msgfmt -v -o synmacrorecorder.xx.mo synmacrorecorder.xx.po
where xx is the language id.

View File

@ -0,0 +1,204 @@
#: syneditstrconst:syns_scrollinfofmt
msgid "%d - %d"
msgstr ""
#: syneditstrconst:syns_filterasm68hc11
msgid "68HC11 Assembler Files (*.hc11,*.asm,*.asc)|*.HC11;*.ASM;*.ASC"
msgstr ""
#: syneditstrconst:syns_shortcutnone
msgid "<none>"
msgstr ""
#: syneditstrconst:syns_filterawk
msgid "AWK Script (*.awk)|*.awk"
msgstr ""
#: syneditstrconst:syns_filterbaan
msgid "Baan 4GL Files (*.cln)|*.cln"
msgstr ""
#: syneditstrconst:syns_filterdfm
msgid "Borland Form Files (*.dfm;*.xfm)|*.dfm;*.xfm"
msgstr ""
#: syneditstrconst:syns_filtercpp
msgid "C++ Files (*.c,*.cpp,*.h,*.hpp)|*.c;*.cpp;*.h;*.hpp"
msgstr ""
#: syneditstrconst:syns_filtercaclipper
msgid "CA-Clipper Files (*.prg,*.ch,*.inc)|*.prg;*.ch;*.inc"
msgstr ""
#: syneditstrconst:syns_filtercache
msgid "Cache Files (*.mac,*.inc,*.int)|*.mac;*.inc;*.int"
msgstr ""
#: syneditstrconst:syns_filtercss
msgid "Cascading Stylesheets (*.css)|*.css"
msgstr ""
#: syneditstrconst:syns_filtercorbaidl
msgid "CORBA IDL files (*.idl)|*.idl"
msgstr ""
#: syneditstrconst:syns_filtercpm
msgid "CPM reports (*.rdf,*.rif,*.rmf,*.rxf)|*.rdf;*.rif;*.rmf;*.rxf"
msgstr ""
#: syneditstrconst:syns_filteradsp21xx
msgid "DSP Files (*.dsp,*.inc)|*.DSP;*.INC"
msgstr ""
#: syneditstrconst:syns_filterfortran
msgid "Fortran Files (*.for)|*.for"
msgstr ""
#: syneditstrconst:syns_filterfoxpro
msgid "Foxpro Files (*.prg)|*.prg"
msgstr ""
#: syneditstrconst:syns_filtergalaxy
msgid "Galaxy Files (*.gtv,*.galrep,*.txt)|*.gtv;*.galrep;*.txt"
msgstr ""
#: syneditstrconst:syns_filtergembase
msgid "GEMBASE Files (*.dml,*.gem)|*.DML;*.GEM"
msgstr ""
#: syneditstrconst:syns_filtergws
msgid "GW-TEL Script Files (*.gws)|*.gws"
msgstr ""
#: syneditstrconst:syns_filterhp48
msgid "HP48 Files (*.s,*.sou,*.a,*.hp)|*.s;*.sou;*.a;*.hp"
msgstr ""
#: syneditstrconst:syns_exporterformathtml
msgid "HTML"
msgstr ""
#: syneditstrconst:syns_filterhtml
msgid "HTML Document (*.htm,*.html)|*.htm;*.html"
msgstr ""
#: syneditstrconst:syns_filterini
msgid "INI Files (*.ini)|*.ini"
msgstr ""
#: syneditstrconst:syns_filterinno
msgid "Inno Setup Script Files (*.iss)|*.iss"
msgstr ""
#: syneditstrconst:syns_filterjava
msgid "Java Files (*.java)|*.java"
msgstr ""
#: syneditstrconst:syns_filterjscript
msgid "Javascript Files (*.js)|*.js"
msgstr ""
#: syneditstrconst:syns_filterkix
msgid "KiXtart scripts (*.kix)|*.kix"
msgstr ""
#: syneditstrconst:syns_filterlfm
msgid "Lazarus Form Files (*.lfm)|*.lfm"
msgstr ""
#: syneditstrconst:syns_filtermodelica
msgid "Modelica Files (*.mo)|*.mo"
msgstr ""
#: syneditstrconst:syns_filtermodula3
msgid "Modula-3 Files (*.m3)|*.m3"
msgstr ""
#: syneditstrconst:syns_filterbatch
msgid "MS-DOS Batch Files (*.bat;*.cmd)|*.bat;*.cmd"
msgstr ""
#: syneditstrconst:syns_filtersyngenmsgfiles
msgid "Msg files (*.msg)|*.msg"
msgstr ""
#: syneditstrconst:syns_previewscrollinfofmt
msgid "Page: %d"
msgstr ""
#: syneditstrconst:syns_filterpascal
msgid "Pascal Files (*.pas,*.dpr,*.dpk,*.inc)|*.pas;*.dpr;*.dpk;*.inc"
msgstr ""
#: syneditstrconst:syns_filterperl
msgid "Perl Files (*.pl,*.pm,*.cgi)|*.pl;*.pm;*.cgi"
msgstr ""
#: syneditstrconst:syns_filterphp
msgid "PHP Files (*.php,*.php3,*.phtml,*.inc)|*.php;*.php3;*.phtml;*.inc"
msgstr ""
#: syneditstrconst:syns_filterprogress
msgid "Progress Files (*.w,*.p,*.i)|*.w;*.p;*.i"
msgstr ""
#: syneditstrconst:syns_filterpython
msgid "Python Files (*.py)|*.py"
msgstr ""
#: syneditstrconst:syns_filterrtf
msgid "Rich Text Format (*.rtf)|*.rtf"
msgstr ""
#: syneditstrconst:syns_exporterformatrtf
msgid "RTF"
msgstr ""
#: syneditstrconst:syns_filtersdd
msgid "Semanta DD files (*.sdd)|*.sdd"
msgstr ""
#: syneditstrconst:syns_eduplicateshortcut
msgid "Shortcut already exists"
msgstr ""
#: syneditstrconst:syns_filtersql
msgid "SQL Files (*.sql)|*.sql"
msgstr ""
#: syneditstrconst:syns_filtersml
msgid "Standard ML Files (*.sml)|*.sml"
msgstr ""
#: syneditstrconst:syns_filtertcltk
msgid "Tcl/Tk Files (*.tcl)|*.tcl"
msgstr ""
#: syneditstrconst:syns_duplicateshortcutmsg
msgid "The keystroke \"%s\" is already assigned to another editor command. (%s)"
msgstr ""
#: syneditstrconst:syns_duplicateshortcutmsg2
msgid "The keystroke \"%s\" is already assigned to another editor command.\015\nThe shortcut for this item has not been changed."
msgstr ""
#: syneditstrconst:syns_scrollinfofmttop
msgid "Top Line: %d"
msgstr ""
#: syneditstrconst:syns_filtervbscript
msgid "VBScript Files (*.vbs)|*.vbs"
msgstr ""
#: syneditstrconst:syns_filtervisualbasic
msgid "Visual Basic Files (*.bas)|*.bas"
msgstr ""
#: syneditstrconst:syns_filterx86asm
msgid "x86 Assembly Files (*.asm)|*.ASM"
msgstr ""
#: syneditstrconst:syns_filterxml
msgid "XML Document (*.xml,*.xsd,*.xsl,*.xslt,*.dtd)|*.xml;*.xsd;*.xsl;*.xslt;*.dtd"
msgstr ""

View File

@ -0,0 +1,208 @@
#: syneditstrconst:syns_exporterformathtml
msgid "HTML"
msgstr ""
#: syneditstrconst:syns_exporterformatrtf
msgid "RTF"
msgstr ""
#: syneditstrconst:syns_scrollinfofmt
msgid "%d - %d"
msgstr ""
#: syneditstrconst:syns_scrollinfofmttop
msgid "Top Line: %d"
msgstr ""
#: syneditstrconst:syns_previewscrollinfofmt
msgid "Page: %d"
msgstr ""
#: syneditstrconst:syns_eduplicateshortcut
msgid "Shortcut already exists"
msgstr ""
#: syneditstrconst:syns_shortcutnone
msgid "<none>"
msgstr ""
#: syneditstrconst:syns_duplicateshortcutmsg
msgid "The keystroke \"%s\" is already assigned to another editor command. (%s)"
msgstr ""
#: syneditstrconst:syns_duplicateshortcutmsg2
msgid "The keystroke \"%s\" is already assigned to another editor command.\015\nThe shortcut for this item has not been changed."
msgstr ""
#: syneditstrconst:syns_filterpascal
msgid "Pascal Files (*.pas,*.dpr,*.dpk,*.inc)|*.pas;*.dpr;*.dpk;*.inc"
msgstr ""
#: syneditstrconst:syns_filterhp48
msgid "HP48 Files (*.s,*.sou,*.a,*.hp)|*.s;*.sou;*.a;*.hp"
msgstr ""
#: syneditstrconst:syns_filtercaclipper
msgid "CA-Clipper Files (*.prg,*.ch,*.inc)|*.prg;*.ch;*.inc"
msgstr ""
#: syneditstrconst:syns_filtercorbaidl
msgid "CORBA IDL files (*.idl)|*.idl"
msgstr ""
#: syneditstrconst:syns_filtercpm
msgid "CPM reports (*.rdf,*.rif,*.rmf,*.rxf)|*.rdf;*.rif;*.rmf;*.rxf"
msgstr ""
#: syneditstrconst:syns_filtercpp
msgid "C++ Files (*.c,*.cpp,*.h,*.hpp)|*.c;*.cpp;*.h;*.hpp"
msgstr ""
#: syneditstrconst:syns_filterjava
msgid "Java Files (*.java)|*.java"
msgstr ""
#: syneditstrconst:syns_filterperl
msgid "Perl Files (*.pl,*.pm,*.cgi)|*.pl;*.pm;*.cgi"
msgstr ""
#: syneditstrconst:syns_filterawk
msgid "AWK Script (*.awk)|*.awk"
msgstr ""
#: syneditstrconst:syns_filterhtml
msgid "HTML Document (*.htm,*.html)|*.htm;*.html"
msgstr ""
#: syneditstrconst:syns_filtervbscript
msgid "VBScript Files (*.vbs)|*.vbs"
msgstr ""
#: syneditstrconst:syns_filtergalaxy
msgid "Galaxy Files (*.gtv,*.galrep,*.txt)|*.gtv;*.galrep;*.txt"
msgstr ""
#: syneditstrconst:syns_filterpython
msgid "Python Files (*.py)|*.py"
msgstr ""
#: syneditstrconst:syns_filtersql
msgid "SQL Files (*.sql)|*.sql"
msgstr ""
#: syneditstrconst:syns_filterhp
msgid "HP48 Files (*.s,*.sou,*.a,*.hp)|*.S;*.SOU;*.A;*.HP"
msgstr ""
#: syneditstrconst:syns_filtertcltk
msgid "Tcl/Tk Files (*.tcl)|*.tcl"
msgstr ""
#: syneditstrconst:syns_filterrtf
msgid "Rich Text Format (*.rtf)|*.rtf"
msgstr ""
#: syneditstrconst:syns_filterbatch
msgid "MS-DOS Batch Files (*.bat;*.cmd)|*.bat;*.cmd"
msgstr ""
#: syneditstrconst:syns_filterdfm
msgid "Borland Form Files (*.dfm;*.xfm)|*.dfm;*.xfm"
msgstr ""
#: syneditstrconst:syns_filterlfm
msgid "Lazarus Form Files (*.lfm)|*.lfm"
msgstr ""
#: syneditstrconst:syns_filterx86asm
msgid "x86 Assembly Files (*.asm)|*.ASM"
msgstr ""
#: syneditstrconst:syns_filtergembase
msgid "GEMBASE Files (*.dml,*.gem)|*.DML;*.GEM"
msgstr ""
#: syneditstrconst:syns_filterini
msgid "INI Files (*.ini)|*.ini"
msgstr ""
#: syneditstrconst:syns_filtersml
msgid "Standard ML Files (*.sml)|*.sml"
msgstr ""
#: syneditstrconst:syns_filtervisualbasic
msgid "Visual Basic Files (*.bas)|*.bas"
msgstr ""
#: syneditstrconst:syns_filteradsp21xx
msgid "DSP Files (*.dsp,*.inc)|*.DSP;*.INC"
msgstr ""
#: syneditstrconst:syns_filterphp
msgid "PHP Files (*.php,*.php3,*.phtml,*.inc)|*.php;*.php3;*.phtml;*.inc"
msgstr ""
#: syneditstrconst:syns_filtercache
msgid "Cache Files (*.mac,*.inc,*.int)|*.mac;*.inc;*.int"
msgstr ""
#: syneditstrconst:syns_filtercss
msgid "Cascading Stylesheets (*.css)|*.css"
msgstr ""
#: syneditstrconst:syns_filterjscript
msgid "Javascript Files (*.js)|*.js"
msgstr ""
#: syneditstrconst:syns_filterkix
msgid "KiXtart scripts (*.kix)|*.kix"
msgstr ""
#: syneditstrconst:syns_filterbaan
msgid "Baan 4GL Files (*.cln)|*.cln"
msgstr ""
#: syneditstrconst:syns_filterfoxpro
msgid "Foxpro Files (*.prg)|*.prg"
msgstr ""
#: syneditstrconst:syns_filterfortran
msgid "Fortran Files (*.for)|*.for"
msgstr ""
#: syneditstrconst:syns_filterasm68hc11
msgid "68HC11 Assembler Files (*.hc11,*.asm,*.asc)|*.HC11;*.ASM;*.ASC"
msgstr ""
#: syneditstrconst:syns_filterprogress
msgid "Progress Files (*.w,*.p,*.i)|*.w;*.p;*.i"
msgstr ""
#: syneditstrconst:syns_filterinno
msgid "Inno Setup Script Files (*.iss)|*.iss"
msgstr ""
#: syneditstrconst:syns_filtermodelica
msgid "Modelica Files (*.mo)|*.mo"
msgstr ""
#: syneditstrconst:syns_filtermodula3
msgid "Modula-3 Files (*.m3)|*.m3"
msgstr ""
#: syneditstrconst:syns_filtersdd
msgid "Semanta DD files (*.sdd)|*.sdd"
msgstr ""
#: syneditstrconst:syns_filterxml
msgid "XML Document (*.xml,*.xsd,*.xsl,*.xslt,*.dtd)|*.xml;*.xsd;*.xsl;*.xslt;*.dtd"
msgstr ""
#: syneditstrconst:syns_filtergws
msgid "GW-TEL Script Files (*.gws)|*.gws"
msgstr ""
#: syneditstrconst:syns_filtersyngenmsgfiles
msgid "Msg files (*.msg)|*.msg"
msgstr ""

View File

@ -0,0 +1,16 @@
#: synmacrorecorder:scannotpause
msgid "Can only pause when recording"
msgstr ""
#: synmacrorecorder:scannotresume
msgid "Can only resume when paused"
msgstr ""
#: synmacrorecorder:scannotplay
msgid "Cannot playback macro when recording"
msgstr ""
#: synmacrorecorder:scannotrecord
msgid "Cannot record macro when recording"
msgstr ""

View File

@ -0,0 +1,16 @@
#: synmacrorecorder:scannotrecord
msgid "Cannot record macro when recording"
msgstr ""
#: synmacrorecorder:scannotplay
msgid "Cannot playback macro when recording"
msgstr ""
#: synmacrorecorder:scannotpause
msgid "Can only pause when recording"
msgstr ""
#: synmacrorecorder:scannotresume
msgid "Can only resume when paused"
msgstr ""

View File

@ -45,16 +45,18 @@ const
SYNS_ComponentsPage = 'SynEdit';
SYNS_HighlightersPage = 'SynEdit Highlighters';
{$IFNDEF FPC}
{$IFDEF SYN_LAZARUS}
// The highlight attribute names are the only independent identification.
// So, they can't be translated.
// ToDo: add translated versions.
const
{$ELSE}
{$IFDEF SYN_COMPILER_3_UP}
resourcestring
{$ELSE}
const
{$ENDIF}
{$ELSE}
const
{$ENDIF}
SYNS_Untitled = 'Untitled';
// names for highlighter attributes
@ -142,6 +144,10 @@ const
SYNS_AttrVariable = 'Variable';
SYNS_AttrWhitespace = 'Whitespace';
{$IFDEF SYN_LAZARUS}
resourcestring
{$ENDIF}
// names of exporter output formats
SYNS_ExporterFormatHTML = 'HTML';
SYNS_ExporterFormatRTF = 'RTF';
@ -207,6 +213,11 @@ const
SYNS_FilterGWS = 'GW-TEL Script Files (*.gws)|*.gws';
SYNS_FilterSynGenMsgfiles = 'Msg files (*.msg)|*.msg';
{$IFDEF SYN_LAZARUS}
// Currently the language names are used to identify the language
// ToDo: create translation table
const
{$ENDIF}
// Language names. Maybe somebody wants them translated / more detailed...
SYNS_LangHP48 = 'HP48';
SYNS_LangCAClipper = 'CA-Clipper';
@ -216,7 +227,9 @@ const
SYNS_LangPerl = 'Perl';
SYNS_LangBatch = 'MS-DOS batch language';
SYNS_LangDfm = 'Borland Form definition';
{$IFDEF SYN_LAZARUS}
SYNS_LangLfm = 'Lazarus Form definition';
{$ENDIF}
SYNS_LangAWK = 'AWK Script';
SYNS_LangCORBAIDL = 'CORBA IDL';
SYNS_LangHTML = 'HTML document';

View File

@ -712,6 +712,7 @@ end;
procedure TranslateResourceStrings(const BaseDirectory, CustomLang: string);
var
Lang, FallbackLang: String;
Dir: String;
begin
if CustomLang='' then begin
GetLanguageIDs(Lang,FallbackLang);
@ -719,22 +720,25 @@ begin
Lang:=CustomLang;
FallbackLang:='';
end;
Dir:=AppendPathDelim(BaseDirectory);
// LCL
TranslateUnitResourceStrings('LclStrConsts',
AppendPathDelim(BaseDirectory)+'lcl/languages/lcl.%s.mo',
Lang,FallbackLang);
Dir+'lcl/languages/lcl.%s.mo',Lang,FallbackLang);
// IDE without objectinspector
TranslateUnitResourceStrings('LazarusIDEStrConsts',
AppendPathDelim(BaseDirectory)+'languages/lazaruside.%s.mo',
Lang,FallbackLang);
Dir+'languages/lazaruside.%s.mo',Lang,FallbackLang);
// objectinspector
TranslateUnitResourceStrings('ObjInspStrConsts',
AppendPathDelim(BaseDirectory)+'languages/objinspstrconsts.%s.mo',
Lang,FallbackLang);
Dir+'languages/objinspstrconsts.%s.mo',Lang,FallbackLang);
// CodeTools
TranslateUnitResourceStrings('CodeToolsStrConsts',
AppendPathDelim(BaseDirectory)+'components/codetools/languages/codetools.%s.mo',
Lang,FallbackLang);
Dir+'components/codetools/languages/codetools.%s.mo',Lang,FallbackLang);
// SynEdit
TranslateUnitResourceStrings('SynEditStrConst',
Dir+'components/synedit/languages/synedit.%s.mo',Lang,FallbackLang);
// SynMacroRecorder
TranslateUnitResourceStrings('SynMacroRecorder',
Dir+'components/synedit/languages/synmacrorecorder.%s.mo',Lang,FallbackLang);
end;
{-------------------------------------------------------------------------------