I'll do it, just give me CVS access and tell me how :)
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | cck_address_norway.module.txt | 0 bytes | ximo |
| #3 | cck_address_norway.install.txt | 0 bytes | ximo |
| #2 | cck_address_norway.info | 182 bytes | ximo |
I'll do it, just give me CVS access and tell me how :)
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | cck_address_norway.module.txt | 0 bytes | ximo |
| #3 | cck_address_norway.install.txt | 0 bytes | ximo |
| #2 | cck_address_norway.info | 182 bytes | ximo |
Comments
Comment #1
rconstantine commentedI'll grant CVS access once you have posted the module here for review. The basic idea is to copy any one of these other contributed modules and just replace their country-specific data with your own. Be sure to note the comments I've given them so you don't make the same mistakes. And also be sue to be using the latest 'dev' version of cck_address for testing etc. It should literally take you less than half an hour to convert one of the existing modules. Also be careful of the regular expressions in the validation function. Make sure those are correct.
Comment #2
ximo commentedI've taken the Mexican as an example, looked at your comments for the Indian and Spanish ones, and made a Norwegian one. Some things I should mention:
The locale in cck_address_norway_validate_address_fields() (no_NO) is not correct as we have two languages in Norway (Bokmål and Nynorsk). The correct locale to use for Bokmål is nb_NO, while for nynorsk it's ny_NO. How can the module serve both locales? Adding nb_NO and ny_NO only generates errors.
Other than this, it would be nice to reorder the fields, as an address is formatted differently in Norway:
We don't actually use state/provice/county at all. The recipient line may span across two lines and include co/ information or name of company. But one line is commonly used on the web. All this was taken from the Norwegian Postal Service's website.
Comment #3
ximo commentedLooks like I messed up the list in the above comment :)
Here's the install file.
Comment #4
ximo commentedAnd the module itself.
Comment #5
ximo commentedHere's how Norwegian addresses should be formatted according to the standard:
Comment #6
rconstantine commentedFirst, the Canadian module that comes with CCK_Address has an example of two languages, so check it out.
Colons - got it.
Counties as substitutes for states is totally a valid use of that field. Since you'll be translating the word 'state' into your language(s) anyway, it doesn't matter what it was originally called.
As for reordering the fields, you can't do it so far as storage is concerned, but you can change the theme functions, and the css file which should allow you to change whatever you want. There are plenty of tutorials around for changing/supplementing theme functions.
Note that until CCK fixes it, there is a problem with Views knowing about the sub fields. It only knows about the first one stored, and I think at this point it is 'street1'.
In looking at your address format post, you should be using 'street1' for both the street name and number. Recipient should not be stored generally, but could be in the 'other' field. Like I said, overriding the theme function will make it all come out just fine.
Notice that both your install and module files didn't upload properly and are listed as 0 bytes. Your info file looks fine.
Generally, for your recipient field, you may want to use the cck_fullname module. Then, someone (maybe me someday) could write an address book-style module which would associate names with addresses, emails, etc. Or, you could simply collect all of that data in a custom content type and then use Views to display it in a printable form. That wouldn't be too hard I don't think.
Comment #7
rconstantine commentedI contacted the author via the contact page of Drupal.org, so hopefully I'll hear back soon.
Comment #8
rconstantine commentedBTW, I did give you CVS access. Start by checking out the whole module (I use tortoiseCVS, so if you use that too, I can give you step-by-step instructions) to a folder called cck_address_extensions. Then make a new folder called 'norway' within that folder. Put your files into it. 'Add' the new folder and files to the project. Commit the change. If you are uncertain about any step, then don't do it. Just ask questions here.
Comment #9
ximo commentedHi, thanks for the mail and the CVS access.
I've looked through the Canada extension as well as the India extension and made the Norway extension based on these. I'm not very accustomed to CVS (yet), but managed to add and commit the files, so they're in the repos now. I hope it's all good now - if not let, me know. Thanks!
Ps.
I noticed you have added the ability to rearrange the fields - nice :)
Comment #10
rconstantine commentedHopefully your commit is okay. It seems one of the others with CVS access screwed it up and one of the CVS admins is trying to iron things out. There were about a dozen that were messed up, but this one seems to be the worst. If you're on windows, I recommend TortoiseCVS since it is so stinkin' easy to use. I'll check your commit once I get a chance.
Comment #11
ximo commentedI'm on OS X and would like to learn command line CVS in the first place :)
I'm pretty sure I did it right, have you gotten a chance to check it out?
Thanks.
Comment #12
rconstantine commentedThis project's CVS entries are screwed up. It looks like yours got in there ok, but we're supposed to not do any more commits until things are fixed. I'll post a note here letting you guys know when that is.
Comment #13
rconstantine commentedComment #14
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.