[TASK] Improve sys_note code
authorGeorg Ringer <mail@ringerge.org>
Tue, 24 Jul 2012 14:30:02 +0000 (16:30 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 29 Jul 2012 14:46:43 +0000 (16:46 +0200)
Code of sys_note can be highly improved:
* Use fluid
* Move xlf files to Resources
* Add kind-of repository

Change-Id: Ia89acb29ddbc0919901570f6bdd1575376863c4a
Resolves: #39221
Releases: 6.0
Reviewed-on: http://review.typo3.org/13021
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
12 files changed:
typo3/sysext/sys_note/Classes/Domain/Repository/SysNoteRepository.php [new file with mode: 0644]
typo3/sysext/sys_note/Classes/SysNote.php
typo3/sysext/sys_note/Classes/ViewHelpers/EditLinkViewHelper.php [new file with mode: 0644]
typo3/sysext/sys_note/Configuration/Tca/SysNote.php
typo3/sysext/sys_note/Resources/Private/Language/locallang.xlf [new file with mode: 0644]
typo3/sysext/sys_note/Resources/Private/Language/locallang_csh_sysnote.xlf [new file with mode: 0644]
typo3/sysext/sys_note/Resources/Private/Language/locallang_tca.xlf [new file with mode: 0644]
typo3/sysext/sys_note/Resources/Private/Template/List.html [new file with mode: 0644]
typo3/sysext/sys_note/ext_tables.php
typo3/sysext/sys_note/locallang.xlf [deleted file]
typo3/sysext/sys_note/locallang_csh_sysnote.xlf [deleted file]
typo3/sysext/sys_note/locallang_tca.xlf [deleted file]

diff --git a/typo3/sysext/sys_note/Classes/Domain/Repository/SysNoteRepository.php b/typo3/sysext/sys_note/Classes/Domain/Repository/SysNoteRepository.php
new file mode 100644 (file)
index 0000000..8dd9f11
--- /dev/null
@@ -0,0 +1,60 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2012 Georg Ringer <typo3@ringerge.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Sys_note repository
+ *
+ * @package TYPO3
+ * @subpackage sys_note
+ * @author Georg Ringer <typo3@ringerge.org>
+ */
+class Tx_SysNote_Domain_Repository_SysNoteRepository {
+
+       /**
+        * Find all sys_notes by a given pidlist
+        *
+        * @param string $pidlist comma separated list of pids
+        * @return array records
+        */
+       public function findAllByPidList($pidlist) {
+               $records = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
+                       '*',
+                       'sys_note',
+                       'pid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($pidlist) . ')
+                                       AND (personal=0 OR cruser=' . intval($GLOBALS['BE_USER']->user['uid']) . ')' .
+                               t3lib_BEfunc::deleteClause('sys_note'),
+                       '',
+                       'sorting'
+               );
+
+               foreach ($records as $key => $record) {
+                       $records[$key]['tstamp'] = new DateTime('@' . $record['tstamp']);
+                       $records[$key]['author'] = t3lib_BEfunc::getRecord('be_users', $record['cruser']);
+               }
+
+               return $records;
+       }
+
+}
+?>
\ No newline at end of file
index 44ef934..55c0ac4 100644 (file)
@@ -38,78 +38,38 @@ class Tx_SysNote_SysNote {
         * @return string
         */
        public function renderByPid($pidList) {
-                       // Create query for selecting the notes:
-               $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
-                                       '*',
-                                       'sys_note',
-                                       'pid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($pidList) . ')
-                                               AND (personal=0 OR cruser=' . intval($GLOBALS['BE_USER']->user['uid']) . ')' .
-                                               t3lib_BEfunc::deleteClause('sys_note'),
-                                       '',
-                                       'sorting'
-                               );
+               /** @var $repository Tx_SysNote_Domain_Repository_SysNoteRepository */
+               $repository = t3lib_div::makeInstance('Tx_SysNote_Domain_Repository_SysNoteRepository');
 
