This is a discussion on A bunch of minor issues within the pgsql Interfaces Pgadmin Hackers forums, part of the PostgreSQL category; --> Hi, I'm working on the Finnish translation to bring it up-to-date, and bumped into a few minor issues, mostly ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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: 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. REINDEX options under "Maintenance". Always grey'd out, AFAICS. What are these? 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... 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? The "result copy quote" options in the main configuration options were not self-explanatory. I'd suggest grouping the three options together in a group box, and disabling the "result copy quote character" and "- separator" settings when "none"-quoting is selected. In checkboxes, sometimes a question mark is used at the end of the label text, sometimes not. 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. 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... In the "Manage macros" dialog, the "Name" column in the list is way too narrow, about 2-3 chars. 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/...l#Plural-forms. Google suggests that wxWidgets has a wxPLURAL macro for plural forms, that works like the _() macro that's used for normal strings. 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? -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com ---------------------------(end of broadcast)--------------------------- TIP 1: 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 |
| |||
| Heikki Linnakangas wrote: > 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: > I faced those problems when I was updating the pt-br translation. Unfortunately, pgAdmin already froze the strings. > Attached is a patch to change a few string constructions to be more > localization-friendly. There's still a lot of troublesome constructs where is the patch? > 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... > It would be nice but wxrc doesn't help. -- Euler Taveira de Oliveira http://www.timbira.com/ ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |
| |||
| Euler Taveira de Oliveira wrote: > Heikki Linnakangas wrote: >> Attached is a patch to change a few string constructions to be more >> localization-friendly. There's still a lot of troublesome constructs > where is the patch? Oh crap. Here.. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |
| |||
| [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/...l#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. ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |
| |||
| Dave Page wrote: >> 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. Seems this is only an issue with 8.3 Fix committed to SVN. Thanks, Dave. ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| |||
| Dave Page wrote: > Dave Page wrote: >>> 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. > > Seems this is only an issue with 8.3 Fix committed to SVN. Really? <checks 8.2 source code>. No, that change was backpatched all the way to 8.1 branch, which is the first release with 2PC. The check is in src/backend/access/transam/twophase.c: > /* > * Note: it probably would be possible to allow committing from another > * database; but at the moment NOTIFY is known not to work and there > * may be some other issues as well. Hence disallow until someone > * gets motivated to make it work. > */ > if (MyDatabaseId != gxact->proc.databaseId) > ereport(ERROR, > (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), > errmsg("prepared transaction belongs to another database"), > errhint("Connect to the database where the transaction was prepared to finish it."))); -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| |||
| Dave Page wrote: > [Guillaume; I've left some of Heikki's suggestions to your discretion, > please read on...] > > Heikki Linnakangas wrote: >> 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. Ok, makes sense. > RECREATE is a pgAdmin extension that drops and recreates an index. What's the advantage of that, compared to normal REINDEX? > 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! I think it would work if you dropped and recreated the constraint in a single transaction. The DROP would acquire an exclusive lock on the table, so anyone trying to insert to it would block. >> 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? Finnish texts do tend to more longer than English. It's not a problem in most places, but for example "Rename" in the favourites manager is translated to "Nimeä uudelleen", which is quite a bit longer. If we just made the space reserved for the button bigger, it would look quite silly in English I think. But as it is, the button is partly underneath the "Remove" button. >> 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! Yeah, probably don't want to change it now. I'd suggest changing them all to the true/false statement form in the future. >> 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). Only somewhat ;-). I hacked wxXml, wxrc and stringextract to do that. I'll clean that up and post patches to wx the wxWidgets list, as well the changes to stringextract. Meanwhile, anyone interested in the pgadmin3.pot file I have here with the file/line numbers in it? I can post it if so.. >> 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? There's a bunch of unused space. I can send you a screenshot. >> 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/...l#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! Yeah, probably better to leave it until next release. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| |||
| Heikki Linnakangas wrote: > Really? <checks 8.2 source code>. No, that change was backpatched all > the way to 8.1 branch, which is the first release with 2PC. The check is > in src/backend/access/transam/twophase.c: Rats - seems the test server I was using was 8.2.2. Oh well, easy fix committed. Thanks, Dave. ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate |
| |||
| Heikki Linnakangas wrote: >> RECREATE is a pgAdmin extension that drops and recreates an index. > > What's the advantage of that, compared to normal REINDEX? Quoth the PG docs: REINDEX is similar to a drop and recreate of the index in that the index contents are rebuilt from scratch. However, the locking considerations are rather different. REINDEX locks out writes but not reads of the index's parent table. It also takes an exclusive lock on the specific index being processed, which will block reads that attempt to use that index. In contrast, DROP INDEX momentarily takes exclusive lock on the parent table, blocking both writes and reads. The subsequent CREATE INDEX locks out writes but not reads; since the index is not there, no read will attempt to use it, meaning that there will be no blocking but reads may be forced into expensive sequential scans. Another important point is that the drop/create approach invalidates any cached query plans that use the index, while REINDEX does not. >> 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! > > I think it would work if you dropped and recreated the constraint in a > single transaction. The DROP would acquire an exclusive lock on the > table, so anyone trying to insert to it would block. OK. > Finnish texts do tend to more longer than English. It's not a problem in > most places, but for example "Rename" in the favourites manager is > translated to "Nimeä uudelleen", which is quite a bit longer. If we just > made the space reserved for the button bigger, it would look quite silly > in English I think. But as it is, the button is partly underneath the > "Remove" button. Wow, that is longer. I think we normally suggest leaving 50% extra space over the English text. I'm not sure how we'd handle that case automatically unless we rewrite everything to use sizers (which are a lot more usable now than when most of the dialogues were first written). Thats a *lot* of work though. > Only somewhat ;-). I hacked wxXml, wxrc and stringextract to do that. > I'll clean that up and post patches to wx the wxWidgets list, as well > the changes to stringextract. Cool, thanks. > Meanwhile, anyone interested in the pgadmin3.pot file I have here with > the file/line numbers in it? I can post it if so.. I'd be more interested in the patches so I can update my utilities and those of developer.pgadmin.org where stringextract tends to be run (I imagine Guillaume would like a copy too). >>> 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? > > There's a bunch of unused space. I can send you a screenshot. I'll be in the office tomorrow - I can test it properly on Linux then and eyeball your screen. Thanks, Dave ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| ||||
| On 26.9.2007, at 14.26, Heikki Linnakangas wrote: > Dave Page >> 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? FI (or fi) should be enough (I am not sure, what you are looking for). > > Finnish texts do tend to more longer than English. It's not a > problem in > most places, but for example "Rename" in the favourites manager is > translated to "Nimeä uudelleen", which is quite a bit longer. If we > just > made the space reserved for the button bigger, it would look quite > silly > in English I think. But as it is, the button is partly underneath the > "Remove" button. That translation is a literal one. If something has a name already, "Nimeä" could be enough, it means then rename?! This is a suggestion only, and the problem remains, some translations are bound to be longish, in the user interface controls that will be difficult. ! ! Jyrki Wahlstedt ! http://www.wahlstedt.fi/jyrki/ ! ! Our life is no dream; but it ought to become one and perhaps will. ! PGP key ID: 0x139CC386 fingerprint: F355 B46F 026C B8C1 89C0 A780 6366 EFD9 139C C386 ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |
| Thread Tools | |
| Display Modes | |
|
|