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
This commit is contained in:
Viktor Szakats
2013-04-01 13:37:33 +02:00
parent fd4e1aa8b6
commit c57aef04fc
3 changed files with 24 additions and 15 deletions

View File

@@ -345,6 +345,19 @@ FUNCTION __i18n_potArrayClean( aTrans, lKeepSource, lKeepVoidTranslations, bTran
hb_default( @lKeepVoidTranslations, .T. )
FOR EACH item IN aTrans DESCEND
IF ! lKeepVoidTranslations
lVoid := .T.
FOR EACH cString IN item[ _I18N_MSGSTR ]
IF ! Empty( cString ) .AND. !( cString == item[ _I18N_MSGID, cString:__enumIndex() ] )
lVoid := .F.
EXIT
ENDIF
NEXT
IF lVoid
hb_ADel( aTrans, item:__enumIndex(), .T. )
LOOP
ENDIF
ENDIF
IF HB_ISEVALITEM( bTransformTranslation )
lDelete := .F.
FOR EACH cString IN item[ _I18N_MSGSTR ]
@@ -359,19 +372,6 @@ FUNCTION __i18n_potArrayClean( aTrans, lKeepSource, lKeepVoidTranslations, bTran
LOOP
ENDIF
ENDIF
IF ! lKeepVoidTranslations
lVoid := .T.
FOR EACH cString IN item[ _I18N_MSGSTR ]
IF ! Empty( cString ) .AND. !( cString == item[ _I18N_MSGID, cString:__enumIndex() ] )
lVoid := .F.
EXIT
ENDIF
NEXT
IF lVoid
hb_ADel( aTrans, item:__enumIndex(), .T. )
LOOP
ENDIF
ENDIF
IF ! lKeepSource
item[ _I18N_SOURCE ] := ""
ENDIF