From 93a2b996386c989bd28013332086f7489e7c7b52 Mon Sep 17 00:00:00 2001 From: Benjamin Kellermann Date: Wed, 20 Jan 2010 16:44:00 +0100 Subject: added localization support + german language --- index.cgi | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) (limited to 'index.cgi') diff --git a/index.cgi b/index.cgi index 6bd07aa..b5a2279 100755 --- a/index.cgi +++ b/index.cgi @@ -29,12 +29,12 @@ else exit end -$d = Dudle.new("Home") +$d = Dudle.new if $cgi.include?("create_poll") && $cgi.include?("poll_url") POLLTITLE=$cgi["create_poll"] if POLLTITLE == "" - createnotice = "Please enter a descriptive title." + createnotice = _("Please enter a descriptive title.") else if $cgi["poll_url"] == "" if POLLTITLE =~ /^[\w\-_]*$/ && !File.exist?(POLLTITLE) @@ -48,9 +48,9 @@ if $cgi.include?("create_poll") && $cgi.include?("poll_url") if !(POLLURL =~ /^[\w\-_]*$/) - createnotice = "Custom address may only contain letters, numbers, and dashes." + createnotice = _("Custom address may only contain letters, numbers, and dashes.") elsif File.exist?(POLLURL) - createnotice = "A Poll with this address already exists." + createnotice = _("A Poll with this address already exists.") else Dir.mkdir(POLLURL) Dir.chdir(POLLURL) VCS.init @@ -69,41 +69,50 @@ if $cgi.include?("create_poll") && $cgi.include?("poll_url") $d.html.header["status"] = "REDIRECT" $d.html.header["Cache-Control"] = "no-cache" $d.html.header["Location"] = SITEURL + POLLURL+ "/edit_columns.cgi" - $d << "The poll was created successfully. The link to your new poll is:
#{POLLURL}" + $d << _("The poll was created successfully. The link to your new poll is:") + "
#{POLLURL}" end end end unless $d.html.header["status"] == "REDIRECT" + $d << "

"+ _("Create New Poll") + "

" + + titlestr = _("Title") + typestr = _("Type") + timepollstr = _("Event Schedule Poll (e.g. schedule a meeting)") + normalpollstr = _("Normal Poll (e.g. vote for what is the best coffee)") + customaddrstr = _("Custom address (optional)") + customaddrhintstr = _("May contain letters, numbers, and dashes.") + + createstr = _("Create") $d << <Create New Poll
- +
- + - + - + - + - CREATE -- cgit v1.2.3
Type:#{typestr}: - +
- +
Custom address (optional): - May contain letters, numbers, and dashes.#{customaddrstr}: + #{customaddrhintstr}
+