|
Lines 6-48
return {
Link Here
|
| 6 |
up => sub { |
6 |
up => sub { |
| 7 |
my ($args) = @_; |
7 |
my ($args) = @_; |
| 8 |
my ( $dbh, $out ) = @$args{qw(dbh out)}; |
8 |
my ( $dbh, $out ) = @$args{qw(dbh out)}; |
|
|
9 |
|
| 10 |
# Unique key on subtag + code.. use INSERT IGNORE |
| 9 |
$dbh->do(q{ |
11 |
$dbh->do(q{ |
| 10 |
INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) |
12 |
INSERT IGNORE INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) |
| 11 |
VALUES ( 'gd','gla' ) |
13 |
VALUES ( 'gd','gla' ) |
| 12 |
}); |
14 |
}); |
| 13 |
|
15 |
|
|
|
16 |
# Unique key on subtag + type.. use INSERT IGNORE |
| 14 |
$dbh->do(q{ |
17 |
$dbh->do(q{ |
| 15 |
INSERT INTO language_subtag_registry( subtag, type, description, added) |
18 |
INSERT IGNORE INTO language_subtag_registry( subtag, type, description, added) |
| 16 |
VALUES ( 'gd', 'language', 'Scottish Gaelic', NOW() ) |
19 |
VALUES ( 'gd', 'language', 'Scottish Gaelic', NOW() ) |
| 17 |
}); |
20 |
}); |
| 18 |
|
21 |
|
|
|
22 |
# Unique key on subtag + type + lang.. use INSERT IGNORE |
| 19 |
$dbh->do(q{ |
23 |
$dbh->do(q{ |
| 20 |
INSERT INTO language_descriptions(subtag, type, lang, description) |
24 |
INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) |
| 21 |
VALUES ( 'gd', 'language', 'en', 'Scottish Gaelic') |
25 |
VALUES ( 'gd', 'language', 'en', 'Scottish Gaelic') |
| 22 |
}); |
26 |
}); |
| 23 |
|
27 |
|
| 24 |
$dbh->do(q{ |
28 |
$dbh->do(q{ |
| 25 |
INSERT INTO language_descriptions(subtag, type, lang, description) |
29 |
INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) |
| 26 |
VALUES ( 'gd', 'language', 'en_GB', 'Scottish Gaelic') |
30 |
VALUES ( 'gd', 'language', 'en_GB', 'Scottish Gaelic') |
| 27 |
}); |
31 |
}); |
| 28 |
|
32 |
|
| 29 |
$dbh->do(q{ |
33 |
$dbh->do(q{ |
| 30 |
INSERT INTO language_descriptions(subtag, type, lang, description) |
34 |
INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) |
| 31 |
VALUES ( 'gd', 'language', 'gd', 'Gàidhlig') |
35 |
VALUES ( 'gd', 'language', 'gd', 'Gàidhlig') |
| 32 |
}); |
36 |
}); |
| 33 |
|
37 |
|
| 34 |
$dbh->do(q{ |
38 |
$dbh->do(q{ |
| 35 |
INSERT INTO language_descriptions(subtag, type, lang, description) |
39 |
INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) |
| 36 |
VALUES ( 'gd', 'language', 'fr', 'Gaélique écossais') |
40 |
VALUES ( 'gd', 'language', 'fr', 'Gaélique écossais') |
| 37 |
}); |
41 |
}); |
| 38 |
|
42 |
|
| 39 |
$dbh->do(q{ |
43 |
$dbh->do(q{ |
| 40 |
INSERT INTO language_descriptions(subtag, type, lang, description) |
44 |
INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) |
| 41 |
VALUES ( 'gd', 'language', 'de', 'Schottisch-Gälisch') |
45 |
VALUES ( 'gd', 'language', 'de', 'Schottisch-Gälisch') |
| 42 |
}); |
46 |
}); |
| 43 |
|
47 |
|
| 44 |
$dbh->do(q{ |
48 |
$dbh->do(q{ |
| 45 |
INSERT INTO language_descriptions(subtag, type, lang, description) |
49 |
INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) |
| 46 |
VALUES ( 'gd', 'language', 'pl', 'Język szkocki gaelicki') |
50 |
VALUES ( 'gd', 'language', 'pl', 'Język szkocki gaelicki') |
| 47 |
}); |
51 |
}); |
| 48 |
|
52 |
|
| 49 |
- |
|
|