Topic: Hard-coded problems in reports for translation

First all the best wishes for 2013!

During optimalizing the Ducth language translation files I experienced some hard-coded problems... Is it possible to fix this problems in a new release?


[../reporting/reports_main.php?Class=0&REP_ID=112]

The amount recieved decribed in words is hard-coded/written in English. No translation is possible (example Hundred and Ninety-Nine and 99/100).


[../gl/gl_bank.php?NewDeposit=Yes]

The English word "to" is used at several places, by example in selecting dates (1 january 2012 TO 31 december 2012)  and in the bankdeposit entry screen (deposit TO bank XYZ). In both situations another dutch word is used ("tot" and "op" / "aan"). I now cannot give an individual translation for these cases, because the word "to" is linked to both situations in FA. Maybe is it possible to program a duplicate word "to" in the language file for the deposit screen, so it is possible to assign a different translation? I know in the language French and German this problem also must exists and could be solved by this solution.

Thnx.

Re: Hard-coded problems in reports for translation

Regarding your first issue, it is possible to use a hook extension. I am not sure how it works. Janusz has changed the way itshould be used. Maybe he sees this and can give you a hint about this.

Regarding your last issue it should be included in a sentence. I am not sure about how to solve this.

/Joe

3 (edited by apmuthu 01/03/2013 02:33:35 am)

Re: Hard-coded problems in reports for translation

Will deposit in bank suffice or possibly deposit with bank or deposit into bank ?

Re: Hard-coded problems in reports for translation

@erwindebruin
Will the work into be sufficient?

/Joe

Re: Hard-coded problems in reports for translation

Joe / Apmuthu, thnx for your suggestions.


joe wrote:

@erwindebruin
Will the work into be sufficient?

/Joe


Yes into, would be sufficient.

6 (edited by apmuthu 01/05/2013 05:14:05 am)

Re: Hard-coded problems in reports for translation

Thanks Joe for Changesets 3127/3131 addressing this problem. It however needs an entry in the empty.po file. Attempting to reconstruct the empty.po afresh yielded a file that is 341KB as against the current one in the fa repo that is 359KB. There are a lot of legacy entries with wrong filenames and line numbers in the repo one.

The shell script to generate the empty.po file I wrote is:

#!/bin/bash
 
FRONTACFILE=FrontAc_default_Mer_3127_2012-12-20.tar.gz
WEBROOT=/var/www/frontac
 
mkdir -p $WEBROOT
cd $WEBROOT
 
wget http://www.apmuthu.com/bugfixes/$FRONTACFILE
tar -xzf $FRONTACFILE
rm -f $FRONTACFILE
 
MAINDIR=`pwd`/
 
# Generate the main empty.po file
 
TPL=lang/new_language_template/LC_MESSAGES/empty
GTEXEC="xgettext  -d empty --language=PHP  --from-code=ISO-8859-1 \
                  -p $MAINDIR/lang/new_language_template/LC_MESSAGES "
 
# Backup the old main empty.po
mv $MAINDIR/$TPL.po $MAINDIR/$TPL.po.org
 
# Generate main header as well
$GTEXEC -k_ -n *.php
 
# set the charset
sed -i 's/charset=CHARSET/charset=ISO-8859-1/g' $MAINDIR/$TPL.po
 
 
mv install ..
 
$GTEXEC -k_ -n -j */*.php
$GTEXEC -k_ -n -j */*/*.php
$GTEXEC -k_ -n -j */*/*/*.php
$GTEXEC -k_ -n -j */*.inc
$GTEXEC -k_ -n -j */*/*.inc
$GTEXEC -k_ -n -j */*/*/*.inc
 
mv ../install .
 
# Generate the install empty.po file
 
TPL=install/lang/new_language_template/LC_MESSAGES/empty
GTEXEC="xgettext  -d empty --language=PHP  --from-code=ISO-8859-1 \
                  -p $MAINDIR/install/lang/new_language_template/LC_MESSAGES "
 
# Backup the old install empty.po
mv $MAINDIR/$TPL.po $MAINDIR/$TPL.po.org
 
# Generate install header as well
$GTEXEC -k_ -n install/*.php
 
# set the charset
sed -i 's/charset=CHARSET/charset=ISO-8859-1/g' $MAINDIR/$TPL.po
 
$GTEXEC -k_ -n -j install/*.inc
$GTEXEC -k_ -n -j includes/system_tests.inc
$GTEXEC -k_ -n -j includes/packages.inc