From fa4fa75486e2e2e3cd1db1a918a5c281f7972fad Mon Sep 17 00:00:00 2001 From: Zhorken Date: Mon, 15 Mar 2010 23:24:29 -0400 Subject: [PATCH] Added language codes alongside the country codes. Language codes are ISO 639-1; country codes are ISO 3166-1 alpha-2. The country codes are important to keep for flags and stuff, I guess, but reporting the language code as a short form for the language is more correct. Gonna see if I can do that, I guess. I added the language codes mostly just because I was adding languages. --- pokedex/data/csv/languages.csv | 16 +++++++++------- pokedex/db/tables.py | 1 + 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pokedex/data/csv/languages.csv b/pokedex/data/csv/languages.csv index ff9b08f..a02fe0e 100644 --- a/pokedex/data/csv/languages.csv +++ b/pokedex/data/csv/languages.csv @@ -1,7 +1,9 @@ -id,iso3166,name -1,jp,Japanese -2,jp,Official Roomaji -3,kr,Korean -4,cn,Chinese -5,fr,French -6,de,German +id,iso639,iso3166,name +1,ja,jp,Japanese +2,ja,jp,Official Roomaji +3,ko,kr,Korean +4,zh,cn,Chinese +5,fr,fr,French +6,de,de,German +7,es,es,Spanish +8,it,it,Italian diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index 07e816f..a123231 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -163,6 +163,7 @@ class Item(TableBase): class Language(TableBase): __tablename__ = 'languages' id = Column(Integer, primary_key=True, nullable=False) + iso639 = Column(Unicode(2), nullable=False) iso3166 = Column(Unicode(2), nullable=False) name = Column(Unicode(16), nullable=False) -- 2.7.4