AshishJoshi-asj / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Field titles are not translated __() #145

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add a Field title, or leave it with default title (field name)
2. make translation in adapter (gettext)
3. run

What is the expected output? What do you see instead?
Field name/title translated, but I see original Field name

What version of the product are you using? On what operating system?
0.6 alpha, Vista64, XP32

Please provide any additional information below.
In the manual it is stated that "Fields titles, field’s descriptions and a
bunch of other strings are translatable"

Original issue reported on code.google.com by vlatko.b...@gmail.com on 10 Feb 2010 at 11:07

GoogleCodeExporter commented 9 years ago
Thansk for the report.

Fixed

Original comment by pao.fre...@gmail.com on 10 Feb 2010 at 2:42

GoogleCodeExporter commented 9 years ago
Hi,

I just updated files and I do not think this issue is fixed.

For Grid, titles/names are not translated. In untranslated.log I see

(explanation: "Nedostaje '' za jezik 'hr'" means "Missing '' for language 'hr')
2010-02-10T17:24:50+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T17:24:50+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T17:24:50+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T17:24:50+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T17:24:50+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T17:24:50+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T17:24:50+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T17:24:50+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T17:24:50+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T17:24:50+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T17:24:50+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'

However, when I Edit the Grid, all titles/names are translated, but the log 
shows
2010-02-10T17:19:29+01:00 NOTICE (5): Nedostaje 'ID korisnika' za jezik 'hr'
2010-02-10T17:19:29+01:00 NOTICE (5): Nedostaje 'Ime' za jezik 'hr'
2010-02-10T17:19:29+01:00 NOTICE (5): Nedostaje 'Prezime' za jezik 'hr'
2010-02-10T17:19:29+01:00 NOTICE (5): Nedostaje 'Ulica' za jezik 'hr'
2010-02-10T17:19:29+01:00 NOTICE (5): Nedostaje 'Grad' za jezik 'hr'
2010-02-10T17:19:29+01:00 NOTICE (5): Nedostaje 'ID zemlje' za jezik 'hr'
2010-02-10T17:19:29+01:00 NOTICE (5): Nedostaje 'Kućni telefon' za jezik 'hr'
2010-02-10T17:19:29+01:00 NOTICE (5): Nedostaje 'Mobitel' za jezik 'hr'
2010-02-10T17:19:29+01:00 NOTICE (5): Nedostaje 'Mobitel 2' za jezik 'hr'
2010-02-10T17:19:29+01:00 NOTICE (5): Nedostaje 'Napomene' za jezik 'hr'

Last two are for Submit and Cancel buttons that are correctly translated:
2010-02-10T17:19:29+01:00 NOTICE (5): Nedostaje 'Spremi' za jezik 'hr'
2010-02-10T17:19:29+01:00 NOTICE (5): Nedostaje 'Otkaži' za jezik 'hr'

Looks like it is trying to retranslate from Croatian back to Croatian.

Maybe the fastest solution would be to always do the translation by field name, 
and
not by the title?

Original comment by vlatko.b...@gmail.com on 10 Feb 2010 at 4:33

GoogleCodeExporter commented 9 years ago
Hi,

I was trying to translate the wrong option.

Please try again...

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 10 Feb 2010 at 5:50

GoogleCodeExporter commented 9 years ago
It does look correct now, however
Log for Grid
2010-02-10T19:00:51+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T19:00:51+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T19:00:51+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T19:00:51+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T19:00:51+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T19:00:51+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T19:00:51+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T19:00:51+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T19:00:51+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T19:00:51+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'
2010-02-10T19:00:51+01:00 NOTICE (5): Nedostaje '' za jezik 'hr'

And for Form:
2010-02-10T19:01:16+01:00 NOTICE (5): Nedostaje 'ID korisnika' za jezik 'hr'
2010-02-10T19:01:16+01:00 NOTICE (5): Nedostaje 'Ime' za jezik 'hr'
2010-02-10T19:01:16+01:00 NOTICE (5): Nedostaje 'Prezime' za jezik 'hr'
2010-02-10T19:01:16+01:00 NOTICE (5): Nedostaje 'Ulica' za jezik 'hr'
2010-02-10T19:01:16+01:00 NOTICE (5): Nedostaje 'Grad' za jezik 'hr'
2010-02-10T19:01:16+01:00 NOTICE (5): Nedostaje 'ID zemlje' za jezik 'hr'
2010-02-10T19:01:16+01:00 NOTICE (5): Nedostaje 'Kućni telefon' za jezik 'hr'
2010-02-10T19:01:16+01:00 NOTICE (5): Nedostaje 'Mobitel' za jezik 'hr'
2010-02-10T19:01:16+01:00 NOTICE (5): Nedostaje 'Mobitel 2' za jezik 'hr'
2010-02-10T19:01:16+01:00 NOTICE (5): Nedostaje 'Napomene' za jezik 'hr'
2010-02-10T19:01:16+01:00 NOTICE (5): Nedostaje 'Spremi' za jezik 'hr'
2010-02-10T19:01:16+01:00 NOTICE (5): Nedostaje 'Otkaži' za jezik 'hr'

Also, all field names (by which they are searched for translation, e.g. 'id' was
searched by 'Id') have first letter capitalized. Not a big issue, but maybe it 
might
give you a clue. Maybe field names should stay in their original case (I have 
them
first letter lower case), and only the title should change? Is this helpfull?

Original comment by vlatko.b...@gmail.com on 10 Feb 2010 at 6:05

GoogleCodeExporter commented 9 years ago

Original comment by pao.fre...@gmail.com on 11 Feb 2010 at 3:56

GoogleCodeExporter commented 9 years ago
Hmmm,

I'm not responsible for translation inside forms. They are generated with 
Zend_Form.

The ->__( method is called before fields display. 

The translation is only applied to the title and tooltip option. Fields names 
are not
translated.

Don't know the reason about being searched the first letter lower case... Makes 
no sense.

I don't think I can do anything, by the simple fact the same happens in form, 
and, as
I said above, forms are generated by Zend_Form

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 12 Feb 2010 at 4:22

GoogleCodeExporter commented 9 years ago
Well, in fact, what you did earlier is that translation works. Both for Form and
Grid. So, considering, the issue can be closed.

The only "problem" is that it is searching more than needed, and is searching 
some
empty strings. Doesn't look a big issue to me.

Original comment by vlatko.b...@gmail.com on 12 Feb 2010 at 4:29

GoogleCodeExporter commented 9 years ago
Hi,

About empty strings, they are not translated anymore.

So no more checking for empty strings.

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 12 Feb 2010 at 4:34

GoogleCodeExporter commented 9 years ago
Indeed, it is. Excellent. :-)

Original comment by vlatko.b...@gmail.com on 12 Feb 2010 at 4:47

GoogleCodeExporter commented 9 years ago
Verified

Original comment by vlatko.b...@gmail.com on 16 Feb 2010 at 12:03

GoogleCodeExporter commented 9 years ago

Original comment by bento.vi...@gmail.com on 3 Mar 2010 at 4:56