Skip to content

Commit

Permalink
add PicturePanel Chinese translation
Browse files Browse the repository at this point in the history
  • Loading branch information
wszf committed Apr 27, 2014
1 parent b941539 commit e75c27e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/AndroratServer/src/gui/UserGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -370,15 +370,15 @@ public void saveVideoChannel(int channel) {
private void fireButtonTakePicture() {
if(picturePanel == null) {
picturePanel = new PicturePanel(this);
tabbedPane.addTab("Picture viewer", picturePanel);
tabbedPane.addTab(BUNDLE.getString("Picture-viewer"), picturePanel);
}
tabbedPane.setSelectedComponent(picturePanel);
}

private void fireButtonFileTree() {
if(fileTreePanel == null) {
fileTreePanel = new FileTreePanel(this);
tabbedPane.addTab("File tree viewer", fileTreePanel);
tabbedPane.addTab(BUNDLE.getString("File-tree-viewer"), fileTreePanel);
}
tabbedPane.setSelectedComponent(fileTreePanel);
}
Expand Down
4 changes: 3 additions & 1 deletion src/AndroratServer/src/gui/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,6 @@ Sound-listener=Sound listener
Video-player=Video player
SMS-viewer=SMS viewer
colse-home-title=You can't close the home tab !
Forbidden-action=Forbidden action
Forbidden-action=Forbidden action
Picture-viewer=Picture viewer
File-tree-viewer=File tree viewer
4 changes: 3 additions & 1 deletion src/AndroratServer/src/gui/messages_zh_CN.properties
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,6 @@ Sound-listener=\u58F0\u97F3\u76D1\u542C
Video-player=\u89C6\u9891\u64AD\u653E
SMS-viewer=\u77ED\u4FE1\u6D4F\u89C8
close-home-title=\u4F60\u4E0D\u80FD\u5173\u95ED\u4E3B\u9762\u677F
Forbidden-action=\u7981\u6B62\u64CD\u4F5C
Forbidden-action=\u7981\u6B62\u64CD\u4F5C
Picture-viewer=\u56FE\u7247\u6D4F\u89C8
File-tree-viewer=\u6587\u4EF6\u6D4F\u89C8
8 changes: 5 additions & 3 deletions src/AndroratServer/src/gui/panel/PicturePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.border.EtchedBorder;
import javax.swing.border.TitledBorder;
import java.util.ResourceBundle;

public class PicturePanel extends JPanel {
private static final ResourceBundle BUNDLE = ResourceBundle.getBundle("gui.panel.messages"); //$NON-NLS-1$

private JLabel imgLabel;
private JPanel panel;
Expand All @@ -51,7 +53,7 @@ public class PicturePanel extends JPanel {
public PicturePanel(UserGUI gui) {
this.gui = gui;

Object[] items = {"Back camera", "Front camera"};
Object[] items = {BUNDLE.getString("Back-camera"), BUNDLE.getString("Front-camera")};

splitPane = new JSplitPane();
splitPane.setResizeWeight(1.0);
Expand Down Expand Up @@ -90,7 +92,7 @@ public void mouseClicked(MouseEvent e) {
});

panel_2 = new JPanel();
panel_2.setBorder(new TitledBorder(null, "Options", TitledBorder.LEADING, TitledBorder.TOP, null, null));
panel_2.setBorder(new TitledBorder(null, BUNDLE.getString("Options"), TitledBorder.LEADING, TitledBorder.TOP, null, null));
GroupLayout gl_panel_1 = new GroupLayout(panel_1);
gl_panel_1.setHorizontalGroup(
gl_panel_1.createParallelGroup(Alignment.LEADING)
Expand All @@ -112,7 +114,7 @@ public void mouseClicked(MouseEvent e) {
);
comboBox = new JComboBox(items);

JButton btnTakePicture = new JButton("Take Picture");
JButton btnTakePicture = new JButton(BUNDLE.getString("Take-Picture"));
btnTakePicture.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fireTakePicture();
Expand Down
7 changes: 6 additions & 1 deletion src/AndroratServer/src/gui/panel/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,9 @@ Access;=Access :
Last-modification;=Last modification :
Download-directory=Download directory :
Download-File=Download File
Get-FileTree=Get FileTree
Get-FileTree=Get FileTree
#PicturePanel
Back-camera=Back camera
Front-camera=Back camera
Options=Options
Take-Picture=Take Picture
7 changes: 6 additions & 1 deletion src/AndroratServer/src/gui/panel/messages_zh.properties
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,9 @@ Access;=\u8BBF\u95EE :
Last-modification;=\u6700\u540E\u4FEE\u6539 :
Download-directory;=\u4E0B\u8F7D\u76EE\u5F55 :
Download-File=\u4E0B\u8F7D\u6587\u4EF6
Get-FileTree=\u83B7\u53D6\u6587\u4EF6\u5217\u8868
Get-FileTree=\u83B7\u53D6\u6587\u4EF6\u5217\u8868
#PicturePanel
Back-camera=\u540E\u6444\u50CF\u5934
Front-camera=\u524D\u6444\u50CF\u5934
Options=\u9009\u9879
Take-Picture=\u62CD\u6444\u56FE\u7247

0 comments on commit e75c27e

Please sign in to comment.