Unix Technical Forum

Re: Patch to reduce the number of messages to translate

This is a discussion on Re: Patch to reduce the number of messages to translate within the pgsql Interfaces jdbc forums, part of the PostgreSQL category; --> On Fri, 17 Dec 2004, Xavier Poinsard wrote: > The attached patch reduces the number of messages to translate ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces jdbc

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-15-2008, 10:54 PM
Kris Jurka
 
Posts: n/a
Default Re: Patch to reduce the number of messages to translate



On Fri, 17 Dec 2004, Xavier Poinsard wrote:

> The attached patch reduces the number of messages to translate by using
> a parameter to regroup similar messages.
> For example "Bad short" => "Bad {0}" with "short" as argument.
> This way "Bad int" becomes "Bad {0}" we have reduced the number of
> messages to translate.
>


Is this a good idea? I'm willing to take your word as someone who
actually does translations, but I wanted to confirm that parameterizing
the message in this way won't cause translation problems. Is this only a
reasonable thing to do because the existing error message text isn't all
that informative?

Kris Jurka

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-15-2008, 10:54 PM
Peter Eisentraut
 
Posts: n/a
Default Re: Patch to reduce the number of messages to translate

Kris Jurka wrote:
> > For example "Bad short" => "Bad {0}" with "short" as argument.
> > This way "Bad int" becomes "Bad {0}" we have reduced the number of
> > messages to translate.

>
> Is this a good idea? I'm willing to take your word as someone who
> actually does translations, but I wanted to confirm that
> parameterizing the message in this way won't cause translation
> problems.


I'm pretty sure it will. Splitting the adjective away from the noun
isn't a good idea.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-15-2008, 10:54 PM
Xavier Poinsard
 
Posts: n/a
Default Re: Patch to reduce the number of messages to translate

Peter Eisentraut wrote:
> Kris Jurka wrote:
>
>>>For example "Bad short" => "Bad {0}" with "short" as argument.
>>>This way "Bad int" becomes "Bad {0}" we have reduced the number of
>>>messages to translate.

>>
>>Is this a good idea? I'm willing to take your word as someone who
>>actually does translations, but I wanted to confirm that
>>parameterizing the message in this way won't cause translation
>>problems.

>
>
> I'm pretty sure it will. Splitting the adjective away from the noun
> isn't a good idea.
>


I typed quickly the message with my patch ; the changes are the following :

- "Conversion of box failed: {0}." => "Conversion of {1} failed: {0}."
with box,circle,line,lseg,point

- "The JVM claims not to support the ASCII encoding." => "The JVM claims
not to support the {0} encoding."
with ASCII,UTF-8

- "Bad byte: {0}" => "Bad {1}: {0}"
with byte,short,int,long,BigDecimal,float,double,date

- "Cannot cast an instance of {0} to Types.BIT" => "Cannot cast an
instance of {0} to {1}"
with Types.BIT,Types.OTHER

As you can see, the new parameters have all the same gender : they are
all java type names or encodings. Since they have the same gender, the
adjective will be the same for all.
As far as I know, this type of replacement can't be a problem.
If the new parameters were real nouns with different genders, it would
be a problem, but not in these cases.
No ?




---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-15-2008, 10:54 PM
Peter Eisentraut
 
Posts: n/a
Default Re: Patch to reduce the number of messages to translate

Xavier Poinsard wrote:
> As you can see, the new parameters have all the same gender : they
> are all java type names or encodings.


What makes you think that all Java type names have the same gender in
all languages?

You could rephrase the messages like this:

invalid input value for type "{0}": {1}

Then there should be no problem.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-15-2008, 10:54 PM
Xavier Poinsard
 
Posts: n/a
Default Re: Patch to reduce the number of messages to translate

Peter Eisentraut wrote:
> Xavier Poinsard wrote:
>
>>As you can see, the new parameters have all the same gender : they
>>are all java type names or encodings.

>
>
> What makes you think that all Java type names have the same gender in
> all languages?


Because we implicitly refer to them as type "java type name".

>
> You could rephrase the messages like this:
>
> invalid input value for type "{0}": {1}
>
> Then there should be no problem.


I will follow your advice to make it explicit.


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-15-2008, 10:54 PM
Nicolai Tufar
 
Posts: n/a
Default Re: Patch to reduce the number of messages to translate

By replacing type names we are creating a potential confusion.
A translator who is not familiar with the code may translate
type names like "long" or "integer".

I am for leaving the strings as they are. Translators are
copy+paste then edit the messages anyways.

Best regards,
Nicolai


On Tue, 21 Dec 2004 14:47:41 +0100, Xavier Poinsard <xpoinsard@free.fr> wrote:
> Here is the modified patch with hopefully no adjective problems.
>
> The changes are now the following :
>
> - "Conversion of box failed: {0}." => "Conversion to type {1} failed: {0}."
> with box,circle,line,lseg,point
>
> - "The JVM claims not to support the ASCII encoding." => "The JVM claims
> not to support the {0} encoding."
> with ASCII,UTF-8
>
> - "Bad byte: {0}" => "Bad value for type {1}: {0}"
> with byte,short,int,long,BigDecimal,float,double,date
>
> - "Cannot cast an instance of {0} to Types.BIT" => "Cannot cast an
> instance of {0} to type {1}"
> with Types.BIT,Types.OTHER
>
> Peter Eisentraut wrote:
> > You could rephrase the messages like this:
> >
> > invalid input value for type "{0}": {1}
> >
> > Then there should be no problem.
> >

>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
>
>
>


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-15-2008, 10:54 PM
Peter Eisentraut
 
Posts: n/a
Default Re: Patch to reduce the number of messages to translate

Nicolai Tufar wrote:
> By replacing type names we are creating a potential confusion.
> A translator who is not familiar with the code may translate
> type names like "long" or "integer".


The type names are not marked for translation (or at least they
shouldn't be).

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-15-2008, 10:54 PM
Xavier Poinsard
 
Posts: n/a
Default Re: Patch to reduce the number of messages to translate

Just discovered a small typo :


Index: TimestampUtils.java
================================================== =================
RCS file:
/usr/local/cvsroot/pgjdbc/pgjdbc/org/postgresql/jdbc2/TimestampUtils.java,v
retrieving revision 1.9
diff -u -r1.9 TimestampUtils.java
--- TimestampUtils.java 22 Dec 2004 09:23:57 -0000 1.9
+++ TimestampUtils.java 22 Dec 2004 11:32:35 -0000
@@ -158,7 +158,7 @@
}
}
} catch (NumberFormatException nfe) {
- throw new PSQLException(GT.tr("Bad value for type {0} :
{1}}", new Object[]{type,s}), PSQLState.BAD_DATETIME_FORMAT, nfe);
+ throw new PSQLException(GT.tr("Bad value for type {0} :
{1}", new Object[]{type,s}), PSQLState.BAD_DATETIME_FORMAT, nfe);
}

return nanos;


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-15-2008, 10:54 PM
Kris Jurka
 
Posts: n/a
Default Re: Patch to reduce the number of messages to translate



On Wed, 22 Dec 2004, Xavier Poinsard wrote:

> Just discovered a small typo :


Thanks. Fixed.

Kris Jurka

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:22 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com