Skip to content

Commit

Permalink
[Wales] Translate party names.
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Jul 5, 2023
1 parent 68d29f0 commit bb25a4d
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 5 deletions.
3 changes: 2 additions & 1 deletion classes/People.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ private function _get_data_by_group($args) {
if (!isset($data[$p_id])) {
$name = member_full_name($this->house, $row['title'], $row['given_name'], $row['family_name'], $row['lordofname']);
$constituency = $row['constituency'] ? gettext($row['constituency']) : '';
$party = $row['party'] ? gettext($row['party']) : '';
$url = make_member_url($name, $constituency, $this->house, $p_id);
$narray = array (
'person_id' => $p_id,
Expand All @@ -221,7 +222,7 @@ private function _get_data_by_group($args) {
'name' => $name,
'url' => $url,
'constituency' => $constituency,
'party' => $row['party'],
'party' => $party,
'left_reason' => $row['left_reason'],
);
$data[$p_id] = $narray;
Expand Down
22 changes: 21 additions & 1 deletion locale/TheyWorkForYou.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-27 12:21+0100\n"
"POT-Creation-Date: 2023-07-05 12:13+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -392,6 +392,26 @@ msgstr ""
msgid "South Wales West"
msgstr ""

#: locale/welsh-parties.php:2
msgid "Conservative"
msgstr ""

#: locale/welsh-parties.php:3
msgid "Independent"
msgstr ""

#: locale/welsh-parties.php:4
msgid "Labour"
msgstr ""

#: locale/welsh-parties.php:5
msgid "Liberal Democrat"
msgstr ""

#: locale/welsh-parties.php:6
msgid "Plaid Cymru"
msgstr ""

#: scripts/alertmailer.php:116
msgid "Commons debate"
msgstr ""
Expand Down
22 changes: 21 additions & 1 deletion locale/cy_GB.UTF-8/LC_MESSAGES/TheyWorkForYou.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-27 12:21+0100\n"
"POT-Creation-Date: 2023-07-05 12:13+0100\n"
"PO-Revision-Date: 2023-03-20 17:59-0000\n"
"Language-Team: mySociety\n"
"Language: fr\n"
Expand Down Expand Up @@ -377,6 +377,26 @@ msgstr "Dwyrain De Cymru"
msgid "South Wales West"
msgstr "Gorllewin De Cymru"

#: locale/welsh-parties.php:2
msgid "Conservative"
msgstr "Ceidwadwyr"

#: locale/welsh-parties.php:3
msgid "Independent"
msgstr "Annibynnol"

#: locale/welsh-parties.php:4
msgid "Labour"
msgstr "Llafur"

#: locale/welsh-parties.php:5
msgid "Liberal Democrat"
msgstr "Democratiaid Rhyddfrydol"

#: locale/welsh-parties.php:6
msgid "Plaid Cymru"
msgstr "Plaid Cymru"

#: scripts/alertmailer.php:116
msgid "Commons debate"
msgstr "Dadl Tŷ'r Cyffredin"
Expand Down
6 changes: 6 additions & 0 deletions locale/welsh-parties.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
gettext("Conservative"),
gettext("Independent"),
gettext("Labour"),
gettext("Liberal Democrat"),
gettext("Plaid Cymru"),
2 changes: 1 addition & 1 deletion www/includes/easyparliament/hansardlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -2141,7 +2141,7 @@ public function _get_speaker($person_id, $hdate, $htime, $major) {
"name" => $name,
'house' => $member['house'],
"constituency" => $member["constituency"] ? gettext($member["constituency"]) : '',
"party" => $member["party"],
"party" => $member["party"] ? gettext($member["party"]) : '',
"person_id" => $person_id,
"url" => $URL->generate(),
);
Expand Down
2 changes: 1 addition & 1 deletion www/includes/easyparliament/member.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public function __construct($args) {
$this->houses[] = $house;
}
$const = $row['constituency'] ? gettext($row['constituency']) : '';
$party = $row['party'];
$party = $row['party'] ? gettext($row['party']) : '';
$entered_house = $row['entered_house'];
$left_house = $row['left_house'];
$entered_reason = $row['entered_reason'];
Expand Down

0 comments on commit bb25a4d

Please sign in to comment.