summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/classes/Form.class.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-03-11 19:38:44 +0545
committerPhil Davis <phil.davis@inf.org>2016-03-11 19:38:44 +0545
commit74bd7993ceec9ef63a2f189f68879bb84209c713 (patch)
treedabf2ae60c4fffbbc14a16e44ab06574d2d15ded /src/usr/local/www/classes/Form.class.php
parent418695882980cce2450e97608ee0864885208250 (diff)
downloadpfsense-74bd7993ceec9ef63a2f189f68879bb84209c713.zip
pfsense-74bd7993ceec9ef63a2f189f68879bb84209c713.tar.gz
Translate the default submit button text
Note: This will cause a problem for some code that does comparisons expecting this text to be exactly the string 'Save'. If the user has selected a different language then the button text will be translated and thus will be some different text. That is discussed in forum https://forum.pfsense.org/index.php?topic=108116.0 I will followup with another pull request to fix the things I can find like that.
Diffstat (limited to 'src/usr/local/www/classes/Form.class.php')
-rw-r--r--src/usr/local/www/classes/Form.class.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/usr/local/www/classes/Form.class.php b/src/usr/local/www/classes/Form.class.php
index 0446541..2285865 100644
--- a/src/usr/local/www/classes/Form.class.php
+++ b/src/usr/local/www/classes/Form.class.php
@@ -41,8 +41,9 @@ class Form extends Form_Element
public function __construct($submit = null)
{
- if (!isset($submit))
- $submit = 'Save';
+ if (!isset($submit)) {
+ $submit = gettext('Save');
+ }
if (gettype($submit) == 'string') {
$submit = new Form_Button(
@@ -123,4 +124,4 @@ class Form extends Form_Element
</form>
EOT;
}
-} \ No newline at end of file
+}
OpenPOWER on IntegriCloud