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

1
.gitignore vendored
View File

@@ -8,6 +8,7 @@ obj
*.hbl
*.hbd
*.hbr
*.hrb
# 'install'-ed binaries
*.exe

View File

@@ -10,6 +10,14 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
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
2013-04-01 05:35 UTC+0200 Viktor Szakats (harbour syenar.net)
* utils/hbmk2/lang.hb
+ more automatic doctoring of translated strings
@@ -36,8 +44,8 @@
! __i18n_potArraySort() fixed to not RTE when no source is present
+ __i18n_potArraySort() tweaked to sort items w/o source info to always
come before ones with source info
+ __i18n_potArrayClean() wlll now call transformation callback before
deleting items
+ __i18n_potArrayClean() will now call transformation callback before
deleting items [REVERTED]
+ __i18n_potArrayClean() will now remove the item in question if the
callback returns any non-string value
+ __i18n_potArrayClean()'s second lKeepVoidTranslations = .F. option will

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