Skip site navigation (1) Skip section navigation (2)

Re: A bunch of minor issues

From: Dave Page <dpage(at)postgresql(dot)org>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org, Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Subject: Re: A bunch of minor issues
Date: 2007-09-26 09:30:47
Message-ID: 46FA26C7.5010405@postgresql.org (view raw or flat)
Thread:
Lists: pgadmin-hackers
[Guillaume; I've left some of Heikki's suggestions to your discretion, 
please read on...]

Heikki Linnakangas wrote:
> Hi,
> 
> I'm working on the Finnish translation to bring it up-to-date, and
> bumped into a few minor issues, mostly localization related. This is the
> first time I'm hacking or even using pgAdmin, so excuse me if some of
> these topics have been discussed to death already:

Gah - you know I'm trying to get this out the door :-p

> When creating a table or index, it would be nice if we checked that the
> value given for fillfactor is valid, within 0-100, in pgAdmin. Would be
> nicer than getting an error message from server.

We defer all validation to the server as a general rule. Some things are 
very difficult to verify on the client (the default value of a columnor 
a check constraint for example) so we leave it all to the server.

> REINDEX options under "Maintenance". Always grey'd out, AFAICS. What are
> these?

The rules are (reformatted for clarity):

     // Is REINDEX the selected operation?
     bool isReindex = (rbxAction->GetSelection() == 2);

     sbxReindexOptions->Enable(
	isReindex &&
	object->GetMetaType() == PGM_DATABASE ||
	object->GetMetaType() == PGM_INDEX ||
	object->GetMetaType() == PGM_PRIMARYKEY ||
	object->GetMetaType() == PGM_UNIQUE);

     chkForce->Enable(
	isReindex &&
	object->GetMetaType() == PGM_DATABASE);

     chkRecreate->Enable(
	isReindex &&
	object->GetMetaType() == PGM_INDEX);

RECREATE is a pgAdmin extension that drops and recreates an index. It 
isn't implemented for constraints (iirc) due to the window in which it 
could leave the table unconstrained. Although... is that actually an 
issue? I assume it is because the catalogs are always read with 
SnapshotNow() (is that the right one?). Anyway, you get the point. 
Grateful if you can confirm if we're right to worry or not!

> When trying to commit/rollback a prepared transaction in a database
> other than 'postgres', using the "server status" dialog, I always get
> this error message:
> 
> ERROR:  prepared transaction belongs to another database
> HINT:  Connect to the database where the transaction was prepared to
> finish it.
> 
> Apparently the "server status" always operates with the 'postgres'
> database...

Will investigate and fix.

> At a few places, buttons are laid out on top of each other, or over text
> labels, or columns are too narrow for the translated text. I know, this
> is mentioned in the howto, but it's still annoying. How well do the
> non-resizeable dialogs work with different font sizes, BTW?

Reasonably well as a general rule, but some GTK themes can do wierd 
things. The dialogues are all laid out using 'dialog units', the actual 
size of which are calculated at runtime taking into account the font 
selection. Much of what is in the howto relates to v1.0 before the 
current system was implemented.

As you know I work in OS X and Windows most of the time and I know there 
are no sizing issues there in English. Is this something specific to 
running in Finnish (should that be Fin?), or GTK do you think?

> The "result copy quote" options in the main configuration options were
> not self-explanatory. 

Thats why we have a helpfile :-)

> I'd suggest grouping the three options together in
> a group box, 

I'm hoping to redesign that dialogue for the next version anyway, so I'm 
not going to spend any time on that this time round - but point taken.

> and disabling the "result copy quote character" and "-
> separator" settings when "none"-quoting is selected.

I've committed a change to enable/disable the quote character option as 
appropriate, however the separator is always used.

> In checkboxes, sometimes a question mark is used at the end of the label
> text, sometimes not.

Yeah, I don't know how those strings translate out of English, but some 
have the inflection of a question, whilst others are more of a statement 
with a true/false part - I think that's where the difference comes from. 
There are a couple I'm not sure about.

I'm inclined to leave these for now and standardise them in the redesign 
next to round. They've been like that for a while, and I'd rather not 
cheese off the translators this late in the cycle!

> Attached is a patch to change a few string constructions to be more
> localization-friendly. There's still a lot of troublesome constructs
> like "Cannot drop system %s", where %s is replaced with "View",
> "Sequence" etc. That doesn't work for many languages, including Finnish,
> where the following word needs to be inflected differently depending on
> the context. The patch also removes a bogus tooltip from a
> "Help"-button. You might want to replace it with a proper tooltip
> instead of removing it altogether.

I'll leave that to Guillaume to apply as he prefers.

> It would be nice if the references to lines in source files in the
> po-files worked for the strings extracted from xrc-files as well...

Thats somewhat out of our control unfortunately (it's a wxWidgets thing).

> In the "Manage macros" dialog, the "Name" column in the list is way too
> narrow, about 2-3 chars.

That must be a GTK thing as it's about 2.5 times the size of the Key 
column here. Is the Key column too large, forcing the Name to be small, 
or is there a bunch of unused space?

> For messages like "%d seconds", "%d rows", the plural forms of the
> formatting functions/macros should be used, see
> http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms.
> Google suggests that wxWidgets has a wxPLURAL macro for plural forms,
> that works like the _() macro that's used for normal strings.

Guillaume - is this something you want to do now, or defer for the next 
release? Obviously it would break strings and I'd *really* like to go RC 
in the next week or so!

> There's some strings in calls to wxLogDebug, like "OnTargetComplete()
> called", that are wrapped in _() for translation. Aren't those just for
> developers, and therefore a waste of time to translate?

Yep. Removed.

Thanks for the feedback.

Regards, Dave.


In response to

Responses

pgadmin-hackers by date

Next:From: svnDate: 2007-09-26 09:31:13
Subject: SVN Commit by dpage: r6673 - trunk/pgadmin3
Previous:From: svnDate: 2007-09-26 09:29:10
Subject: SVN Commit by dpage: r6672 - in trunk/pgadmin3/i18n: af_ZA ar_SA bg_BG ca_ES cs_CZ da_DK de_CH de_DE el_GR es_ES fa_IR fi_FI fr_FR gl_ES gu_IN hi_IN hr_HR hu_HU id_ID is_IS it_IT ja_JP ko_KR lt_LT lv_LV mk_MK nb_NO nl_NL pl_PL pt_BR pt_PT ro_RO ru_RU sk_SK sl_SI sr_YU sv_SE te_IN tl_PH tr_TR uk_UA ur_PK vi_VN zh_CN zh_TW

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group