From 263cc56175ab14fd43324c7bca9f5cbcd0401979 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 4 Nov 2009 15:50:46 -0800 Subject: [PATCH] i18n the Survey Edit console. Button labels the dialog title bar. Fixes bug #11197 --- docs/changelog/7.x.x.txt | 1 + ...ot_import_survey_default-survey-edit.wgpkg | Bin 0 -> 2066 bytes lib/WebGUI/i18n/English/Asset_Survey.pm | 75 +++++++++++------- www/extras/wobject/Survey/editsurvey.js | 24 ++++-- 4 files changed, 65 insertions(+), 35 deletions(-) create mode 100644 docs/upgrades/packages-7.8.4/root_import_survey_default-survey-edit.wgpkg diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index da4bc0635..7acf173ed 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -3,6 +3,7 @@ - fixed #11198: Typo in i18n - fixed #11202: USPS driver does not log authentication errors - fixed #10985: Survey: can't add multiple choice answer + - fixed #11197: Survey Edit Console is not i18n'ed 7.8.3 - Rewrote Spectre's workflow queues to prevent it from "forgetting" about some workflows. diff --git a/docs/upgrades/packages-7.8.4/root_import_survey_default-survey-edit.wgpkg b/docs/upgrades/packages-7.8.4/root_import_survey_default-survey-edit.wgpkg new file mode 100644 index 0000000000000000000000000000000000000000..bfcde892d699ad2e4da6d59fec9576c98926522f GIT binary patch literal 2066 zcmV+t2<`VDiwFP!00000|Ls|AbK5o&_UHZzo<7LwOek2EWYvn|PA)Hvr-{c`+ev%p zYX%}=5itcY04PwmumKoZcKRmsxKeTY7g6ahTD*j)hoEE@;={~aA2b-SH|1ARYf zn|rej_n`V69WC@_%Fh zs_#O=f4+l7SW{$_rC5sZ2=h#xgSbNLkD$2K2}^ z$SLEQq>FIm4<+zhg5zsEl$SWV2RKk@MkJpwB5q(=pPM#c*_q)B1F@7u6@z~I<>ul| zq|*3i$g}XvFYj{x>D3FTVJ=dmwBTGJI@0q;G8bbqMKQUipmx3#&J+YdcnvacYe8iHLW2UcphS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Tmn7^84~vhm>4*HoKR;fE>5$9#^4BlFwXVM=Lzmi9c{P=g zfX}DxhA@;oq~<03z`V?->Sf%^eBqvD8OPn@P8+zTlL+JpC~Ki!XTUDLDss`Cv@Y1s wr=vIRU+GIvy^3BG`sq*Ze}4DpE q|Description of a template variable for a template Help page.|, lastUpdated => 1149654771, }, - + response_feedback_url => { message => q|The URL of the individual response feedback page.|, context => q|Description of a template variable for a template Help page.|, lastUpdated => 0, }, - + response_id => { message => q|The unique ID of the response.|, context => q|Description of a template variable for a template Help page.|, lastUpdated => 0, }, - + response_userId => { message => q|The userId of the user that completed the response.|, context => q|Description of a template variable for a template Help page.|, lastUpdated => 0, }, - + response_ip => { message => q|The IP Address of the user that completed the response.|, context => q|Description of a template variable for a template Help page.|, lastUpdated => 0, }, - + response_startDate => { message => q|The Start Date of the response.|, context => q|Description of a template variable for a template Help page.|, lastUpdated => 0, }, - + response_endDate => { message => q|The End Date of the response.|, context => q|Description of a template variable for a template Help page.|, @@ -981,7 +981,7 @@ directly inside the answer_loop for other types of questions.|, message => q|A boolean flag indicating whether the Survey Response completed|, lastUpdated => 1242180657, }, - + 'responseId help' => { message => q|The unique GUID for the response|, lastUpdated => 1242180657, @@ -1031,7 +1031,7 @@ directly inside the answer_loop for other types of questions.|, message => q|All data tagged in survey expressions is also made available as template variables|, lastUpdated => 1242180657, }, - + 'survey test results template title' => { message => q|Survey Test Results Template Variables|, lastUpdated => 1242256111, @@ -1579,117 +1579,132 @@ section/answer.|, context => q|Finish button label on Take Survey page|, lastUpdated => 0, }, - + 'add a test' => { message => q{Add a test}, lastUpdated => 0, }, - + 'confirm delete test' => { message => q{Are you sure you want to delete this test?}, lastUpdated => 0, }, - + 'test suite' => { message => q{Test Suite}, lastUpdated => 0, }, - + 'edit test' => { message => q{Edit Test}, lastUpdated => 0, }, - + 'run test' => { message => q{Run Test}, lastUpdated => 0, }, - + 'test name' => { message => q{Test Name}, lastUpdated => 0, }, - + 'tests run' => { message => q{Tests Run}, lastUpdated => 0, }, - + 'test name help' => { message => q{A descriptive name for this test}, lastUpdated => 0, }, - + 'test spec' => { message => q{Test Spec}, lastUpdated => 0, }, - + 'test spec help' => { message => q{The JSON-encoded specification for your test(s)}, lastUpdated => 0, }, - + 'run all tests' => { message => q{Run All Tests}, lastUpdated => 0, }, - + 'pass' => { message => q{Pass}, lastUpdated => 0, }, - + 'fail' => { message => q{Fail}, lastUpdated => 0, }, - + 'test results template' => { message => q{Test Results Template}, lastUpdated => 0, }, - + 'test results template help' => { message => q{Template used to display individual test and aggregate test results}, lastUpdated => 0, }, - + 'test results' => { message => q{Test Results}, lastUpdated => 0, }, - + 'test result' => { message => q{Test Result}, lastUpdated => 0, }, - + 'details' => { message => q{Details}, lastUpdated => 0, }, - + 'tests passed' => { message => q{Tests Passed}, lastUpdated => 0, }, - + 'tests failed' => { message => q{Tests Failed}, lastUpdated => 0, }, - + 'start date' => { message => q{Start Date}, lastUpdated => 0, }, - + 'end date' => { message => q{End Date}, lastUpdated => 0, }, + 'Add Question' => { + message => q{Add Question}, + lastUpdated => 0, + }, + + 'Add Answer' => { + message => q{Add Answer}, + lastUpdated => 0, + }, + + 'Survey Objects' => { + message => q{Survey Objects}, + lastUpdated => 0, + }, + }; 1; diff --git a/www/extras/wobject/Survey/editsurvey.js b/www/extras/wobject/Survey/editsurvey.js index 8fa8f98c4..624d7b9a8 100644 --- a/www/extras/wobject/Survey/editsurvey.js +++ b/www/extras/wobject/Survey/editsurvey.js @@ -99,7 +99,7 @@ Survey.Data = (function(){ draggable: true }); - Survey.Data.ddContainer.setHeader("Survey Objects..."); + Survey.Data.ddContainer.setHeader(Survey.i18n.get('Asset_Survey','Survey Objects'); Survey.Data.ddContainer.setBody(d.ddhtml); Survey.Data.ddContainer.setFooter(document.getElementById("buttons")); Survey.Data.ddContainer.render(); @@ -146,7 +146,7 @@ Survey.Data = (function(){ if (!sButton) { sButton = new YAHOO.widget.Button({ - label: "Add Section", + label: Survey.i18n.get('Asset_Survey','Add Section'), id: "addSection", container: "addSection" }); @@ -155,7 +155,7 @@ Survey.Data = (function(){ if (!qButton) { qButton = new YAHOO.widget.Button({ - label: "Add Question", + label: Survey.i18n.get('Asset_Survey', 'Add Question'), id: "addQuestion", container: "addQuestion" }); @@ -212,6 +212,20 @@ Survey.Data = (function(){ // Initialize survey YAHOO.util.Event.onDOMReady(function(){ //var ddTarget = new YAHOO.util.DDTarget("sections", "sections"); - Survey.Comm.loadSurvey(); - Survey.ObjectTemplate.initObjectEditor(); + Survey.i18n = new WebGUI.i18n( { + 'namespaces' : { + 'Asset_Survey' : [ + 'Add Question', + 'Add Answer', + 'Add Section', + 'Survey Objects' + ] + }, + onpreload : { + fn : function () { + Survey.Comm.loadSurvey(); + Survey.ObjectTemplate.initObjectEditor(); + } + } + } ); });