[NUUG fiksgatami] [patch] Make web GUI easier to translate
Petter Reinholdtsen
pere at hungry.com
Fri Feb 25 10:49:00 CET 2011
The submit buttons in the web GUI labeled "Go" mean two different
things. Two appear to start a search and one submit a survey answer.
I suggest renaming these buttons to make it more obvious what they do,
and to make it possible to sensibly translate their label. I tried
translating it as 'Search', but discovered that the confirm button
then got a meaningless label.
I suggest renaming them to 'Search' and 'Submit' to make it easier to
translate them. Here is patch implementing my proposed change.
diff --git a/web/alert.cgi b/web/alert.cgi
index dd46766..51a9556 100755
--- a/web/alert.cgi
+++ b/web/alert.cgi
@@ -386,7 +386,7 @@ postcode or street name and area:');
my $form_action = Cobrand::url(Page::get_cobrand($q), '/alert', $q);
my $cobrand_form_elements = Cobrand::form_elements($cobrand, 'alerts', $q);
my $cobrand_extra_data = Cobrand::extra_data($cobrand, $q);
- my $submit_text = _('Go');
+ my $submit_text = _('Search');
my $out = $q->h1($header);
$out .= $q->p($intro);
diff --git a/web/confirm.cgi b/web/confirm.cgi
index 925b64e..b4290e6 100755
--- a/web/confirm.cgi
+++ b/web/confirm.cgi
@@ -189,7 +189,7 @@ sub ask_questionnaire {
my $qn_thanks = _("Thanks, glad to hear it's been fixed! Could we just ask if you have ever reported a problem to a council before?");
my $yes = _('Yes');
my $no = _('No');
- my $go = _('Go');
+ my $go = _('Submit');
my $form_action = Cobrand::url($cobrand, "/confirm", $q);
my $form_extra_elements = Cobrand::form_elements($cobrand, 'questionnaire', $q);
my $out = <<EOF;
diff --git a/web/index.cgi b/web/index.cgi
index ed5b285..c5f3e78 100755
--- a/web/index.cgi
+++ b/web/index.cgi
@@ -163,7 +163,7 @@ sub front_page {
EOF
}
}
- my $activate = _("Go");
+ my $activate = _('Search');
$out .= <<EOF;
<label for="pc">$question:</label>
<input type="text" name="pc" value="$pc_h" id="pc" size="10" maxlength="200">
Happy hacking,
--
Petter Reinhodltsen
More information about the fiksgatami
mailing list