-               $out = '';
-
-               if (count($rows) > 0) {
-                       $categories = array();
-
-                               // Load full table description:
-                       t3lib_div::loadTCA('sys_note');
-
-                               // Traverse categories
-                       if ($GLOBALS['TCA']['sys_note'] && $GLOBALS['TCA']['sys_note']['columns']['category']
-                               && is_array($GLOBALS['TCA']['sys_note']['columns']['category']['config']['items'])
-                       ) {
-                               foreach ($GLOBALS['TCA']['sys_note']['columns']['category']['config']['items'] as $el) {
-                                       $categories[$el[1]] = $GLOBALS['LANG']->sL($el[0]);
-                               }
-                       }
+               $notes = $repository->findAllByPidList($pidList);
 
-                               // For each note found, make rendering:
-                       foreach ($rows as $row) {
-                               if ($row['personal'] == 1 && (int) $row['cruser'] !== (int) $GLOBALS['BE_USER']->user['uid'] && $GLOBALS['BE_USER']->isAdmin() === FALSE) {
-                                       continue;
-                               }
-                               $author = t3lib_BEfunc::getRecord('be_users', $row['cruser']);
-                               $authorInformation = $author['realName'];
-                               if (empty($authorInformation)) {
-                                       $authorInformation = $author['username'];
-                               }
-                               $title = !(empty($categories[$row['category']])) ? $categories[$row['category']] . ': ' : '';
-
-                               $headerParts = array();
-                               if (!empty($authorInformation)) {
-                                       $headerParts[] = '<span>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.author', TRUE) . '</span> ' . $authorInformation;
-                               }
-                               $headerParts[] = '<span>' . $GLOBALS['LANG']->sL('LLL:EXT:sys_note/locallang.xlf:date', TRUE) . ':</span> ' . t3lib_BEfunc::date($row['tstamp']);
-                               if ($row['personal'] == 1) {
-                                       $headerParts[] = '<span>' . rtrim($GLOBALS['LANG']->sL('LLL:EXT:sys_note/locallang_tca.xlf:sys_note.personal', TRUE), ':') . '</span>';
-                               }
-
-                                       // Compile content:
-                               $out .= '
-                                       <div class="single-note category-' . $row['category'] . '">
-                                               <div class="header">
-                                                        ' . implode(' &middot; ', $headerParts) . '
-                                                       <div class="right">
-                                                               <a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick('&edit[sys_note][' . $row['uid'] . ']=edit', $GLOBALS['BACK_PATH'])) . '">' .
-                                                                       t3lib_iconWorks::getSpriteIcon('actions-document-open') .
-                                                               '</a>
-                                                       </div>
-                                               </div>
-                                               <div class="content">
-                                                       <div class="title">' . htmlspecialchars($title)  . htmlspecialchars($row['subject']) . '</div>
-                                                       ' . nl2br(htmlspecialchars($row['message'])) . '
-                                               </div>
-                                       </div>';
-                       }
+               $out = '';
+               if ($this->notesAvailable($notes)) {
+                       /** @var $fluidView Tx_Fluid_View_StandaloneView */
+                       $fluidView = t3lib_div::makeInstance('Tx_Fluid_View_StandaloneView');
+                       $templatePathAndFilename = t3lib_extMgm::extPath('sys_note', 'Resources/Private/Template/List.html');
 
-                       $out = '<div id="typo3-dblist-sysnotes">' . $out . '</div>';
+                       $fluidView->setTemplatePathAndFilename($templatePathAndFilename);
+                       $fluidView->assign('notes', $notes);
+                       $out = $fluidView->render();
                }
 
                return $out;
        }
+
+       /**
+        * Check if notes are available
+        *
+        * @param array $notes All notes returned from repository
+        * @return boolean TRUE if there are one or more notes
+        */
+       protected function notesAvailable(array $notes) {
+               $notesAvailable = FALSE;
+               if (count($notes) > 0) {
+                       $notesAvailable = TRUE;
+               }
+               return $notesAvailable;
+       }
 }
 
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/sys_note/Classes/ViewHelpers/EditLinkViewHelper.php b/typo3/sysext/sys_note/Classes/ViewHelpers/EditLinkViewHelper.php
new file mode 100644 (file)
index 0000000..b75f272
--- /dev/null
@@ -0,0 +1,44 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2012 Georg Ringer <typo3@ringerge.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * ViewHelper to create a link to edit a note
+ *
+ * @package TYPO3
+ * @subpackage sys_note
+ * @author Georg Ringer <typo3@ringerge.org>
+ */
+class Tx_SysNote_ViewHelpers_EditLinkViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
+
+       /**
+        * @param integer $id
+        * @return string
+        */
+       public function render($id) {
+               $returnUrl = t3lib_div::getIndpEnv('REQUEST_URI');
+
+               return $GLOBALS['BACK_PATH'] . 'alt_doc.php?&edit[sys_note][' . $id . ']=edit&returnUrl=' . rawurlencode($returnUrl);
+       }
+}
+?>
\ No newline at end of file
index a31b811..63460c7 100644 (file)
@@ -16,16 +16,16 @@ $TCA['sys_note'] = array(
                                'type' => 'select',
                                'items' => array(
                                        array('', '0'),
-                                       array('LLL:EXT:sys_note/locallang_tca.xlf:sys_note.category.I.1', '1', 'sysext/t3skin/icons/ext/sys_note/icon-instruction.png'),
-                                       array('LLL:EXT:sys_note/locallang_tca.xlf:sys_note.category.I.2', '3', 'sysext/t3skin/icons/ext/sys_note/icon-note.png'),
-                                       array('LLL:EXT:sys_note/locallang_tca.xlf:sys_note.category.I.3', '4', 'sysext/t3skin/icons/ext/sys_note/icon-todo.png'),
-                                       array('LLL:EXT:sys_note/locallang_tca.xlf:sys_note.category.I.4', '2', 'sysext/t3skin/icons/ext/sys_note/icon-template.png')
+                                       array('LLL:EXT:sys_note/Resources/Private/Language/locallang_tca.xlf:sys_note.category.I.1', '1', 'sysext/t3skin/icons/ext/sys_note/icon-instruction.png'),
+                                       array('LLL:EXT:sys_note/Resources/Private/Language/locallang_tca.xlf:sys_note.category.I.2', '3', 'sysext/t3skin/icons/ext/sys_note/icon-note.png'),
+                                       array('LLL:EXT:sys_note/Resources/Private/Language/locallang_tca.xlf:sys_note.category.I.3', '4', 'sysext/t3skin/icons/ext/sys_note/icon-todo.png'),
+                                       array('LLL:EXT:sys_note/Resources/Private/Language/locallang_tca.xlf:sys_note.category.I.4', '2', 'sysext/t3skin/icons/ext/sys_note/icon-template.png')
                                ),
                                'default' => '0'
                        )
                ),
                'subject' => array(
-                       'label' => 'LLL:EXT:sys_note/locallang_tca.xlf:sys_note.subject',
+                       'label' => 'LLL:EXT:sys_note/Resources/Private/Language/locallang_tca.xlf:sys_note.subject',
                        'config' => array(
                                'type' => 'input',
                                'size' => '40',
@@ -33,7 +33,7 @@ $TCA['sys_note'] = array(
                        )
                ),
                'message' => array(
-                       'label' => 'LLL:EXT:sys_note/locallang_tca.xlf:sys_note.message',
+                       'label' => 'LLL:EXT:sys_note/Resources/Private/Language/locallang_tca.xlf:sys_note.message',
                        'config' => array(
                                'type' => 'text',
                                'cols' => '40',
@@ -41,7 +41,7 @@ $TCA['sys_note'] = array(
                        )
                ),
                'personal' => array(
-                       'label' => 'LLL:EXT:sys_note/locallang_tca.xlf:sys_note.personal',
+                       'label' => 'LLL:EXT:sys_note/Resources/Private/Language/locallang_tca.xlf:sys_note.personal',
                        'config' => array(
                                'type' => 'check'
                        )
diff --git a/typo3/sysext/sys_note/Resources/Private/Language/locallang.xlf b/typo3/sysext/sys_note/Resources/Private/Language/locallang.xlf
new file mode 100644 (file)
index 0000000..08ae4c6
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0">
+       <file source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="sys_note">
+               <header/>
+               <body>
+                       <trans-unit id="date" xml:space="preserve">
+                               <source>Date</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
diff --git a/typo3/sysext/sys_note/Resources/Private/Language/locallang_csh_sysnote.xlf b/typo3/sysext/sys_note/Resources/Private/Language/locallang_csh_sysnote.xlf
new file mode 100644 (file)
index 0000000..474af43
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0">
+       <file source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="sys_note">
+               <header/>
+               <body>
+                       <trans-unit id=".description" xml:space="preserve">
+                               <source>Internal reminder note attached to a page.</source>
+                       </trans-unit>
+                       <trans-unit id=".details" xml:space="preserve">
+                               <source>This provides a simple way to attach informative notes to a page regarding backend-related issues. Use it as you like for reminders, instructions, etc.</source>
+                       </trans-unit>
+                       <trans-unit id="_.seeAlso" xml:space="preserve">
+                               <source>pages</source>
+                       </trans-unit>
+                       <trans-unit id="category.description" xml:space="preserve">
+                               <source>Select a category which describes the character of the note.</source>
+                       </trans-unit>
+                       <trans-unit id="subject.description" xml:space="preserve">
+                               <source>Enter a title for the note.</source>
+                       </trans-unit>
+                       <trans-unit id="message.description" xml:space="preserve">
+                               <source>This is the note itself.</source>
+                       </trans-unit>
+                       <trans-unit id="author.description" xml:space="preserve">
+                               <source>Enter your name.</source>
+                       </trans-unit>
+                       <trans-unit id="email.description" xml:space="preserve">
+                               <source>Enter your email address.</source>
+                       </trans-unit>
+                       <trans-unit id="personal.description" xml:space="preserve">
+                               <source>Check this if you don't want other users to see this note.</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
diff --git a/typo3/sysext/sys_note/Resources/Private/Language/locallang_tca.xlf b/typo3/sysext/sys_note/Resources/Private/Language/locallang_tca.xlf
new file mode 100644 (file)
index 0000000..dc96494
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0">
+       <file source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="sys_note">
+               <header/>
+               <body>
+                       <trans-unit id="sys_note" xml:space="preserve">
+                               <source>Internal note</source>
+                       </trans-unit>
+                       <trans-unit id="sys_note.category.I.1" xml:space="preserve">
+                               <source>Instructions</source>
+                       </trans-unit>
+                       <trans-unit id="sys_note.category.I.2" xml:space="preserve">
+                               <source>Notes</source>
+                       </trans-unit>
+                       <trans-unit id="sys_note.category.I.3" xml:space="preserve">
+                               <source>To-do</source>
+                       </trans-unit>
+                       <trans-unit id="sys_note.category.I.4" xml:space="preserve">
+                               <source>Template</source>
+                       </trans-unit>
+                       <trans-unit id="sys_note.subject" xml:space="preserve">
+                               <source>Subject:</source>
+                       </trans-unit>
+                       <trans-unit id="sys_note.message" xml:space="preserve">
+                               <source>Message:</source>
+                       </trans-unit>
+                       <trans-unit id="sys_note.personal" xml:space="preserve">
+                               <source>Personal:</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
diff --git a/typo3/sysext/sys_note/Resources/Private/Template/List.html b/typo3/sysext/sys_note/Resources/Private/Template/List.html
new file mode 100644 (file)
index 0000000..00e6a51
--- /dev/null
@@ -0,0 +1,34 @@
+{namespace notes=Tx_SysNote_ViewHelpers}
+
+<div id="typo3-dblist-sysnotes" xmlns:f="http://www.w3.org/1999/html">
+       <f:for each="{notes}" as="note">
+               <div class="single-note category-{note.category}">
+                       <div class="header">
+                               <span><f:translate key="LLL:EXT:lang/locallang_core.xlf:labels.author" /></span>
+                               <f:if condition="{note.author.realName}">
+                                       <f:then>{note.author.realName}</f:then>
+                                       <f:else>{note.author.username}</f:else>
+                               </f:if>
+                               &middot;
+
+                               <span><f:translate key="LLL:EXT:sys_note/Resources/Private/Language/locallang.xlf:date" />:</span>
+                               <f:format.date>{note.tstamp}</f:format.date>
+
+                               <f:if condition="{note.personal}">
+                                       &middot;
+                                       <span><f:translate key="LLL:EXT:sys_note/Resources/Private/Language/locallang_tca.xlf:sys_note.personal" /></span>
+                               </f:if>
+
+                               <div class="right">
+                                       <f:be.buttons.icon uri="{notes:editLink(id:note.uid)}" icon="actions-document-open" />
+                               </div>
+                       </div>
+                       <div class="content">
+                               <div class="title">
+                                       <f:if condition="{note.category}"><f:translate key="LLL:EXT:sys_note/Resources/Private/Language/locallang_tca.xlf:sys_note.category.I.{note.category}" />:</f:if>
+                                       {note.subject}</div>
+                               <f:format.nl2br>{note.message}</f:format.nl2br>
+                       </div>
+               </div>
+       </f:for>
+</div>
\ No newline at end of file
index 6dc52a4..c84c8d8 100755 (executable)
@@ -12,7 +12,7 @@ $TCA['sys_note'] = array(
                'cruser_id' => 'cruser',
                'prependAtCopy' => 'LLL:EXT:lang/locallang_general.xlf:LGL.prependAtCopy',
                'delete' => 'deleted',
-               'title' => 'LLL:EXT:sys_note/locallang_tca.xlf:sys_note',
+               'title' => 'LLL:EXT:sys_note/Resources/Private/Language/locallang_tca.xlf:sys_note',
                'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY) . 'ext_icon.gif',
                'sortby' => 'sorting',
                'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'Configuration/Tca/SysNote.php',
@@ -20,6 +20,6 @@ $TCA['sys_note'] = array(
 );
 
 t3lib_extMgm::allowTableOnStandardPages('sys_note');
-t3lib_extMgm::addLLrefForTCAdescr('sys_note', 'EXT:sys_note/locallang_csh_sysnote.xlf');
+t3lib_extMgm::addLLrefForTCAdescr('sys_note', 'EXT:sys_note/Resources/Private/Language/locallang_csh_sysnote.xlf');
 
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/sys_note/locallang.xlf b/typo3/sysext/sys_note/locallang.xlf
deleted file mode 100644 (file)
index 08ae4c6..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xliff version="1.0">
-       <file source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="sys_note">
-               <header/>
-               <body>
-                       <trans-unit id="date" xml:space="preserve">
-                               <source>Date</source>
-                       </trans-unit>
-               </body>
-       </file>
-</xliff>
diff --git a/typo3/sysext/sys_note/locallang_csh_sysnote.xlf b/typo3/sysext/sys_note/locallang_csh_sysnote.xlf
deleted file mode 100644 (file)
index 474af43..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xliff version="1.0">
-       <file source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="sys_note">
-               <header/>
-               <body>
-                       <trans-unit id=".description" xml:space="preserve">
-                               <source>Internal reminder note attached to a page.</source>
-                       </trans-unit>
-                       <trans-unit id=".details" xml:space="preserve">
-                               <source>This provides a simple way to attach informative notes to a page regarding backend-related issues. Use it as you like for reminders, instructions, etc.</source>
-                       </trans-unit>
-                       <trans-unit id="_.seeAlso" xml:space="preserve">
-                               <source>pages</source>
-                       </trans-unit>
-                       <trans-unit id="category.description" xml:space="preserve">
-                               <source>Select a category which describes the character of the note.</source>
-                       </trans-unit>
-                       <trans-unit id="subject.description" xml:space="preserve">
-                               <source>Enter a title for the note.</source>
-                       </trans-unit>
-                       <trans-unit id="message.description" xml:space="preserve">
-                               <source>This is the note itself.</source>
-                       </trans-unit>
-                       <trans-unit id="author.description" xml:space="preserve">
-                               <source>Enter your name.</source>
-                       </trans-unit>
-                       <trans-unit id="email.description" xml:space="preserve">
-                               <source>Enter your email address.</source>
-                       </trans-unit>
-                       <trans-unit id="personal.description" xml:space="preserve">
-                               <source>Check this if you don't want other users to see this note.</source>
-                       </trans-unit>
-               </body>
-       </file>
-</xliff>
diff --git a/typo3/sysext/sys_note/locallang_tca.xlf b/typo3/sysext/sys_note/locallang_tca.xlf
deleted file mode 100644 (file)
index dc96494..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xliff version="1.0">
-       <file source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="sys_note">
-               <header/>
-               <body>
-                       <trans-unit id="sys_note" xml:space="preserve">
-                               <source>Internal note</source>
-                       </trans-unit>
-                       <trans-unit id="sys_note.category.I.1" xml:space="preserve">
-                               <source>Instructions</source>
-                       </trans-unit>
-                       <trans-unit id="sys_note.category.I.2" xml:space="preserve">
-                               <source>Notes</source>
-                       </trans-unit>
-                       <trans-unit id="sys_note.category.I.3" xml:space="preserve">
-                               <source>To-do</source>
-                       </trans-unit>
-                       <trans-unit id="sys_note.category.I.4" xml:space="preserve">
-                               <source>Template</source>
-                       </trans-unit>
-                       <trans-unit id="sys_note.subject" xml:space="preserve">
-                               <source>Subject:</source>
-                       </trans-unit>
-                       <trans-unit id="sys_note.message" xml:space="preserve">
-                               <source>Message:</source>
-                       </trans-unit>
-                       <trans-unit id="sys_note.personal" xml:space="preserve">
-                               <source>Personal:</source>
-                       </trans-unit>
-               </body>
-       </file>
-</xliff>