Uk tel no and zimlets
I have just setup Zimbra and i am looking at the zimlets and noticed the one that recognizes telephone numbers only seems to work on US based numbers. Is there a version of pattern matching which works on UK numbers or is there anywhere I can configure it ?
You're correct, the zimlet only recognises the US phone number format. The only place to modify it would be in the zimlet code itself.
Thanks Bill, do you know how I can access the code ? what is the zimlet called ?Nick
You'll find the code for all the zimlets in /opt/zimbra/zimlets and the extra ones in /opt/zimbra/zimlets-extra - I suppose the most useful thing would be to add an option for the phone number format based on the browser language. You'll need to deploy the zimlet after you've modified it, have a look at these two articles in the wiki here and here
It's the same for the day names when you have a non-english language...
I have been using this regular expression to recognise UK telephone numbers.
It will recognise telephone numbers in the following UK formats as well as the default US format;
- (0nnnn) nnnnnn
- 0nnnn nnnnnn
- (0nnn) nnn nnnn
- 0nnn nnn nnnn
- +ccnnnnnnnnnn (c = countrycode)
Looks good. I'll make this same change on our server, I just wish there was an easier way than copying the file to a windows box, unzipping it, editing the file, rezipping, copying back to the zimbra server, removing the zimlet, redeploy the zimlet and restarting tomcat... it's just a pain!
So much so, that I feel I must be doing something wrong, or is this really the only way to make any changes?
I'm also curious what would happen to the changed file when the next version of zimbra is installed.
Ideally, having that regex setup by the zimbra team would be nice, but I know that as soon as they do that then people in regions that still dont match will want theirs to work also and then the zimbra crew need to make the phone zimlet i18n in order to shut people up!
I'll do it myself :) But is there an easier way than the process I said at the start?
I don't think there is any better way at the moment.
Maybe in the future it would be a good idea to have the default RegEx overridable in the zimlet configuration file. That way, it wouldn't change when the system is upgraded and you would be able to apply changes with the zmzimletctl configure command.
I guess you can always add an RFE in bugzilla for features relating to zimlets, KevinH is also the man to answer questions about zimlets.