2009-05-02 12:05 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* utils/hbmk2/hbmk2.prg
+ Added multilanguage support. Now LC_ALL, LC_MESSAGES and
LANG envvar will be checked for language ID and loading
of translation will be attempted from <hbmkdir>hbmk2.<lang>.hbl
file (not final name yet). You can compile such .hbl file by using
command:
> hbi18n -g -ohbmk2.<lang>.hbl hbmk2.<lang>.pot
You can create .pot using this command:
> ..\..\bin\harbour hbmk2.prg /jhbmk2-<lang>.pot /i..\..\include
Where <lang> is preferable the std ISO language ID, like: pt_BR.
This commit is contained in:
@@ -17,6 +17,18 @@
|
||||
past entries belonging to these authors: Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-05-02 12:05 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
+ Added multilanguage support. Now LC_ALL, LC_MESSAGES and
|
||||
LANG envvar will be checked for language ID and loading
|
||||
of translation will be attempted from <hbmkdir>hbmk2.<lang>.hbl
|
||||
file (not final name yet). You can compile such .hbl file by using
|
||||
command:
|
||||
> hbi18n -g -ohbmk2.<lang>.hbl hbmk2.<lang>.pot
|
||||
You can create .pot using this command:
|
||||
> ..\..\bin\harbour hbmk2.prg /jhbmk2-<lang>.pot /i..\..\include
|
||||
Where <lang> is preferable the std ISO language ID, like: pt_BR.
|
||||
|
||||
2009-05-02 10:52 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
! Minor s&r error in help text.
|
||||
|
||||
@@ -311,6 +311,7 @@ FUNCTION hbmk( aArgs )
|
||||
LOCAL s_aLNG
|
||||
LOCAL s_cVCSDIR
|
||||
LOCAL s_cVCSHEAD
|
||||
LOCAL s_cUILNG
|
||||
|
||||
LOCAL s_lCPP := NIL
|
||||
LOCAL s_lSHARED := NIL
|
||||
@@ -423,6 +424,24 @@ FUNCTION hbmk( aArgs )
|
||||
|
||||
LOCAL nStart := Seconds()
|
||||
|
||||
IF Empty( s_cUILNG := GetEnv( "LC_ALL" ) )
|
||||
IF Empty( s_cUILNG := GetEnv( "LC_MESSAGES" ) )
|
||||
IF Empty( s_cUILNG := GetEnv( "LANG" ) )
|
||||
s_cUILNG := "en_EN"
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF !( s_cUILNG == "en_EN" )
|
||||
tmp := "${hb_root}hbmk2.${lng}.hbl"
|
||||
tmp := StrTran( tmp, "${hb_root}", PathSepToSelf( DirAddPathSep( hb_DirBase() ) ) )
|
||||
tmp := StrTran( tmp, "${lng}", s_cUILNG )
|
||||
tmp := hb_MemoRead( tmp )
|
||||
IF hb_i18n_check( tmp )
|
||||
hb_i18n_set( hb_i18n_restoretable( tmp ) )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF Empty( aArgs )
|
||||
ShowHeader()
|
||||
ShowHelp()
|
||||
@@ -5264,9 +5283,9 @@ STATIC PROCEDURE ShowHelp( lLong )
|
||||
I_( " The file format is the same as .hbp." ),;
|
||||
I_( " - .hbp option files in current dir are automatically processed." ),;
|
||||
I_( " - .hbp options (they should come in separate lines):" ),;
|
||||
I_( " libs=[<libname[s]>], gt=[gtname], prgflags=[Harbour flags]" ),;
|
||||
I_( " cflags=[C compiler flags], resflags=[resource compiler flags]" ),;
|
||||
I_( " ldflags=[Linker flags], libpaths=[paths], pots=[.pot files]" ),;
|
||||
I_( " libs=[<libname[s]>], gt=[gtname], prgflags=[Harbour flags]," ),;
|
||||
I_( " cflags=[C compiler flags], resflags=[resource compiler flags]," ),;
|
||||
I_( " ldflags=[Linker flags], libpaths=[paths], pots=[.pot files]," ),;
|
||||
I_( " incpaths=[paths], inctrypaths=[paths]" ),;
|
||||
I_( " gui|mt|shared|nulrdd|debug|opt|map|strip|run|inc=[yes|no]" ),;
|
||||
I_( " compr=[yes|no|def|min|max], head=[off|partial|full], echo=<text>" ),;
|
||||
|
||||
Reference in New Issue
Block a user