summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-02-02 19:11:11 +0100
committerYorhel <git@yorhel.nl>2010-02-02 19:11:11 +0100
commit57a85d056e754cccec8ba338378f3852acaa2896 (patch)
tree24beee8237122b15dee74b9ad9c96d2c215802e5
parent1c0c4477f76dee105274aab7efe58b4381533b80 (diff)
Differentiate between pt-PT and pt-BR in the languages
As requested, http://vndb.org/t423
-rw-r--r--ChangeLog1
-rw-r--r--data/global.pl2
-rw-r--r--data/lang.txt16
-rw-r--r--data/style.css6
-rw-r--r--static/f/icons.pngbin9635 -> 9860 bytes
-rw-r--r--util/updates/update_2.11.sql11
6 files changed, 22 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 89760d0a..15f97488 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,7 @@ git - ?
- Remove sessions that haven't been used for more than a month
- Properly copy over search string on switching with the searchtabs
- Converted language columns in SQL to an ENUM type
+ - Differentiate between pt-PT and pt-BR
2.10 - 2010-01-10
- VN score on tag pages use plain averages instead of bayesian rating
diff --git a/data/global.pl b/data/global.pl
index 94d0aec8..0d58e9b4 100644
--- a/data/global.pl
+++ b/data/global.pl
@@ -31,7 +31,7 @@ our %S = (%S,
[qw| hist board boardmod edit tag mod lock del tagmod |], # 4
[qw| hist board boardmod edit tag mod lock del tagmod usermod |], # 5
],
- languages => [qw|cs da de en es fi fr hu it ja ko nl no pl pt ru sk sv tr vi zh|],
+ languages => [qw|cs da de en es fi fr hu it ja ko nl no pl pt-br pt-pt ru sk sv tr vi zh|],
producer_types => [qw|co in ng|],
discussion_boards => [qw|an db v p u|],
vn_lengths => [ 0..5 ],
diff --git a/data/lang.txt b/data/lang.txt
index 0b99abae..5a77ccf0 100644
--- a/data/lang.txt
+++ b/data/lang.txt
@@ -291,11 +291,17 @@ ru : Польский
cs : Polsky
hu : Lengyel
-:_lang_pt
-en : Portuguese
-ru : Португальский
-cs : Portugalsky
-hu : Portugál
+:_lang_pt-br
+en : Portuguese (Brazil)
+ru*: Португальский
+cs*: Portugalsky
+hu*: Portugál
+
+:_lang_pt-pt
+en : Portuguese (Portugal)
+ru*: Португальский
+cs*: Portugalsky
+hu*: Portugál
:_lang_ru
en : Russian
diff --git a/data/style.css b/data/style.css
index d93237f6..50f50689 100644
--- a/data/style.css
+++ b/data/style.css
@@ -1194,8 +1194,6 @@ a .icons { cursor: pointer }
.icons.nes { background-position: -32px -70px; }
.icons.dos { background-position: -32px -84px; }
-.icons.sk { background-position: -35px -99px; }
-
.icons.cs { background-position: -48px 0px; }
.icons.da { background-position: -48px -11px; }
.icons.de { background-position: -48px -22px; }
@@ -1206,17 +1204,19 @@ a .icons { cursor: pointer }
.icons.it { background-position: -48px -77px; }
.icons.ja { background-position: -48px -88px; }
.icons.hu { background-position: -48px -99px; }
+.icons.pt-br { background-position: -48px -110px; }
.icons.nl { background-position: -61px 0px; }
.icons.no { background-position: -61px -11px; }
.icons.pl { background-position: -61px -22px; }
-.icons.pt { background-position: -61px -33px; }
+.icons.pt-pt { background-position: -61px -33px; }
.icons.ru { background-position: -61px -44px; }
.icons.sv { background-position: -61px -55px; }
.icons.tr { background-position: -61px -66px; }
.icons.zh { background-position: -61px -77px; }
.icons.ko { background-position: -61px -88px; }
.icons.vi { background-position: -61px -99px; }
+.icons.sk { background-position: -61px -110px; }
/* Relation graph colors */
diff --git a/static/f/icons.png b/static/f/icons.png
index 58a4ab97..4437300b 100644
--- a/static/f/icons.png
+++ b/static/f/icons.png
Binary files differ
diff --git a/util/updates/update_2.11.sql b/util/updates/update_2.11.sql
index f9601ce7..4b5f076c 100644
--- a/util/updates/update_2.11.sql
+++ b/util/updates/update_2.11.sql
@@ -30,24 +30,25 @@ ALTER TABLE threads_boards DROP COLUMN lastread;
-- languages -> ENUM
-CREATE TYPE language AS ENUM('cs', 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja', 'ko', 'nl', 'no', 'pl', 'pt', 'ru', 'sk', 'sv', 'tr', 'vi', 'zh');
+CREATE TYPE language AS ENUM('cs', 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja', 'ko', 'nl', 'no', 'pl', 'pt-pt', 'pt-br', 'ru', 'sk', 'sv', 'tr', 'vi', 'zh');
ALTER TABLE producers_rev ALTER COLUMN lang DROP DEFAULT;
-ALTER TABLE producers_rev ALTER COLUMN lang TYPE language USING lang::language;
+ALTER TABLE producers_rev ALTER COLUMN lang TYPE language USING CASE lang WHEN 'pt' THEN 'pt-pt' ELSE lang::language END;
ALTER TABLE producers_rev ALTER COLUMN lang SET DEFAULT 'ja';
-ALTER TABLE releases_lang ALTER COLUMN lang TYPE language USING lang::language;
+ALTER TABLE releases_lang ALTER COLUMN lang TYPE language USING CASE lang WHEN 'pt' THEN 'pt-pt' ELSE lang::language END;
-- c_languages is an now array of languages, rather than a serialized string
ALTER TABLE vn ALTER COLUMN c_languages DROP DEFAULT;
-ALTER TABLE vn ALTER COLUMN c_languages TYPE language[] USING coalesce(string_to_array(c_languages, '/')::language[], '{}');
+ALTER TABLE vn ALTER COLUMN c_languages TYPE language[] USING '{}';
ALTER TABLE vn ALTER COLUMN c_languages SET DEFAULT '{}';
-
ALTER TABLE changes ADD COLUMN ihid boolean NOT NULL DEFAULT FALSE;
ALTER TABLE changes ADD COLUMN ilock boolean NOT NULL DEFAULT FALSE;
\i util/sql/func.sql
+SELECT COUNT(*) FROM (SELECT update_vncache(id) FROM vn) x;
+
CREATE TRIGGER hidlock_update BEFORE UPDATE ON vn FOR EACH ROW EXECUTE PROCEDURE update_hidlock();
CREATE TRIGGER hidlock_update BEFORE UPDATE ON producers FOR EACH ROW EXECUTE PROCEDURE update_hidlock();
CREATE TRIGGER hidlock_update BEFORE UPDATE ON releases FOR EACH ROW EXECUTE PROCEDURE update_hidlock();