2013-04-01 18:53 UTC+0200 Viktor Szakats (harbour syenar.net)
* src/rtl/hbi18n2.prg
* __i18n_potArrayClean() will now call transformation callback
first again
* __i18n_potArrayClean() transformation callback returning non-string
will now be ignored instead of deleting the item
* utils/hbmk2/hbmk2.prg
* TOFIX added to a help text
This commit is contained in:
@@ -10,13 +10,23 @@
|
||||
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
|
||||
*/
|
||||
|
||||
2013-04-01 18:53 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
* src/rtl/hbi18n2.prg
|
||||
* __i18n_potArrayClean() will now call transformation callback
|
||||
first again
|
||||
* __i18n_potArrayClean() transformation callback returning non-string
|
||||
will now be ignored instead of deleting the item
|
||||
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
* TOFIX added to a help text
|
||||
|
||||
2013-04-01 13:36 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
* .gitignore
|
||||
+ added .hrb files
|
||||
|
||||
* src/rtl/hbi18n2.prg
|
||||
* __i18n_potArrayClean() reverted to call transformation callback
|
||||
after deleting items
|
||||
after deleting items [UNDONE]
|
||||
|
||||
2013-04-01 05:35 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
* utils/hbmk2/lang.hb
|
||||
@@ -45,9 +55,9 @@
|
||||
+ __i18n_potArraySort() tweaked to sort items w/o source info to always
|
||||
come before ones with source info
|
||||
+ __i18n_potArrayClean() will now call transformation callback before
|
||||
deleting items [REVERTED]
|
||||
deleting items
|
||||
+ __i18n_potArrayClean() will now remove the item in question if the
|
||||
callback returns any non-string value
|
||||
callback returns any non-string value [CHANGED]
|
||||
+ __i18n_potArrayClean()'s second lKeepVoidTranslations = .F. option will
|
||||
now also remove items where the translation is identical to the msg id
|
||||
+ __i18n_potArrayClean() wlll now pass the msg id as second parameter
|
||||
|
||||
@@ -338,13 +338,23 @@ FUNCTION __i18n_potArrayClean( aTrans, lKeepSource, lKeepVoidTranslations, bTran
|
||||
|
||||
LOCAL item
|
||||
LOCAL cString
|
||||
LOCAL lDelete
|
||||
LOCAL lVoid
|
||||
LOCAL tmp
|
||||
|
||||
hb_default( @lKeepSource, .T. )
|
||||
hb_default( @lKeepVoidTranslations, .T. )
|
||||
|
||||
FOR EACH item IN aTrans DESCEND
|
||||
|
||||
IF HB_ISEVALITEM( bTransformTranslation )
|
||||
FOR EACH cString IN item[ _I18N_MSGSTR ]
|
||||
tmp := Eval( bTransformTranslation, cString, item[ _I18N_MSGID, cString:__enumIndex() ] )
|
||||
IF HB_ISSTRING( tmp )
|
||||
cString := tmp
|
||||
ENDIF
|
||||
NEXT
|
||||
ENDIF
|
||||
|
||||
IF ! lKeepVoidTranslations
|
||||
lVoid := .T.
|
||||
FOR EACH cString IN item[ _I18N_MSGSTR ]
|
||||
@@ -358,20 +368,7 @@ FUNCTION __i18n_potArrayClean( aTrans, lKeepSource, lKeepVoidTranslations, bTran
|
||||
LOOP
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF HB_ISEVALITEM( bTransformTranslation )
|
||||
lDelete := .F.
|
||||
FOR EACH cString IN item[ _I18N_MSGSTR ]
|
||||
cString := Eval( bTransformTranslation, cString, item[ _I18N_MSGID, cString:__enumIndex() ] )
|
||||
IF ! HB_ISSTRING( cString )
|
||||
lDelete := .T.
|
||||
EXIT
|
||||
ENDIF
|
||||
NEXT
|
||||
IF lDelete
|
||||
hb_ADel( aTrans, item:__enumIndex(), .T. )
|
||||
LOOP
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF ! lKeepSource
|
||||
item[ _I18N_SOURCE ] := ""
|
||||
ENDIF
|
||||
|
||||
@@ -16351,6 +16351,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lMore, lLong )
|
||||
hb_StrFormat( I_( "Values marked with [*] may be host platform and/or configuration " + ;
|
||||
"dependent. This help was generated on '%1$s' host platform." ), ;
|
||||
Lower( hb_Version( HB_VERSION_PLATFORM ) ) ) }
|
||||
/* TOFIX: hb.ch is only included at interactive shell prompt, not in scripts. */
|
||||
|
||||
LOCAL aHdr_Desc := { ;
|
||||
"", ;
|
||||
|
||||
Reference in New Issue
Block a user