From 2fdb15cb8e59e20731bfaaf8b6076884316fd2c3 Mon Sep 17 00:00:00 2001 From: nbm Date: Tue, 28 Mar 2006 08:45:02 +0000 Subject: [PATCH] Improve marking up of translatable text. --- plugins/ktcore/KTDocumentActions.php | 6 +++--- plugins/ktcore/KTPermissions.php | 2 +- plugins/ktcore/admin/documentFields.php | 8 ++++---- plugins/ktcore/admin/plugins.php | 4 ++-- plugins/ktcore/admin/unitManagement.php | 4 ++-- plugins/ktcore/authentication/authenticationadminpage.inc.php | 4 ++-- plugins/ktcore/document/Rename.php | 2 +- plugins/ktcore/folder/BulkUpload.php | 2 +- plugins/ktcore/folder/Rename.php | 2 +- plugins/ktcore/folder/addDocument.php | 2 +- templates/kt3/browse_lookup_selection.smarty | 4 ++-- templates/kt3/browse_types.smarty | 4 ++-- templates/ktcore/authentication/manage.smarty | 2 +- templates/ktcore/dashlets/admintutorial.smarty | 2 +- templates/ktcore/document/admin/expungeconfirmlist.smarty | 2 +- templates/ktcore/document/document_permissions.smarty | 4 ++-- templates/ktcore/folder/permissions.smarty | 2 +- templates/ktcore/help_with_edit.smarty | 4 ++-- templates/ktcore/javascript_i18n.smarty | 14 +++++++------- templates/ktcore/manage_help.smarty | 6 +++--- templates/ktcore/metadata/conditional/manageConditional.smarty | 4 ++-- templates/ktcore/metadata/editField.smarty | 4 ++-- templates/ktcore/principals/deleteunit.smarty | 2 +- templates/ktcore/principals/editgroup.smarty | 2 +- templates/ktcore/principals/groupadmin.smarty | 2 +- templates/ktcore/principals/password.smarty | 2 +- templates/ktcore/principals/preferences.smarty | 2 +- templates/ktcore/workflow/editState.smarty | 2 +- templates/ktstandard/authentication/ldapsearchgroup.smarty | 2 +- templates/ktstandard/authentication/ldapsearchuser.smarty | 2 +- 30 files changed, 52 insertions(+), 52 deletions(-) diff --git a/plugins/ktcore/KTDocumentActions.php b/plugins/ktcore/KTDocumentActions.php index bdab3c0..9f43674 100644 --- a/plugins/ktcore/KTDocumentActions.php +++ b/plugins/ktcore/KTDocumentActions.php @@ -135,7 +135,7 @@ class KTDocumentCheckOutAction extends KTDocumentAction { function do_checkout() { $aErrorOptions = array( 'redirect_to' => array('','fDocumentId=' . $this->oDocument->getId()), - 'message' => "You must provide a reason" + 'message' => _kt("You must provide a reason"), ); $oTemplate =& $this->oValidator->validateTemplate('ktcore/action/checkout_final'); @@ -845,7 +845,7 @@ class KTDocumentArchiveAction extends KTDocumentAction { $aErrorOptions = array( 'redirect_to' => array('','fDocumentId=' . $this->oDocument->getId()), - 'message' => "You must provide a reason" + 'message' => _kt("You must provide a reason"), ); $sReason = $this->oValidator->validateString(KTUtil::arrayGet($_REQUEST, 'reason'), $aErrorOptions); @@ -954,7 +954,7 @@ class KTDocumentWorkflowAction extends KTDocumentAction { $aErrorOptions = array( 'redirect_to' => array('main', sprintf('fDocumentId=%d', $_REQUEST['fDocumentId'])), - 'message' => 'You must provide a reason for the transition' + 'message' => _kt('You must provide a reason for the transition'), ); $sComments =& $this->oValidator->validateString($_REQUEST['fComments'], $aErrorOptions); diff --git a/plugins/ktcore/KTPermissions.php b/plugins/ktcore/KTPermissions.php index 9046c64..7459217 100644 --- a/plugins/ktcore/KTPermissions.php +++ b/plugins/ktcore/KTPermissions.php @@ -635,4 +635,4 @@ class KTDocumentRolesAction extends KTDocumentAction { ); return $oTemplate->render($aTemplateData); } -} \ No newline at end of file +} diff --git a/plugins/ktcore/admin/documentFields.php b/plugins/ktcore/admin/documentFields.php index 2878d06..d61615a 100755 --- a/plugins/ktcore/admin/documentFields.php +++ b/plugins/ktcore/admin/documentFields.php @@ -173,7 +173,7 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher { $sName = $this->oValidator->validateEntityName("KTFieldset", $_REQUEST['name'], $aErrorOptions); $sDescription = $this->oValidator->validateString(KTUtil::arrayGet($_REQUEST, 'description'), - KTUtil::meldOptions($aErrorOptions, array('message' => "You must provide a description"))); + KTUtil::meldOptions($aErrorOptions, array('message' => _kt("You must provide a description")))); $sNamespace = KTUtil::arrayGet($_REQUEST, 'namespace'); @@ -224,7 +224,7 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher { unset($aErrorOptions['condition']); $sDescription = $this->oValidator->validateString(KTUtil::arrayGet($_REQUEST, 'description'), - KTUtil::meldOptions($aErrorOptions, array('message' => "You must provide a description"))); + KTUtil::meldOptions($aErrorOptions, array('message' => _kt("You must provide a description")))); $oFieldset = KTFieldset::get($_REQUEST['fFieldsetId']); @@ -288,7 +288,7 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher { ); $sName = $this->oValidator->validateString(KTUtil::arrayGet($_REQUEST, 'name'), - KTUtil::meldOptions($aErrorOptions, array('message' => "You must provide a name"))); + KTUtil::meldOptions($aErrorOptions, array('message' => _kt("You must provide a name")))); $aErrorOptions['condition'] = array('parent_fieldset' => $oFieldset->getId()); $aErrorOptions['rename'] = $oField->getId(); @@ -297,7 +297,7 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher { unset($aErrorOptions['rename']); $sDescription = $this->oValidator->validateString(KTUtil::arrayGet($_REQUEST, 'description'), - KTUtil::meldOptions($aErrorOptions, array('message' => "You must provide a description"))); + KTUtil::meldOptions($aErrorOptions, array('message' => _kt("You must provide a description")))); $oField->setName($_REQUEST['name']); $oField->setDescription($sDescription); diff --git a/plugins/ktcore/admin/plugins.php b/plugins/ktcore/admin/plugins.php index 0398dba..4107ac7 100755 --- a/plugins/ktcore/admin/plugins.php +++ b/plugins/ktcore/admin/plugins.php @@ -65,12 +65,12 @@ class KTPluginDispatcher extends KTAdminDispatcher { $sTable = KTUtil::getTableName('plugins'); $aIds = (array) KTUtil::arrayGet($_REQUEST, 'pluginids'); KTPluginEntity::setEnabled($aIds); - $this->successRedirectToMain('Plugins updated'); + $this->successRedirectToMain(_kt('Plugins updated')); } function do_reread() { KTPluginUtil::registerPlugins(); - $this->successRedirectToMain('Plugins read from the filesystem'); + $this->successRedirectToMain(_kt('Plugins read from the filesystem')); } } diff --git a/plugins/ktcore/admin/unitManagement.php b/plugins/ktcore/admin/unitManagement.php index 462bfb6..1ddc1a7 100755 --- a/plugins/ktcore/admin/unitManagement.php +++ b/plugins/ktcore/admin/unitManagement.php @@ -178,7 +178,7 @@ class KTUnitAdminDispatcher extends KTAdminDispatcher { 'name' => $sName, 'folderid' => $oFolder->getId(), )); - return $this->successRedirectToMain('Unit created'); + return $this->successRedirectToMain(_kt('Unit created')); } function do_editUnit() { @@ -255,7 +255,7 @@ class KTUnitAdminDispatcher extends KTAdminDispatcher { KTFolderUtil::delete($oFolder, $this->oUser, "Unit deleted", $aOptions); } } - $this->successRedirectToMain("Unit removed"); + $this->successRedirectToMain(_kt("Unit removed")); } } diff --git a/plugins/ktcore/authentication/authenticationadminpage.inc.php b/plugins/ktcore/authentication/authenticationadminpage.inc.php index 49a4c59..4458d8e 100644 --- a/plugins/ktcore/authentication/authenticationadminpage.inc.php +++ b/plugins/ktcore/authentication/authenticationadminpage.inc.php @@ -150,11 +150,11 @@ class KTAuthenticationAdminPage extends KTAdminDispatcher { $oSource->setAuthenticationProvider($authentication_provider); $res = $oSource->update(); $aOptions = array( - 'message' => 'Update failed', + 'message' => _kt('Update failed'), 'redirect_to' => array('editsource', sprintf('source_id=%d', $oSource->getId())), ); $this->oValidator->notErrorFalse($res, $aOptions); - $this->successRedirectTo('viewsource', 'Details updated', sprintf('source_id=%d', $oSource->getId())); + $this->successRedirectTo('viewsource', _kt('Details updated'), sprintf('source_id=%d', $oSource->getId())); } function do_newsource() { diff --git a/plugins/ktcore/document/Rename.php b/plugins/ktcore/document/Rename.php index 8328d26..5d5e295 100644 --- a/plugins/ktcore/document/Rename.php +++ b/plugins/ktcore/document/Rename.php @@ -85,7 +85,7 @@ class KTDocumentRenameAction extends KTDocumentAction { $sFilename = KTUtil::arrayGet($_REQUEST, 'filename'); $aOptions = array( 'redirect_to' => array('', sprintf('fDocumentId=%d', $this->oDocument->getId())), - 'message' => "No filename given", + 'message' => _kt("No filename given"), ); $this->oValidator->validateString($sFilename, $aOptions); diff --git a/plugins/ktcore/folder/BulkUpload.php b/plugins/ktcore/folder/BulkUpload.php index 60f9efe..fc03343 100644 --- a/plugins/ktcore/folder/BulkUpload.php +++ b/plugins/ktcore/folder/BulkUpload.php @@ -56,7 +56,7 @@ class KTBulkUploadFolderAction extends KTFolderAction { if (!empty($postExpected)) { $aErrorOptions = array( 'redirect_to' => array('main', sprintf('fFolderId=%d', $this->oFolder->getId())), - 'message' => 'Upload larger than maximum POST size (max_post_size variable in .htaccess or php.ini)', + 'message' => _kt('Upload larger than maximum POST size (max_post_size variable in .htaccess or php.ini)'), ); $this->oValidator->notEmpty($postReceived, $aErrorOptions); } diff --git a/plugins/ktcore/folder/Rename.php b/plugins/ktcore/folder/Rename.php index 9e10a88..32c0dd3 100644 --- a/plugins/ktcore/folder/Rename.php +++ b/plugins/ktcore/folder/Rename.php @@ -67,7 +67,7 @@ class KTFolderRenameAction extends KTFolderAction { $sName = KTUtil::arrayGet($_REQUEST, 'foldername'); $aOptions = array( 'redirect_to' => array('', sprintf('fFolderId=%d', $this->oFolder->getId())), - 'message' => "No folder name given", + 'message' => _kt("No folder name given"), ); $this->oValidator->validateString($sName, $aOptions); diff --git a/plugins/ktcore/folder/addDocument.php b/plugins/ktcore/folder/addDocument.php index ad3b998..7f54e21 100644 --- a/plugins/ktcore/folder/addDocument.php +++ b/plugins/ktcore/folder/addDocument.php @@ -54,7 +54,7 @@ class KTFolderAddDocumentAction extends KTFolderAction { if (!empty($postExpected)) { $aErrorOptions = array( 'redirect_to' => array('main', sprintf('fFolderId=%d', $this->oFolder->getId())), - 'message' => 'Upload larger than maximum POST size (max_post_size variable in .htaccess or php.ini)', + 'message' => _kt('Upload larger than maximum POST size (max_post_size variable in .htaccess or php.ini)'), ); $this->oValidator->notEmpty($postReceived, $aErrorOptions); } diff --git a/templates/kt3/browse_lookup_selection.smarty b/templates/kt3/browse_lookup_selection.smarty index 99bee92..3f499c9 100644 --- a/templates/kt3/browse_lookup_selection.smarty +++ b/templates/kt3/browse_lookup_selection.smarty @@ -1,4 +1,4 @@ -

Select a Field

+

{i18n}Select a Field{/i18n}

{i18n}In some circumstances it is useful to view all documents with a given value for a lookup field. Select the lookup field from the list below @@ -8,4 +8,4 @@ to view all relevant documents.{/i18n}

{foreach item=oField from=$fields}
  • {$oField->getName()}
  • {/foreach} - \ No newline at end of file + diff --git a/templates/kt3/browse_types.smarty b/templates/kt3/browse_types.smarty index 019a784..7f19f54 100644 --- a/templates/kt3/browse_types.smarty +++ b/templates/kt3/browse_types.smarty @@ -1,4 +1,4 @@ -

    Select a document type

    +

    {i18n}Select a document type{/i18n}

    {i18n}In some circumstances it is useful to view all documents of a given document type. Select a document type from the list below @@ -8,4 +8,4 @@ to view all relevant documents.{/i18n}

    {foreach item=oType from=$document_types}
  • {$oType->getName()}
  • {/foreach} - \ No newline at end of file + diff --git a/templates/ktcore/authentication/manage.smarty b/templates/ktcore/authentication/manage.smarty index 07197a8..f237142 100644 --- a/templates/ktcore/authentication/manage.smarty +++ b/templates/ktcore/authentication/manage.smarty @@ -9,7 +9,7 @@ specify additional sources of authentication data.{/i18n}

    {if $providers}

    {i18n}Add authentication sourceAdd a new +ktInline">{i18n}Add authentication source{/i18n}{i18n}Add a new authentication source{/i18n}.

    {else}

    {i18n}Only the standard database authentication is currently available. diff --git a/templates/ktcore/dashlets/admintutorial.smarty b/templates/ktcore/dashlets/admintutorial.smarty index 7bbf896..1f1f108 100644 --- a/templates/ktcore/dashlets/admintutorial.smarty +++ b/templates/ktcore/dashlets/admintutorial.smarty @@ -1,4 +1,4 @@ -

    KnowledgeTree administrator's Guide

    +

    {i18n}KnowledgeTree administrator's Guide{/i18n}

    {i18n}If this is your first KnowledgeTree installation, or if you've just upgraded from KnowledgeTree 2.x, we've put together some information which might help you get to grips with the new system.{/i18n}

    diff --git a/templates/ktcore/document/admin/expungeconfirmlist.smarty b/templates/ktcore/document/admin/expungeconfirmlist.smarty index 710ca10..8a6e203 100644 --- a/templates/ktcore/document/admin/expungeconfirmlist.smarty +++ b/templates/ktcore/document/admin/expungeconfirmlist.smarty @@ -1,4 +1,4 @@ -

    Confirm Expunge

    +

    {i18n}Confirm Expunge{/i18n}

    {i18n}Note{/i18n}: {i18n}please confirm that you want to delete these documents.{/i18n}

    diff --git a/templates/ktcore/document/document_permissions.smarty b/templates/ktcore/document/document_permissions.smarty index 9debfcc..fec6d9f 100644 --- a/templates/ktcore/document/document_permissions.smarty +++ b/templates/ktcore/document/document_permissions.smarty @@ -121,7 +121,7 @@ value="{$iGroupId}"> {if (!empty($conditions))} {if ($edit || $dynamic_conditions)} -

    Dynamic permissions

    +

    {i18n}Dynamic permissions{/i18n}

    {/if} { if $dynamic_conditions } @@ -196,4 +196,4 @@ $this->assign("aPermissions", $this->_tpl_vars['oDynamicCondition']->getAssignme { /if } -{/if} \ No newline at end of file +{/if} diff --git a/templates/ktcore/folder/permissions.smarty b/templates/ktcore/folder/permissions.smarty index 946bbb3..94f2110 100644 --- a/templates/ktcore/folder/permissions.smarty +++ b/templates/ktcore/folder/permissions.smarty @@ -114,7 +114,7 @@ value="{$iGroupId}"> {if (!empty($conditions))} {if ($edit || $dynamic_conditions)} -

    Dynamic permissions

    +

    {i18n}Dynamic permissions{/i18n}

    {/if} { if $dynamic_conditions }
    diff --git a/templates/ktcore/help_with_edit.smarty b/templates/ktcore/help_with_edit.smarty index a35d8ee..bc7b976 100644 --- a/templates/ktcore/help_with_edit.smarty +++ b/templates/ktcore/help_with_edit.smarty @@ -1,5 +1,5 @@ {if (!$help_body)} -

    No content specified for this help file yet. Edit it first.

    +

    {i18n}No content specified for this help file yet. Edit it first.{/i18n}

    {else} {$context->oPage->requireJSResource("resources/js/help.js")} @@ -16,4 +16,4 @@ left; padding-right: 0.5em;">{i18n}Edit this help page.{/i18n}{i18n}Return to where you came from.{/i18n}{i18n}Return to where you came from.{/i18n}

    - \ No newline at end of file + diff --git a/templates/ktcore/javascript_i18n.smarty b/templates/ktcore/javascript_i18n.smarty index e09085d..ef23805 100644 --- a/templates/ktcore/javascript_i18n.smarty +++ b/templates/ktcore/javascript_i18n.smarty @@ -17,8 +17,6 @@ function _(trans_string) { -// strings for file: resources/js/add_document.js - // strings for file: resources/js/conditional_complex_edit.js i18n['Finish with this column\'s behaviours.'] = '{i18n}Finish with this column\'s behaviours.{/i18n}'; i18n['Assuming this field has behaviour "'] = '{i18n}Assuming this field has behaviour "{/i18n}'; @@ -45,15 +43,17 @@ i18n['all'] = '{i18n}all{/i18n}'; i18n['any'] = '{i18n}any{/i18n}'; i18n['of the criteria specified.'] = '{i18n}of the criteria specified.{/i18n}'; -// strings for file: resources/js/constructed_search_postprocess.js +// strings for file: resources/js/taillog.js -// strings for file: resources/js/help.js +// strings for file: resources/js/add_document.js -// strings for file: resources/js/kt-utility.js +// strings for file: resources/js/constructed_search_postprocess.js // strings for file: resources/js/kt3calendar.js -// strings for file: resources/js/taillog.js - // strings for file: resources/js/toggleselect.js +// strings for file: resources/js/kt-utility.js + +// strings for file: resources/js/help.js + diff --git a/templates/ktcore/manage_help.smarty b/templates/ktcore/manage_help.smarty index 73b8e08..b1363ad 100644 --- a/templates/ktcore/manage_help.smarty +++ b/templates/ktcore/manage_help.smarty @@ -4,13 +4,13 @@ via the help system and click on customise this help file.{/i18n}

    { if $helpreplacements } -

    Existing customised help pages

    +

    {i18n}Existing customised help pages{/i18n}

    - - + + { foreach item=oHelpReplacement from=$helpreplacements } diff --git a/templates/ktcore/metadata/conditional/manageConditional.smarty b/templates/ktcore/metadata/conditional/manageConditional.smarty index 7bc4b8b..8201884 100644 --- a/templates/ktcore/metadata/conditional/manageConditional.smarty +++ b/templates/ktcore/metadata/conditional/manageConditional.smarty @@ -80,7 +80,7 @@ ordering!{/i18n}

    {if !$oMasterField} -

    Master field

    +

    {i18n}Master field{/i18n}

    {i18n}No master field is set, please select the master field{/i18n}: @@ -95,7 +95,7 @@ ordering!{/i18n}

    -Master field +{i18n}Master field{/i18n} diff --git a/templates/ktcore/metadata/editField.smarty b/templates/ktcore/metadata/editField.smarty index 856beec..4cae0b9 100644 --- a/templates/ktcore/metadata/editField.smarty +++ b/templates/ktcore/metadata/editField.smarty @@ -60,7 +60,7 @@
    -Existing values +{i18n}Existing values{/i18n} @@ -87,7 +87,7 @@ from another source{/i18n})
    -Disabled values +{i18n}Disabled values{/i18n} diff --git a/templates/ktcore/principals/deleteunit.smarty b/templates/ktcore/principals/deleteunit.smarty index b62ded0..b1f63e8 100644 --- a/templates/ktcore/principals/deleteunit.smarty +++ b/templates/ktcore/principals/deleteunit.smarty @@ -1,4 +1,4 @@ -

    Delete Unit

    +

    {i18n}Delete Unit{/i18n}

    {i18n arg_name=$unit->getName()}Delete unit #name# from the system{/i18n}

    diff --git a/templates/ktcore/principals/editgroup.smarty b/templates/ktcore/principals/editgroup.smarty index 6e6195e..6cfa03c 100644 --- a/templates/ktcore/principals/editgroup.smarty +++ b/templates/ktcore/principals/editgroup.smarty @@ -1,4 +1,4 @@ -

    Edit Group Details

    +

    {i18n}Edit Group Details{/i18n}

    {i18n arg_name=$edit_group->getName()}Change the system's information about group #name#{/i18n}

    diff --git a/templates/ktcore/principals/groupadmin.smarty b/templates/ktcore/principals/groupadmin.smarty index d2582b3..b480fe5 100644 --- a/templates/ktcore/principals/groupadmin.smarty +++ b/templates/ktcore/principals/groupadmin.smarty @@ -4,7 +4,7 @@ {i18n}Add New Group{/i18n}

    {i18n}Groups allow you to assign permissions and roles to a number of different users at once.{/i18n}

    -

    Add Group{i18n}Add a new group{/i18n}.

    +

    {i18n}Add Group{/i18n}{i18n}Add a new group{/i18n}.

    diff --git a/templates/ktcore/principals/password.smarty b/templates/ktcore/principals/password.smarty index 723c6a7..336c227 100644 --- a/templates/ktcore/principals/password.smarty +++ b/templates/ktcore/principals/password.smarty @@ -1,4 +1,4 @@ -

    Password

    +

    {i18n}Password{/i18n}

    {i18n}You may change your password by entering it in the fields below. Your system administrator may have defined certain rules (such as minimum password length) that your password must abide by.{/i18n}

    diff --git a/templates/ktcore/principals/preferences.smarty b/templates/ktcore/principals/preferences.smarty index 1a4e02e..a3c242d 100644 --- a/templates/ktcore/principals/preferences.smarty +++ b/templates/ktcore/principals/preferences.smarty @@ -1,4 +1,4 @@ -

    Preferences

    +

    {i18n}Preferences{/i18n}

    {i18n}You may change details about yourself by editing the entries below. Once you have completed the form, click on Update your details.{/i18n}

    diff --git a/templates/ktcore/workflow/editState.smarty b/templates/ktcore/workflow/editState.smarty index e6138f1..e076911 100644 --- a/templates/ktcore/workflow/editState.smarty +++ b/templates/ktcore/workflow/editState.smarty @@ -223,7 +223,7 @@ documents are in this state.{/i18n}

    {/if} {else} -

    No permissions have been created within KnowledgeTree.

    +

    {i18n}No permissions have been created within KnowledgeTree.{/i18n}

    {/if} diff --git a/templates/ktstandard/authentication/ldapsearchgroup.smarty b/templates/ktstandard/authentication/ldapsearchgroup.smarty index e250c1b..fa89507 100644 --- a/templates/ktstandard/authentication/ldapsearchgroup.smarty +++ b/templates/ktstandard/authentication/ldapsearchgroup.smarty @@ -5,7 +5,7 @@ begin.{/i18n}

    -
    Search for group +
    {i18n}Search for group{/i18n} {foreach from=$fields item=oWidget} {$oWidget->render()} {/foreach} diff --git a/templates/ktstandard/authentication/ldapsearchuser.smarty b/templates/ktstandard/authentication/ldapsearchuser.smarty index 5b84a6e..eb04d8f 100644 --- a/templates/ktstandard/authentication/ldapsearchuser.smarty +++ b/templates/ktstandard/authentication/ldapsearchuser.smarty @@ -11,7 +11,7 @@ begin.{/i18n}

    -
    Search for user +
    {i18n}Search for user{/i18n} {foreach from=$fields item=oWidget} {$oWidget->render()} {/foreach} -- libgit2 0.21.4
    NameActions{i18n}Name{/i18n}{i18n}Actions{/i18n}