[Squirrel-sql-commits] sql12/plugins/favs/src/net/sourceforge/squirrel_sql/plugins/favs I18NStrings.
A Java SQL client for any JDBC compliant database
Brought to you by:
colbell,
gerdwagner
From: Gerd W. <ger...@us...> - 2005-10-26 04:47:12
|
Update of /cvsroot/squirrel-sql/sql12/plugins/favs/src/net/sourceforge/squirrel_sql/plugins/favs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11431/plugins/favs/src/net/sourceforge/squirrel_sql/plugins/favs Modified Files: DeleteSavedQueriesFolderCommand.java Folder.java FoldersCache.java NewSavedQueriesFolderCommand.java OrganizeSavedQueriesDialog.java QueryTreeModel.java Added Files: I18NStrings.properties Log Message: i18n --- NEW FILE: I18NStrings.properties --- # #Missing/changed properties generated by I18n Plugin on Wed Oct 26 06:41:20 CEST 2005 # favs.savedQueries=Saved Queries favs.database=Database favs.noCatalog=No Catalog favs.mayNotReturn=May return a result favs.doesNotReturn=Does not return a result favs.returns=Returns a result favs.unknown=Unknown favs.newFolder=New Folder favs.nameMustNotBeBlank=Name cannot be blank. favs.deletelFolder=Are you sure to want to delete the folder \"{0}\" and all of its contents? Index: DeleteSavedQueriesFolderCommand.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/plugins/favs/src/net/sourceforge/squirrel_sql/plugins/favs/DeleteSavedQueriesFolderCommand.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** DeleteSavedQueriesFolderCommand.java 17 Nov 2002 09:18:55 -0000 1.1.1.1 --- DeleteSavedQueriesFolderCommand.java 26 Oct 2005 04:47:01 -0000 1.2 *************** *** 25,43 **** import net.sourceforge.squirrel_sql.fw.gui.Dialogs; public class DeleteSavedQueriesFolderCommand { /** * This interface defines locale specific strings. This should be * replaced with a property file. */ ! private interface i18n { ! String MSG_CONFIRM = "Are you sure to want to delete the folder \"{0}\" and all of its contents?"; } ! private Frame _frame; private QueryTree _tree; private TreePath _path; public DeleteSavedQueriesFolderCommand(Frame frame, QueryTree tree, ! TreePath path) { super(); _frame = frame; --- 25,52 ---- import net.sourceforge.squirrel_sql.fw.gui.Dialogs; + import net.sourceforge.squirrel_sql.fw.util.StringManager; + import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory; public class DeleteSavedQueriesFolderCommand { + + private static final StringManager s_stringMgr = + StringManagerFactory.getStringManager(DeleteSavedQueriesFolderCommand.class); + /** * This interface defines locale specific strings. This should be * replaced with a property file. */ ! private static class i18n { ! ! // i18n[favs.deletelFolder=Are you sure to want to delete the folder \"{0}\" and all of its contents?] ! static String MSG_CONFIRM = s_stringMgr.getString("favs.deletelFolder"); } ! ! private Frame _frame; private QueryTree _tree; private TreePath _path; public DeleteSavedQueriesFolderCommand(Frame frame, QueryTree tree, ! TreePath path) { super(); _frame = frame; *************** *** 65,67 **** } } ! } \ No newline at end of file --- 74,76 ---- } } ! } Index: NewSavedQueriesFolderCommand.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/plugins/favs/src/net/sourceforge/squirrel_sql/plugins/favs/NewSavedQueriesFolderCommand.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** NewSavedQueriesFolderCommand.java 17 Nov 2002 09:19:01 -0000 1.1.1.1 --- NewSavedQueriesFolderCommand.java 26 Oct 2005 04:47:01 -0000 1.2 *************** *** 21,32 **** import net.sourceforge.squirrel_sql.fw.util.ICommand; import net.sourceforge.squirrel_sql.client.IApplication; public class NewSavedQueriesFolderCommand { private IApplication _app; private QueryTree _tree; private TreePath _path; ! public NewSavedQueriesFolderCommand(IApplication app, QueryTree tree, TreePath path) throws IllegalArgumentException { --- 21,39 ---- import net.sourceforge.squirrel_sql.fw.util.ICommand; + import net.sourceforge.squirrel_sql.fw.util.StringManager; + import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory; import net.sourceforge.squirrel_sql.client.IApplication; public class NewSavedQueriesFolderCommand { + + private static final StringManager s_stringMgr = + StringManagerFactory.getStringManager(NewSavedQueriesFolderCommand.class); + private IApplication _app; private QueryTree _tree; private TreePath _path; ! ! public NewSavedQueriesFolderCommand(IApplication app, QueryTree tree, TreePath path) throws IllegalArgumentException { *************** *** 41,50 **** // throw new IllegalArgumentException("Null TreePath passed"); //} ! _app = app; _tree = tree; _path = path; } ! public void execute() { FolderNode rootNode = (FolderNode)_tree.getModel().getRoot(); FolderNode parentNode = null; --- 48,58 ---- // throw new IllegalArgumentException("Null TreePath passed"); //} ! _app = app; _tree = tree; _path = path; } ! ! public void execute() { FolderNode rootNode = (FolderNode)_tree.getModel().getRoot(); FolderNode parentNode = null; *************** *** 60,69 **** } if (parentNode != null) { ! final Folder folder = new Folder(null, "New Folder"); // ?? i18n final FolderNode newNode = new FolderNode(folder); parentNode.getFolder().addSubFolder(folder); parentNode.add(newNode); _tree.getTypedModel().nodeStructureChanged(parentNode); ! TreePath newNodePath = null; if (_path != null) { --- 68,78 ---- } if (parentNode != null) { ! // i18n[favs.newFolder=New Folder] ! final Folder folder = new Folder(null, s_stringMgr.getString("favs.newFolder")); // ?? i18n final FolderNode newNode = new FolderNode(folder); parentNode.getFolder().addSubFolder(folder); parentNode.add(newNode); _tree.getTypedModel().nodeStructureChanged(parentNode); ! TreePath newNodePath = null; if (_path != null) { *************** *** 79,81 **** } } ! } \ No newline at end of file --- 88,90 ---- } } ! } Index: OrganizeSavedQueriesDialog.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/plugins/favs/src/net/sourceforge/squirrel_sql/plugins/favs/OrganizeSavedQueriesDialog.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** OrganizeSavedQueriesDialog.java 17 Nov 2002 09:18:58 -0000 1.1.1.1 --- OrganizeSavedQueriesDialog.java 26 Oct 2005 04:47:01 -0000 1.2 *************** *** 28,34 **** --- 28,40 ---- import net.sourceforge.squirrel_sql.fw.gui.GUIUtils; + import net.sourceforge.squirrel_sql.fw.util.StringManager; + import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory; import net.sourceforge.squirrel_sql.client.IApplication; class OrganizeSavedQueriesDialog extends JDialog { + + private static final StringManager s_stringMgr = + StringManagerFactory.getStringManager(OrganizeSavedQueriesDialog.class); + private IApplication _app; private FoldersCache _cache; *************** *** 36,41 **** private JSplitPane _mainSplitPane = new JSplitPane(); private QueryTree _queryTree;// = new QueryTree(); ! private static interface i18n { ! String TITLE = "Saved Queries"; } --- 42,49 ---- private JSplitPane _mainSplitPane = new JSplitPane(); private QueryTree _queryTree;// = new QueryTree(); ! ! private static interface i18n { ! // i18n[favs.savedQueries=Saved Queries] ! String TITLE = s_stringMgr.getString("favs.savedQueries"); } *************** *** 49,55 **** throw new IllegalArgumentException("Null FoldersCache passed"); } ! _app = app; _cache = cache; ! createUserInterface(); setDefaultCloseOperation(DISPOSE_ON_CLOSE); } --- 57,65 ---- throw new IllegalArgumentException("Null FoldersCache passed"); } ! ! _app = app; _cache = cache; ! ! createUserInterface(); setDefaultCloseOperation(DISPOSE_ON_CLOSE); } *************** *** 60,64 **** _queryTree = new QueryTree(_app, _cache); ! _mainSplitPane.setOneTouchExpandable(true); _mainSplitPane.setContinuousLayout(true); --- 70,75 ---- _queryTree = new QueryTree(_app, _cache); ! ! _mainSplitPane.setOneTouchExpandable(true); _mainSplitPane.setContinuousLayout(true); *************** *** 66,70 **** _mainSplitPane.add(new JScrollPane(_queryTree), JSplitPane.LEFT); // _mainSplitPane.add(getDesktopPane(), JSplitPane.RIGHT); ! contentPane.setLayout(new BorderLayout()); contentPane.add(_mainSplitPane, BorderLayout.CENTER); --- 77,82 ---- _mainSplitPane.add(new JScrollPane(_queryTree), JSplitPane.LEFT); // _mainSplitPane.add(getDesktopPane(), JSplitPane.RIGHT); ! ! contentPane.setLayout(new BorderLayout()); contentPane.add(_mainSplitPane, BorderLayout.CENTER); *************** *** 75,77 **** } } ! --- 87,89 ---- } } ! Index: Folder.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/plugins/favs/src/net/sourceforge/squirrel_sql/plugins/favs/Folder.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Folder.java 11 May 2005 04:40:43 -0000 1.2 --- Folder.java 26 Oct 2005 04:47:01 -0000 1.3 *************** *** 29,32 **** --- 29,34 ---- import net.sourceforge.squirrel_sql.fw.persist.IValidatable; import net.sourceforge.squirrel_sql.fw.persist.ValidationException; + import net.sourceforge.squirrel_sql.fw.util.StringManager; + import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory; import net.sourceforge.squirrel_sql.client.util.IdentifierFactory; *************** *** 38,41 **** --- 40,47 ---- public final class Folder implements Cloneable, Serializable, IHasIdentifier, IValidatable /*, IHasName*/ { + + private static final StringManager s_stringMgr = + StringManagerFactory.getStringManager(Folder.class); + private static final String EMPTY_STRING = ""; *************** *** 45,49 **** */ private interface i18n { ! String ERR_BLANK_NAME = "Name cannot be blank."; } --- 51,56 ---- */ private interface i18n { ! // i18n[favs.nameMustNotBeBlank=Name cannot be blank.] ! static String ERR_BLANK_NAME = s_stringMgr.getString("favs.nameMustNotBeBlank"); } *************** *** 172,176 **** return _subFolders.iterator(); } ! public Folder[] getSubFolders() { return (Folder[])_subFolders.toArray(new Folder[_subFolders.size()]); } --- 179,184 ---- return _subFolders.iterator(); } ! ! public Folder[] getSubFolders() { return (Folder[])_subFolders.toArray(new Folder[_subFolders.size()]); } *************** *** 179,183 **** return (Folder)_subFolders.get(idx); } ! public void setSubFolders(Folder[] value) { _subFolders.clear(); if (value != null) { --- 187,192 ---- return (Folder)_subFolders.get(idx); } ! ! public void setSubFolders(Folder[] value) { _subFolders.clear(); if (value != null) { *************** *** 202,204 **** return data != null ? data.trim() : ""; } ! } \ No newline at end of file --- 211,213 ---- return data != null ? data.trim() : ""; } ! } Index: QueryTreeModel.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/plugins/favs/src/net/sourceforge/squirrel_sql/plugins/favs/QueryTreeModel.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** QueryTreeModel.java 17 Nov 2002 09:18:59 -0000 1.1.1.1 --- QueryTreeModel.java 26 Oct 2005 04:47:01 -0000 1.2 *************** *** 31,38 **** --- 31,45 ---- import net.sourceforge.squirrel_sql.fw.util.log.ILogger; import net.sourceforge.squirrel_sql.fw.util.log.LoggerController; + import net.sourceforge.squirrel_sql.fw.util.StringManager; + import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory; import net.sourceforge.squirrel_sql.client.IApplication; final class QueryTreeModel extends DefaultTreeModel { + + private static final StringManager s_stringMgr = + StringManagerFactory.getStringManager(QueryTreeModel.class); + + /** Logger for this class. */ private static ILogger s_log = LoggerController.createLogger(QueryTreeModel.class); *************** *** 49,60 **** * replaced with a property file. */ ! private interface i18n { ! String DATABASE = "Database"; ! // String TITLE = "Catalogs"; // ?? Replace with md.getCatalogueTerm. ! String NO_CATALOG = "No Catalog"; // ?? Replace with md.getCatalogueTerm. ! String MAY_RETURN = "May return a result"; ! String DOESNT_RETURN = "Does not return a result"; ! String DOES_RETURN = "Returns a result"; ! String UNKNOWN = "Unknown"; } --- 56,73 ---- * replaced with a property file. */ ! private static class i18n { ! ! // i18n[favs.database=Database] ! String DATABASE = s_stringMgr.getString("favs.database"); ! // i18n[favs.noCatalog=No Catalog] ! String NO_CATALOG = s_stringMgr.getString("favs.noCatalog"); // ?? Replace with md.getCatalogueTerm. ! // i18n[favs.mayNotReturn=May return a result] ! String MAY_RETURN = s_stringMgr.getString("favs.mayNotReturn"); ! // i18n[favs.doesNotReturn=Does not return a result] ! String DOESNT_RETURN = s_stringMgr.getString("favs.doesNotReturn"); ! // i18n[favs.returns=Returns a result] ! String DOES_RETURN = s_stringMgr.getString("favs.returns"); ! // i18n[favs.unknown=Unknown] ! String UNKNOWN = s_stringMgr.getString("favs.unknown"); } *************** *** 91,95 **** } } ! private void loadSubFolders(FolderNode node) { Folder[] subFolders = node.getFolder().getSubFolders(); for (int i = 0; i < subFolders.length; ++i) { --- 104,109 ---- } } ! ! private void loadSubFolders(FolderNode node) { Folder[] subFolders = node.getFolder().getSubFolders(); for (int i = 0; i < subFolders.length; ++i) { *************** *** 144,146 **** } } ! } \ No newline at end of file --- 158,160 ---- } } ! } |