Re: [development] Translating database fields

2009-09-25 Thread Nedjo Rogers
mark burdett wrote: > Littering your module with if (module_exists('i18nstrings')) isn't so > nice, so I'm hoping that a future version of core will provide a real > API for string translation.. (where's the issue for this? :) > > --mark The most advanced patch is http://drupal.org/node/361597, bu

Re: [development] Translating database fields

2009-09-23 Thread Gábor Hojtsy
On Wed, Sep 23, 2009 at 6:36 PM, mark burdett wrote: > On Wed, Sep 23, 2009 at 7:42 AM, Jennifer Hodgdon > wrote: >> There's a whole section in the Handbook on how to do this: >>   http://drupal.org/node/303984 > > This is the specific page I used recently, > http://drupal.org/node/304002 "Makin

Re: [development] Translating database fields

2009-09-23 Thread Earl Miles
Peter Droogmans wrote: You can do the opposite, define a tt function if the module doesn't exist, it keeps your code cleaner You need to do it this way: if (!module_exists('i18nstrings') && !function_exists('tt')) { function tt($string) { return $string; } } That way 2 modules trying

Re: [development] Translating database fields

2009-09-23 Thread Peter Droogmans
ag 23 september 2009 18:40 To: development@drupal.org Cc: jer...@kerneltrap.org Subject: Re: [development] Translating database fields On Wed, Sep 23, 2009 at 7:42 AM, Jennifer Hodgdon wrote: > There's a whole section in the Handbook on how to do this: > http://drupal.org/node/303

Re: [development] Translating database fields

2009-09-23 Thread mark burdett
On Wed, Sep 23, 2009 at 7:42 AM, Jennifer Hodgdon wrote: > There's a whole section in the Handbook on how to do this: > http://drupal.org/node/303984 This is the specific page I used recently, http://drupal.org/node/304002 "Making your custom data translatable" Littering your module with if (m

Re: [development] Translating database fields

2009-09-23 Thread Jennifer Hodgdon
There's a whole section in the Handbook on how to do this: http://drupal.org/node/303984 --Jennifer Jeremy Andrews wrote: Hello, I'm looking for advice on the proper way to resolve this issue: http://drupal.org/node/571742 Summary: The support module [1] defines four default states ("

Re: [development] Translating database fields

2009-09-23 Thread Gábor Hojtsy
Didn't you ask to follow up on the issue? :D On Wed, Sep 23, 2009 at 3:48 PM, Jeremy Andrews wrote: > So you're suggesting that currently the "correct" way to make text > stored in the database translatable is to use tt()? I don't know of a better way. We tried to get people to review approaches

Re: [development] Translating database fields

2009-09-23 Thread Jeremy Andrews
On Wed, 2009-09-23 at 15:17 +0200, Gábor Hojtsy wrote: > On Wed, Sep 23, 2009 at 3:10 PM, Ken Winters wrote: > > Hmm, tt() doesn't seem very developer friendly. > > > > If you're developing a module that is translatable, you can't realistically > > require i18n, and checking for the module / funct

Re: [development] Translating database fields

2009-09-23 Thread Gábor Hojtsy
On Wed, Sep 23, 2009 at 3:10 PM, Ken Winters wrote: > Hmm, tt() doesn't seem very developer friendly. > > If you're developing a module that is translatable, you can't realistically > require i18n, and checking for the module / function in 100 places would be > unpleasant (assuming that it is norm

Re: [development] Translating database fields

2009-09-23 Thread Ken Winters
Hmm, tt() doesn't seem very developer friendly. If you're developing a module that is translatable, you can't realistically require i18n, and checking for the module / function in 100 places would be unpleasant (assuming that it is normally used the same way as t() in the code). Other tha

Re: [development] Translating database fields

2009-09-23 Thread Gábor Hojtsy
On Wed, Sep 23, 2009 at 3:23 AM, Jeremy Andrews wrote: > Hello, > > I'm looking for advice on the proper way to resolve this issue: >  http://drupal.org/node/571742 http://drupal.org/node/571742#comment-2073144 Gábor

Re: [development] Translating database fields

2009-09-22 Thread Michael Prasuhn
I'm sure others have a better handle on this, than I, and I'm sure they will chime in here. My understanding is that you could run the output through t() but you would have to make sure that the users know and the edit page explains that the strings must be entered in English, and then in t

[development] Translating database fields

2009-09-22 Thread Jeremy Andrews
Hello, I'm looking for advice on the proper way to resolve this issue: http://drupal.org/node/571742 Summary: The support module [1] defines four default states ("new", "active", "pending", "closed") and four default priorities ("low", "normal", "high", "critical"). These fields are defined in