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 --- edit_columns.rb | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'edit_columns.rb') diff --git a/edit_columns.rb b/edit_columns.rb index cc41046..101ca29 100755 --- a/edit_columns.rb +++ b/edit_columns.rb @@ -27,11 +27,11 @@ revbeforeedit = VCS.revno if $cgi.include?("undo_revision") && $cgi["undo_revision"].to_i < revbeforeedit undorevision = $cgi["undo_revision"].to_i - $d = Dudle.new("Edit Columns",undorevision) + $d = Dudle.new(undorevision) comment = $cgi.include?("redo") ? "Redo changes" : "Reverted Poll" $d.table.store("#{comment} to version #{undorevision}") else - $d = Dudle.new("Edit Columns") + $d = Dudle.new end $d.table.edit_column($cgi["columnid"],$cgi["new_columnname"],$cgi) if $cgi.include?("new_columnname") @@ -41,10 +41,8 @@ $d.wizzard_redirect revno = VCS.revno -$d << <Add and Remove Columns -#{$d.table.edit_column_htmlform($cgi["editcolumn"],revno)} -HTML +$d << "

" + _("Add and Remove Columns") + "

" +$d << $d.table.edit_column_htmlform($cgi["editcolumn"],revno) h = VCS.history urevs = h.undorevisions @@ -63,11 +61,11 @@ if urevs.max coltitle,action = urevs.max.comment.scan(/^Column (.*) (added|deleted|edited)$/).flatten case action when "added" - title["Undo"] = "Delete column #{coltitle}" + title["Undo"] = _("Delete column") + " #{coltitle}" when "deleted" - title["Undo"] = "Add column #{coltitle}" + title["Undo"] = _("Add column") + " #{coltitle}" when "edited" - title["Undo"] = "Edit column #{coltitle}" + title["Undo"] = _("Edit column") + " #{coltitle}" end curundorev = urevs.max.rev() +1 if rrevs.min @@ -80,11 +78,11 @@ if rrevs.min coltitle,action = rrevs.min.comment.scan(/^Column (.*) (added|deleted|edited)$/).flatten case action when "added" - title["Redo"] = "Add column #{coltitle}" - when "deleted" - title["Redo"] = "Delete column #{coltitle}" - when "edited" - title["Redo"] = "Edit column #{coltitle}" + title["Redo"] = _("Add column") + " #{coltitle}" + when "deleted" + title["Redo"] = _("Delete column") + " #{coltitle}" + when "edited" + title["Redo"] = _("Edit column") + " #{coltitle}" end hidden["Redo"] = "" @@ -92,15 +90,16 @@ end $d << < - +
UNDOREDOREADY + localstr = {"Undo" => _("Undo"), "Redo" => _("Redo")} ["Undo","Redo"].each{|button| $d << <
- + #{hidden["common"]} #{hidden[button]} -- cgit v1.2.3