From 328b58b46408bbd3ca7cb1f186f604d7bffff62e Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 16 Jun 2005 15:55:15 +0000 Subject: [PATCH] internationalize labels and javascript --- lib/WebGUI/Operation/FormHelpers.pm | 11 ++++++----- lib/WebGUI/i18n/English/WebGUI.pm | 30 +++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/lib/WebGUI/Operation/FormHelpers.pm b/lib/WebGUI/Operation/FormHelpers.pm index a4275418c..606e46222 100644 --- a/lib/WebGUI/Operation/FormHelpers.pm +++ b/lib/WebGUI/Operation/FormHelpers.pm @@ -50,17 +50,18 @@ sub www_richEditPageTree { my $f = WebGUI::HTMLForm->new(-action=>"#",-extras=>'name"linkchooser"'); $f->text( -name=>"url", - -label=>"URL", + -label=>WebGUI::International::get(104), -extras=>'id="url"' ); $f->selectList( -name=>"target", - -label=>"Target", - -options=>{"_self"=>"Open link in same window.","_blank"=>"Open link in new window."}, + -label=>WebGUI::International::get('target'), + -options=>{"_self"=>WebGUI::International::get('link in same window'), + "_blank"=>WebGUI::International::get('link in new window'), -extras=>'id="target"' ); $f->button( - -value=>"Done", + -value=>WebGUI::International::get('done'), -extras=>'onclick="createLink()"' ); WebGUI::Style::setScript($session{config}{extrasURL}."/tinymce/jscripts/tiny_mce/tiny_mce_popup.js",{type=>"text/javascript"}); @@ -70,7 +71,7 @@ sub www_richEditPageTree { function createLink() { if (window.opener) { if (document.getElementById("url").value == "") { - alert("You must enter a link url"); + alert('.WebGUI::International::get("link enter alert").'); document.getElementById("url").focus(); } window.opener.tinyMCE.insertLink("^" + "/" + ";" + document.getElementById("url").value,document.getElementById("target").value); diff --git a/lib/WebGUI/i18n/English/WebGUI.pm b/lib/WebGUI/i18n/English/WebGUI.pm index a6c49e8c3..4ca002912 100644 --- a/lib/WebGUI/i18n/English/WebGUI.pm +++ b/lib/WebGUI/i18n/English/WebGUI.pm @@ -2095,6 +2095,36 @@ Large sites using external group data will be making many calls to the external context => q|asset property| }, + 'target' => { + message => q|Target|, + lastUpdated => 1118936724, + context => q|form helper, rich edit page tree| + }, + + 'done' => { + message => q|Done|, + lastUpdated => 1118936724, + context => q|form helper, rich edit page tree| + }, + + 'link in same window' => { + message => q|Open link in same window.|, + lastUpdated => 1118936724, + context => q|form helper, rich edit page tree| + }, + + 'link in new window' => { + message => q|Open link in new window.|, + lastUpdated => 1118936724, + context => q|form helper, rich edit page tree| + }, + + 'link enter alert' => { + message => q|You must enter a link URL.|, + lastUpdated => 1118936724, + context => q|form helper, rich edit page tree| + }, + '412' => { message => q|Synopsis|, lastUpdated => 1031514049