[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue found with i18n for 1.3



Hi all;

One thing new in LedgerSMB 1.3 is the use of parameterized
localization strings.  These are designed to accommodate different
word orders in different languages.

This works generally well when the issue is not abused.  However,
following up with on a discussion with fellow-committer Herman
Vanderdeels, I went through the LedgerSMB.pot and found that in fact
the feature was abused, and we have some issues here.

The following is acceptable use of this feature:

$locale->text('The item [_1] could not be saved", $form->{item_name})
[_1] refers to some sort of string or number which would be
untranslated but could be interpolated in different places in
different translated strings.

The following is an abuse of this feature:

my $op;
if ($form->{id}){
    $op = 'Edit';
} else {
   $ob = 'Add';
}

$locale->text('[_1] SIC', $op);

We shouldn't be interpolating constnt strings in other constant
strings.  Names and numbers can and should be interpolated, but not
this.  Given the volume of commits on this subject, the code in
question is probably mine.

I wanted to write this email to let translators know that I will be
addressing this issue over the next several minor releases, and that
any help from translators is appreciated.

Best Wishes,
Chris Travers