Index: lutinmatrix/src/java/org/codelutin/math/matrix/gui/MatrixPopupMenu.java diff -u lutinmatrix/src/java/org/codelutin/math/matrix/gui/MatrixPopupMenu.java:1.5 lutinmatrix/src/java/org/codelutin/math/matrix/gui/MatrixPopupMenu.java:1.6 --- lutinmatrix/src/java/org/codelutin/math/matrix/gui/MatrixPopupMenu.java:1.5 Mon Apr 2 10:51:44 2007 +++ lutinmatrix/src/java/org/codelutin/math/matrix/gui/MatrixPopupMenu.java Tue Nov 6 13:39:23 2007 @@ -23,10 +23,10 @@ * Created: 22 mars 2006 12:11:46 * * @author poussin - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ * - * Last update: $Date: 2007-04-02 10:51:44 $ - * by : $Author: bpoussin $ + * Last update: $Date: 2007-11-06 13:39:23 $ + * by : $Author: ruchaud $ */ package org.codelutin.math.matrix.gui; @@ -93,7 +93,7 @@ sendToClipBoard = getSendToClipBoard(); sendToFile = getSendToFile(); - withSemantics = new JCheckBoxMenuItem(_("Export/Copy with semantics"), false); + withSemantics = new JCheckBoxMenuItem(_("lutinmatrix.menu.option.semantics"), false); add(sendToClipBoard); add(sendToFile); @@ -106,11 +106,11 @@ */ public JMenu getSendToClipBoard() { if (sendToClipBoard == null) { - sendToClipBoard = new JMenu(_("Copy/Paste")); - JMenuItem sendToClipBoardAllCopy = new JMenuItem(_("Copy")); - JMenuItem sendToClipBoardAllPaste = new JMenuItem(_("Paste")); - JMenuItem sendToClipBoardSelectionCopy = new JMenuItem(_("Copy selection")); - JMenuItem sendToClipBoardCurrentPaste = new JMenuItem(_("Paste at current position")); + sendToClipBoard = new JMenu(_("lutinmatrix.menu.action")); + JMenuItem sendToClipBoardAllCopy = new JMenuItem(_("lutinmatrix.menu.action.copy")); + JMenuItem sendToClipBoardAllPaste = new JMenuItem(_("lutinmatrix.menu.action.paste")); + JMenuItem sendToClipBoardSelectionCopy = new JMenuItem(_("lutinmatrix.menu.action.copy.selection")); + JMenuItem sendToClipBoardCurrentPaste = new JMenuItem(_("lutinmatrix.menu.action.paste.position")); sendToClipBoard.add(sendToClipBoardAllCopy); sendToClipBoard.add(sendToClipBoardAllPaste); @@ -132,11 +132,11 @@ */ public JMenu getSendToFile() { if (sendToFile == null) { - sendToFile = new JMenu(_("Import/Export file (CSV)")); - JMenuItem sendToFileAllCopy = new JMenuItem(_("Export to file")); - JMenuItem sendToFileAllPaste = new JMenuItem(_("Import from file")); - JMenuItem sendToFileSelectionCopy = new JMenuItem(_("Export selection")); - JMenuItem sendToFileCurrentPaste = new JMenuItem(_("Import at current position")); + sendToFile = new JMenu(_("lutinmatrix.menu.csv")); + JMenuItem sendToFileAllCopy = new JMenuItem(_("lutinmatrix.menu.csv.export.file")); + JMenuItem sendToFileAllPaste = new JMenuItem(_("lutinmatrix.menu.csv.import.file")); + JMenuItem sendToFileSelectionCopy = new JMenuItem(_("lutinmatrix.menu.csv.export.selection")); + JMenuItem sendToFileCurrentPaste = new JMenuItem(_("lutinmatrix.menu.csv.import.position")); sendToFile.add(sendToFileAllCopy); sendToFile.add(sendToFileAllPaste); @@ -372,7 +372,7 @@ matrixEditor.repaint(); } catch (Exception e) { JOptionPane.showMessageDialog(matrixEditor, - _("Impossible d'écrire dans le bloc note"), _("Erreur"), + _("lutinmatrix.error.clipboard.write"), _("lutinmatrix.error"), JOptionPane.ERROR_MESSAGE); e.printStackTrace(); } @@ -387,7 +387,7 @@ matrixEditor.repaint(); } catch (Exception e) { JOptionPane.showMessageDialog(matrixEditor, - _("Donnée corrompu dans le bloc note"), _("Erreur"), + _("lutinmatrix.error.clipboard.read"), _("lutinmatrix.error"), JOptionPane.ERROR_MESSAGE); e.printStackTrace(); } @@ -404,7 +404,7 @@ matrixEditor.repaint(); } catch (Exception e) { JOptionPane.showMessageDialog(matrixEditor, - _("Impossible d'écrire dans le bloc note"), _("Erreur"), + _("lutinmatrix.error.clipboard.write"), _("lutinmatrix.error"), JOptionPane.ERROR_MESSAGE); e.printStackTrace(); } @@ -419,7 +419,7 @@ matrixEditor.repaint(); } catch (Exception e) { JOptionPane.showMessageDialog(matrixEditor, - _("Donnée corrompu dans le bloc note"), _("Erreur"), + _("lutinmatrix.error.clipboard.read"), _("lutinmatrix.error"), JOptionPane.ERROR_MESSAGE); e.printStackTrace(); } @@ -491,7 +491,7 @@ matrixEditor.repaint(); } catch (Exception e) { JOptionPane.showMessageDialog(matrixEditor, - _("Impossible d'écrire dans le fichier"), _("Erreur"), + _("lutinmatrix.error.file.write"), _("lutinmatrix.error"), JOptionPane.ERROR_MESSAGE); e.printStackTrace(); } @@ -506,7 +506,7 @@ matrixEditor.repaint(); } catch (Exception e) { JOptionPane.showMessageDialog(matrixEditor, - _("Impossible de lire le fichier"), _("Erreur"), + _("lutinmatrix.error.file.read"), _("lutinmatrix.error"), JOptionPane.ERROR_MESSAGE); e.printStackTrace(); } @@ -520,7 +520,7 @@ matrixEditor.repaint(); } catch (Exception e) { JOptionPane.showMessageDialog(matrixEditor, - _("Impossible d'écrire dans le fichier"), _("Erreur"), + _("lutinmatrix.error.file.write"), _("lutinmatrix.error"), JOptionPane.ERROR_MESSAGE); e.printStackTrace(); } @@ -535,7 +535,7 @@ matrixEditor.repaint(); } catch (Exception e) { JOptionPane.showMessageDialog(matrixEditor, - _("Impossible de lire le fichier"), _("Erreur"), + _("lutinmatrix.error.file.read"), _("lutinmatrix.error"), JOptionPane.ERROR_MESSAGE); e.printStackTrace(); } Index: lutinmatrix/src/java/org/codelutin/math/matrix/gui/MatrixPanelEditor.java diff -u lutinmatrix/src/java/org/codelutin/math/matrix/gui/MatrixPanelEditor.java:1.13 lutinmatrix/src/java/org/codelutin/math/matrix/gui/MatrixPanelEditor.java:1.14 --- lutinmatrix/src/java/org/codelutin/math/matrix/gui/MatrixPanelEditor.java:1.13 Fri Aug 11 09:29:48 2006 +++ lutinmatrix/src/java/org/codelutin/math/matrix/gui/MatrixPanelEditor.java Tue Nov 6 13:39:23 2007 @@ -24,9 +24,9 @@ * * @author Benjamin Poussin * - * @version $Revision: 1.13 $ + * @version $Revision: 1.14 $ * - * Mise a jour: $Date: 2006-08-11 09:29:48 $ par : $Author: bpoussin $ + * Mise a jour: $Date: 2007-11-06 13:39:23 $ par : $Author: ruchaud $ */ package org.codelutin.math.matrix.gui; @@ -55,6 +55,7 @@ import javax.swing.event.TableModelEvent; import javax.swing.event.TableModelListener; +import org.codelutin.i18n.I18n; import org.codelutin.math.matrix.MatrixException; import org.codelutin.math.matrix.MatrixFactory; import org.codelutin.math.matrix.MatrixND; @@ -164,14 +165,14 @@ protected JButton getButtonEdit() { if (bEdit == null) { - bEdit = new JButton("Creer matrice"); + bEdit = new JButton(I18n._("lutinmatrix.create.matrix.button")); bEdit.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String dim; - dim = JOptionPane.showInputDialog(null, - "Dimensions de la matrice (separees par ';')", - "Creer matrice", JOptionPane.DEFAULT_OPTION); + dim = JOptionPane.showInputDialog(null, + I18n._("lutinmatrix.create.matrix.message"), + I18n._("lutinmatrix.create.matrix.title"), JOptionPane.DEFAULT_OPTION); if (dim != null) { String[] sdim = dim.split(";"); @@ -385,8 +386,12 @@ * Une petite fonction main pour le test... */ public static void main(String[] args) { + I18n.init("fr","FR"); +// I18n.init("en","EN"); + JFrame frame = new JFrame(); MatrixPanelEditor ed = null; + try { ed = new MatrixPanelEditor(true); ed.setLinearModel(false);