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}
-
\ 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}
{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}
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 }
-