Spanish address format
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- localization
Research direction
Start with the linked Spain address-format data and review how libaddressinput handles %n, optional fields, and the admin1 field. Resolve which formatting behavior is intended before changing the format; done means Spanish addresses render the province appropriately when it is present or absent.
Written by the indexing model from the issue text.
Description
The address format for Spain is currently as follows:
"fmt":"%N%n%O%n%A%n%Z %C %S"
It looks wrong to me to have the province (%S) separated by a space. Instead, one of the following changes would make most sense:
- Put it in parentheses. That appears to be the more idiomatic formatting, but it seems to make it harder to make the province be optional.
- Add an optional field fmt_admin1 which, when present, indicates a format to use for the admin1 field if present. Then set fmt_admin1 to "(%S)" for Spain.
- Make it a newline (%n) instead of a space. This is a simple fix that libaddressinput supports and that is also supported by the postal service.
Regarding the first point, out in the wild, a well-formatted Spanish address seems to leave out the province if it's obvious. For example, for the city of Barcelona, one would write Barcelona by itself rather than write "Barcelona (Barcelona)". For that reason, it may be problematic to make the format string as simple as "%N%n%O%n%A%n%Z %C (%S)". When the admin1 is not present, the address would end up with empty parentheses.
- Dominant language
- C++
- Stars
- 629
- Forks
- 109
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from google/libaddressinput
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
google/libaddressinput#255 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
google/libaddressinput#245 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 64/100
google/libaddressinput#254 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 52/100
google/libaddressinput#250 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
google/libaddressinput#249 ·
All issues in google/libaddressinput
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gavinlouuu-kpt/mib-studio-qt#517 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
EchoTools/nevr-runtime#116 ·
Maintainers usually reply within 1 day
-
code-quality libc++
Difficulty 1/5 Under an hour Newbie friendliness 82/100
llvm/llvm-project#229284 ·
Maintainers usually reply within 1 day
-
test-issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
llvm/offload-test-suite#1557 ·
Maintainers usually reply within 1 day