From 9442227ce8c06a06e984b8da77bb1d72eaef1e49 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 24 Aug 2009 16:56:46 +0000 Subject: [PATCH] i18n the New Column and Value entries. Fixes #10817. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Form/DataTable.pm | 5 +++-- lib/WebGUI/i18n/English/Form_DataTable.pm | 13 +++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 07a76c656..6fcbf1f4c 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.7.19 + - fixed #10817: Datatable not internationalized - fixed #10816: Minor Capitalization Issue - fixed #10814: matrix translations - fixed Survey reporting of simple/transported results to csv/tab diff --git a/lib/WebGUI/Form/DataTable.pm b/lib/WebGUI/Form/DataTable.pm index 3ebe5678a..b5394f759 100644 --- a/lib/WebGUI/Form/DataTable.pm +++ b/lib/WebGUI/Form/DataTable.pm @@ -181,14 +181,15 @@ sub getDefaultValue { my $self = shift; my $value = $self->SUPER::getDefaultValue(@_); + my $i18n = WebGUI::International->new($self->session, 'Form_DataTable'); if ( !$value ) { $value = JSON->new->encode( { columns => [ { - key => "New Column", + key => $i18n->get('New Column'), formatter => "text", }, ], - rows => [ { "New Column" => "Value", }, ], + rows => [ { $i18n->get('New Column') => $i18n->get("Value"), }, ], } ); } diff --git a/lib/WebGUI/i18n/English/Form_DataTable.pm b/lib/WebGUI/i18n/English/Form_DataTable.pm index ad51bad68..edc027a27 100644 --- a/lib/WebGUI/i18n/English/Form_DataTable.pm +++ b/lib/WebGUI/i18n/English/Form_DataTable.pm @@ -139,6 +139,19 @@ our $I18N = { lastUpdated => 0, context => q{Button to delete a column, shown in the Edit Schema dialog}, }, + + "New Column" => { + message => q{New Column}, + lastUpdated => 0, + context => q{The name of a newly added column}, + }, + + "Value" => { + message => q{Value}, + lastUpdated => 0, + context => q{The name of a newly added value to a column}, + }, + }; 1;