GNOME Bugzilla – Bug 659876
Allow disable of contact's address auto-formatting
Last modified: 2013-09-13 01:06:31 UTC
Running Evolution 3.1.91 on Ubuntu 11.10 Steps to reproduce: a) Add a new Local contact b) Enter an address with a country (I used home address) c) Save the contact The contact address appears in ALL-CAPS. Clearing the country field and re-saving returns the address case to normal.
Thanks for a bug report. I suppose this is rather because of a standard form how to write address in the respective country. This is algorithmized since bug #636809. If you feel your country has this set false, then feel free to provide a change in addressbook/gui/widgets/address_formats.dat for your country.
haha. Let me express my concern with laughter. https://bugzilla.gnome.org/show_bug.cgi?id=636809#c9 That patch raises a few questions in my mind. First of all it has nothing to do with "my country". It sets the locale formatting to "the country of my friends" which varies and makes little sense.. shouldn't it be set to the country of my post office?. After all that is where the formatting is being dictated. If I am in Germany, and want to mail to a Canadian address, my labels get formatted in a way that Canada Post wants - and my local German Post office gets confused. Is that correct? Maybe. I hope the requirement to format based on destination (address locale) and not sender (host machine locale) is actually right .. as basically this means inconsistent format depending on whether a country is specified in your contact. I would argue in most cases, when the country is omitted is when the local locale formatting should apply, and maybe then only. Anyways, the end result is that a) Contacts with country omitted are not formatted consistently b) My local post office has to deal with all these locale formats of my friends c) The local addressbook and google addressbook behave differently Workaround: Move all your contacts to Google.
So it seemed worth a Google .. I found this quote from "Frank" at Columbia referencing one of the sort-of standards bodies on this: "It should also be noted that addressing guidelines are incidental to the UPU's primary mission, which is creating standards for the description of postal addresses (that is, defining and naming the elements), not for their rendition, which is left to each country." I happen to totally agree, and Capitalization is "rendition". Go ahead and change the elements to match local state, canton, province or whatever local line formatting is required to get them there, but leave my Proper Nouns with a Captial followed by a lowercase when I write them in the English language. http://www.columbia.edu/~fdc/postal/ My 2c - I use Google contacts anyways, but I think this patch needs rethinking.
(I'm CC'ing author of the initial patch) Dan, could you share your opinion on above comments, please?
Since the original bug was requested to provide exactly this functionality and apparently not everybody likes it, we agreed with Milan to add a switch to make the formatting optional, otherwise the old behavior will be applied. The option will not affect existing contacts, only newly created/edited ones.
Yup, and to have this available for 3.2.x users, the option will be hidden in 3.2.x (even without schema), to not add new translatable strings and UI into the code.
Created attachment 197889 [details] [review] Proposed patch This patch adds View->Enable Address Formatting menu option and a gconf value. When enabled, address are formatted according to standard in country they point to (current behavior), otherwise a universal address format is used (behavior prior to bug #636809). By default the option is set to TRUE so that behavior introduced in Evo 3.0 is not disabled without any obvious way how to turn it on again. I'd suggest to disable it by default when the UI element is committed.
Thanks for a patch, only two things with it: a) you can leak the 'client' in set_address_label() b) do not add the option into menu, user preferences are in Edit->Preferences, and for contacts view in the Contacts section. Add it there, please.
Created attachment 198347 [details] [review] Fixed patch - fixed possible memleak - added checkbox to Preferences -> Contacts (maybe we should rename autocompletion-config.c to something else since it contains configuration for another things as well)
I do not expect gconf_client_get_default() ever return NULL, thus rather client = gconf_client_get_default (); value = gconf_client_get (client, ...); g_object_unref (client); if (value) { ... s/it's/its/ in "Format address according to standard of it's destination country" add a free mnemonic letter to tha above string Fix the warning: e-contact-editor.c: In function 'set_address_label': e-contact-editor.c:2307:15: warning: unused variable 'key' [-Wunused-variable] ---------------------------------------------------- When you've those four above things fixed, commit the whole patch to master branch and only the change from file e-contact-editor.c to gnome-3-2. Thanks. You can update the final patch here too, if you want to.
Created attachment 198525 [details] [review] Fixed patch Commited for master and gnome-3-2: http://git.gnome.org/browse/evolution/commit/?id=d2232a718dc86dda4182d154a7fdfe1d218229dc http://git.gnome.org/browse/evolution/commit/?h=gnome-3-2&id=3218a0ae85011e050b678043942136cfc6746c4c
Commit to gnome-3-2 broke the string freeze - see gnome-i18n@ mailing list.
I'm sorry, my mistake. I have reverted the string change in commit 0ece877.
I applied the original patch with the handy string and just tested prior to my 3.2.1 upgrade and observed the following results. 1) Added an address to an existing contact without one, and observed the default capitalization when using country=Canada 2) Removed the country and confirmed the capitalization dissappeared 3) Unchecked the "_Format according to the standard of its destination country" checkbox 4) Added country = "Canada" back in, and the formatting Capitalized again. Its not affecting Google contacts, which I use primarily, but I wanted to test again before pulling down yesterday's ubuntu merge of 3.2.1 When the string is removed, what is the best way to configure this option?
(In reply to comment #14) > 4) Added country = "Canada" back in, and the formatting Capitalized again. Is this a typo? I would expect 'not' at the end, as you have the option unset/false. > When the string is removed, what is the best way to configure this option? The easiest might be a command line like this: $ gconftool-2 --set --type=bool \ /apps/evolution/addressbook/display/address_formatting false
No typo, unchecked option should result in normal rendition. (No capitalization)
Hmm, I think I do not follow. I'm sorry for that. Does it mean that the above is a confirmation that the patch works as expected?
My observations were incorrect, or at least current patch on 3.2.1 is working. thanks
Good, thanks for confirmation.