pelias / pelias/api

unix locales

Open
#463 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ideas question
Dominant language
JavaScript
Stars
259
Forks
168
Avg merge
6h 15m
Merged PRs (30d)
1

Description

Could we use the linux locales to generate labels and valid postal addresses?

LC_ADDRESS
% This is the 14652 et_EE fddc-set definition for
% the LC_ADDRESS category.
%
% Define the appropriate representation of a postal address such as
% street and city. The proper formatting of a person's name and title
% is done with the "name_fmt" keyword of the LC_NAME category.
% The operand shall consist of a string, and can contain any combination
% of characters and field descriptors. In addition, the string can
% contain escape sequences defined below.
%
% %a    C/O address.
% %f    Firm name.
% %d    department name.
% %b    Building name
% %s    street name
% %h    house number or designation
% %N    if any graphical characters have been specified then an end of line is made.
% %t    if the preceding escape sequence resulted in an empty string, then the empty string, else a <space>
% %r    room number, door designation
% %e    floor number
% %C    country designation
% %z    zip number, postal code
% %T    town, city
% %c    country

postal_fmt    "<%><a><%><N>/
               <%><f><%><N>/
               <%><d><%><N>/
               <%><b><%><N>/
               <%><s><%><t><%><h><%><t><%><e><%><t><%><r><%><N>/
               <%><C><-><%><z><SP><%><T><%><N>/
               <%><c><%><N>"
%
country_name    "<E><e><s><t><i>"
country_post    "<E><E>"
country_ab2     "<E><E>"
country_ab3     "<E><S><T>"
country_num     233
country_car     "<E><S><T>"
country_isbn    "<9><9><8><5>"
lang_name       "<e><e><s><t><i><SP><k><e><e><l>"
lang_ab         "<e><t>"
lang_term       "<e><s><t>"
lang_lib        "<e><s><t>"
END LC_ADDRESS

http://www.eki.ee/itstandard/2000/LC_ADDRESS.shtml

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the LC_ADDRESS example and the linked specification to understand the requested locale fields and postal formatting rules. Compare those requirements with the API's current label and address behavior, then define done as generating locale-aware labels and valid postal addresses for supported locales.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
localization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.