2009-05-06 20:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/utils/hbi18n/hbi18n.prg
% added support for optional reusing hIndex table in repeated calls
to __I18N_potArrayJoin() with the same aTrans array.
* harbour/source/rtl/hbi18n2.prg
% reuse hIndex table in repeated calls to __I18N_potArrayJoin()
This commit is contained in:
@@ -17,6 +17,14 @@
|
||||
past entries belonging to these authors: Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-05-06 20:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/utils/hbi18n/hbi18n.prg
|
||||
% added support for optional reusing hIndex table in repeated calls
|
||||
to __I18N_potArrayJoin() with the same aTrans array.
|
||||
|
||||
* harbour/source/rtl/hbi18n2.prg
|
||||
% reuse hIndex table in repeated calls to __I18N_potArrayJoin()
|
||||
|
||||
2009-05-06 20:14 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
* utils/hbmk2/hbmk2.hu_HU.po
|
||||
|
||||
@@ -448,16 +448,17 @@ FUNCTION __I18N_HASHJOIN( hTrans, hTrans2 )
|
||||
RETURN hTrans
|
||||
|
||||
|
||||
FUNCTION __I18N_POTARRAYJOIN( aTrans, aTrans2 )
|
||||
FUNCTION __I18N_POTARRAYJOIN( aTrans, aTrans2, hIndex )
|
||||
LOCAL aItem, aDest, aSrc
|
||||
LOCAL hIndex
|
||||
LOCAL ctx
|
||||
|
||||
hIndex := { => }
|
||||
FOR EACH aItem in aTrans
|
||||
ctx := aItem[ _I18N_CONTEXT ] + _I18N_DELIM + aItem[ _I18N_MSGID, 1 ]
|
||||
hIndex[ ctx ] := aItem:__enumIndex()
|
||||
NEXT
|
||||
IF !HB_ISHASH( hIndex )
|
||||
hIndex := { => }
|
||||
FOR EACH aItem in aTrans
|
||||
ctx := aItem[ _I18N_CONTEXT ] + _I18N_DELIM + aItem[ _I18N_MSGID, 1 ]
|
||||
hIndex[ ctx ] := aItem:__enumIndex()
|
||||
NEXT
|
||||
ENDIF
|
||||
|
||||
FOR EACH aItem in aTrans2
|
||||
ctx := aItem[ _I18N_CONTEXT ] + _I18N_DELIM + aItem[ _I18N_MSGID, 1 ]
|
||||
|
||||
@@ -243,6 +243,7 @@ STATIC FUNCTION ExpandWildCards( aFiles )
|
||||
|
||||
STATIC FUNCTION LoadFiles( aFiles )
|
||||
LOCAL aTrans, aTrans2
|
||||
LOCAL hIndex
|
||||
LOCAL cErrorMsg
|
||||
LOCAL n
|
||||
|
||||
@@ -255,7 +256,7 @@ STATIC FUNCTION LoadFiles( aFiles )
|
||||
IF aTrans2 == NIL
|
||||
ErrorMsg( cErrorMsg )
|
||||
ENDIF
|
||||
__I18N_potArrayJoin( aTrans, aTrans2 )
|
||||
__I18N_potArrayJoin( aTrans, aTrans2, @hIndex )
|
||||
NEXT
|
||||
|
||||
RETURN aTrans
|
||||
|
||||
Reference in New Issue
Block a user