Re: Poor Translators

Joe Stewart <[email protected]> Mon, 17 Nov 2003 09:05:09 -0600
Newsgroups gmane.comp.cms.phpslash.devel
Message-ID <[email protected]>
On Mon, Nov 17, 2003 at 02:38:39AM +0100, Alexander Bartolich wrote:
> Mike Gifford wrote:
> > 1) I don't think the phrase is being used any more as it
> > only seems to occur in the locale directory (I updated my
> > CVS version & grepped but didn't find it anywhere else).
> 
> It is used in the stable branch, file submission.php, line 60.
> 
> > This line should be nixed!
> 
> Im my humble opinion the I18N of phpSlash sucks. Completely.
> It seems that nobody really is responsible for that part.
> And that nobody thought about automatizing it.
> 

I have to admit this is not my bailiwick.  This is not the area that
itches the most for me to scratch.  There are others that this is not the
case.  

It was developed with a couple of objectives:

Ease of migration from existing code and if we wanted to go to a gnu
gettext method.

Speed should be reasonable.

Context of the text maintained from translation file and code.
This is where some projects have "strTransBadPasswd" or "STRBADPASSWD".
While these type strings can be used, the code basically remained
unchanged in initial implementation.

> For example, to find all used keys in .php files:
> 
> find . -type f -name '*.php' | xargs ./gettext.pl
> 
> Where gettext.pl is this:
> 
> #!/usr/bin/perl -nw00
> if (m/pslgettext\s*\(\s*([^\)]*)\s*\)/i) 
> { printf "%s\n", $1; }
> 
> But there are even more basic things.
> A primitive search for duplicate keys:
> 
> grep '=>' en.php3 | sort | uniq -d 
> 
> reports 11 matches.
> Then in file es.php3 we have this one:
> 
>   // Luis Mondesi < [email protected] > ths => this. please fix this!
>   "Sorry, ths story is assigned to this topic:" =>
>   "Lo siente, este art?culo esta asignado a este tema:",
> 
> The fix is basically a one-liner (just make the search expression
> unique):
> 
> find . -type f -name '*.php' | xargs perl -p -i.bak -e 's/ths/this/g'
> 

Thanks.  These will be handy.

> > 2) It never really occurred to me before (as a unilingual English
> > speaking North American), but using slang or casual language like
> > the phrase above must be a pain for folks to translate into German,
> > Spanish, Dutch, Norwegian, etc...
> 
> I updated de.php3 this summer (but got ignored).

mea culpa.  I didn't know you had submitted the files.  They've been
applied to both cvs trees.

> Anyway, I quickly got used to the casual tone and a quick grep provides
> the missing context. What's really bad is the reliance on word order.
> 
> A sprintf on %s is good
>     "The email address '%s' is not found"
> 

Yes.  Full sentences is best.

> Telegram style with colon at the end is bearable
>     "Sorry, ths story is assigned to this topic:"
> 
> Concatenating words to build sentences is evil:
>     " record deleted"
> 

I'm sure that this is terrible in translating to some languages due to
sentence structure.

File bug reports/patches where this needs to be improved.

thanks for your suggestions and help,

Joe


> > As Open Source code matures it is important to use language like
> > "Unknown Error" which although it is much more boring is way easier
> > to translate and understand.
> 
> Sure. But then OSS always starts with version 0.0.1 and improves.
> The problem with a clean-up of messages is that trivial changes
> cover a large range of files.
> 


-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl