From 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 Mon Sep 17 00:00:00 2001 From: ctrlaltca <> Date: Thu, 12 Jul 2012 11:21:01 +0000 Subject: standardize the use of unix eol; use svn properties to enforce native eol --- framework/I18N/core/IMessageSource.php | 244 ++++++++++++++++----------------- 1 file changed, 122 insertions(+), 122 deletions(-) (limited to 'framework/I18N/core/IMessageSource.php') diff --git a/framework/I18N/core/IMessageSource.php b/framework/I18N/core/IMessageSource.php index 1d40bd73..f8263b97 100644 --- a/framework/I18N/core/IMessageSource.php +++ b/framework/I18N/core/IMessageSource.php @@ -1,122 +1,122 @@ - - * @version $Revision: 1.3 $ $Date: 2005/01/09 22:15:32 $ - * @package System.I18N.core - */ - -/** - * IMessageSource interface. - * - * All messages source used by MessageFormat must be of IMessageSource. - * It defines a set of operations to add and retrive messages from the - * message source. In addition, message source can load a particular - * catalogue. - * - * @author Xiang Wei Zhuo - * @version v1.0, last update on Fri Dec 24 17:40:19 EST 2004 - * @package System.I18N.core - */ -interface IMessageSource -{ - /** - * Load the translation table for this particular catalogue. - * The translation should be loaded in the following order. - * # [1] call getCatalogeList($catalogue) to get a list of - * variants for for the specified $catalogue. - * # [2] for each of the variants, call getSource($variant) - * to get the resource, could be a file or catalogue ID. - * # [3] verify that this resource is valid by calling isValidSource($source) - * # [4] try to get the messages from the cache - * # [5] if a cache miss, call load($source) to load the message array - * # [6] store the messages to cache. - * # [7] continue with the foreach loop, e.g. goto [2]. - * - * @param string a catalogue to load - * @return boolean true if loaded, false otherwise. - */ - function load($catalogue = 'messages'); - - /** - * Get the translation table. This includes all the loaded sections. - * It must return a 2 level array of translation strings. - * # "catalogue+variant" the catalogue and its variants. - * # "source string" translation keys, and its translations. - * - * array('catalogue+variant' => - * array('source string' => 'target string', ...) - * ...), - * ...); - * - * - * @return array 2 level array translation table. - */ - function read(); - - /** - * Save the list of untranslated blocks to the translation source. - * If the translation was not found, you should add those - * strings to the translation source via the append() method. - * @param string the catalogue to add to - * @return boolean true if saved successfuly, false otherwise. - */ - function save($catalogue='messages'); - - /** - * Add a untranslated message to the source. Need to call save() - * to save the messages to source. - * @param string message to add - * @return void - */ - function append($message); - - /** - * Delete a particular message from the specified catalogue. - * @param string the source message to delete. - * @param string the catalogue to delete from. - * @return boolean true if deleted, false otherwise. - */ - function delete($message, $catalogue='messages'); - - /** - * Update the translation. - * @param string the source string. - * @param string the new translation string. - * @param string comments - * @param string the catalogue of the translation. - * @return boolean true if translation was updated, false otherwise. - */ - function update($text, $target, $comments, $catalogue='messages'); - - /** - * Returns a list of catalogue as key and all it variants as value. - * @return array list of catalogues - */ - function catalogues(); - - /** - * Set the culture for this particular message source. - * @param string the Culture name. - */ - function setCulture($culture); - - /** - * Get the culture identifier for the source. - * @return string culture identifier. - */ - function getCulture(); - -} - + + * @version $Revision: 1.3 $ $Date: 2005/01/09 22:15:32 $ + * @package System.I18N.core + */ + +/** + * IMessageSource interface. + * + * All messages source used by MessageFormat must be of IMessageSource. + * It defines a set of operations to add and retrive messages from the + * message source. In addition, message source can load a particular + * catalogue. + * + * @author Xiang Wei Zhuo + * @version v1.0, last update on Fri Dec 24 17:40:19 EST 2004 + * @package System.I18N.core + */ +interface IMessageSource +{ + /** + * Load the translation table for this particular catalogue. + * The translation should be loaded in the following order. + * # [1] call getCatalogeList($catalogue) to get a list of + * variants for for the specified $catalogue. + * # [2] for each of the variants, call getSource($variant) + * to get the resource, could be a file or catalogue ID. + * # [3] verify that this resource is valid by calling isValidSource($source) + * # [4] try to get the messages from the cache + * # [5] if a cache miss, call load($source) to load the message array + * # [6] store the messages to cache. + * # [7] continue with the foreach loop, e.g. goto [2]. + * + * @param string a catalogue to load + * @return boolean true if loaded, false otherwise. + */ + function load($catalogue = 'messages'); + + /** + * Get the translation table. This includes all the loaded sections. + * It must return a 2 level array of translation strings. + * # "catalogue+variant" the catalogue and its variants. + * # "source string" translation keys, and its translations. + * + * array('catalogue+variant' => + * array('source string' => 'target string', ...) + * ...), + * ...); + * + * + * @return array 2 level array translation table. + */ + function read(); + + /** + * Save the list of untranslated blocks to the translation source. + * If the translation was not found, you should add those + * strings to the translation source via the append() method. + * @param string the catalogue to add to + * @return boolean true if saved successfuly, false otherwise. + */ + function save($catalogue='messages'); + + /** + * Add a untranslated message to the source. Need to call save() + * to save the messages to source. + * @param string message to add + * @return void + */ + function append($message); + + /** + * Delete a particular message from the specified catalogue. + * @param string the source message to delete. + * @param string the catalogue to delete from. + * @return boolean true if deleted, false otherwise. + */ + function delete($message, $catalogue='messages'); + + /** + * Update the translation. + * @param string the source string. + * @param string the new translation string. + * @param string comments + * @param string the catalogue of the translation. + * @return boolean true if translation was updated, false otherwise. + */ + function update($text, $target, $comments, $catalogue='messages'); + + /** + * Returns a list of catalogue as key and all it variants as value. + * @return array list of catalogues + */ + function catalogues(); + + /** + * Set the culture for this particular message source. + * @param string the Culture name. + */ + function setCulture($culture); + + /** + * Get the culture identifier for the source. + * @return string culture identifier. + */ + function getCulture(); + +} + -- cgit v1.2.3