Skip to content

Commit

Permalink
add VideoPanel Chinese translation
Browse files Browse the repository at this point in the history
  • Loading branch information
wszf committed Aug 10, 2014
1 parent 4c1e4cc commit 6de7014
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
16 changes: 10 additions & 6 deletions src/AndroratServer/src/gui/panel/VideoPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import javax.swing.border.EmptyBorder;
import javax.swing.border.LineBorder;

import sun.management.OperatingSystemImpl;
import uk.co.caprica.vlcj.binding.LibVlc;
import uk.co.caprica.vlcj.player.MediaPlayerFactory;
import uk.co.caprica.vlcj.player.embedded.EmbeddedMediaPlayer;
Expand All @@ -41,16 +42,18 @@

import com.sun.jna.Native;
import com.sun.jna.NativeLibrary;
import java.util.ResourceBundle;

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

/**
* The standard aspect ratios.
*/
private static final String[][] ASPECTS =
{
{ "<choose...>", null },
{ "<"+BUNDLE.getString("choose")+"...>", null },
{ "16:10", "16:10" },
{ "16:9", "16:9" },
{ "1.85:1", "185:100" },
Expand Down Expand Up @@ -89,7 +92,8 @@ public class VideoPanel extends JPanel
*/
public VideoPanel(UserGUI gui)
{
NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), "D://Util/VLC");
// NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), "D://Util/VLC");
NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), "system/library/vlc/linux");
Native.loadLibrary(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class);
this.gui = gui ;
factory = new MediaPlayerFactory("--no-video-title-show");
Expand All @@ -111,7 +115,7 @@ public VideoPanel(UserGUI gui)

mediaPlayer.setVideoSurface(videoSurface);

standardAspectLabel = new JLabel("Standard Aspect:");
standardAspectLabel = new JLabel(BUNDLE.getString("Standard-Aspect")); //$NON-NLS-1$
standardAspectLabel.setDisplayedMnemonic('s');

standardAspectComboBox = new JComboBox(ASPECTS);
Expand All @@ -135,7 +139,7 @@ public Component getListCellRendererComponent(JList list, Object value, int inde

lblStop = new JLabel(reziseImage("/gui/res/gtk-media-stop.png"));
lblStop.setEnabled(false);
btnStartStream = new JButton("Start stream");
btnStartStream = new JButton(BUNDLE.getString("Start-stream")); //$NON-NLS-1$

controlsPane = new JPanel();
controlsPane.setLayout(new BoxLayout(controlsPane, BoxLayout.X_AXIS));
Expand All @@ -157,7 +161,7 @@ public Component getListCellRendererComponent(JList list, Object value, int inde
contentPane.add(videoPane, BorderLayout.CENTER);
contentPane.add(controlsPane, BorderLayout.SOUTH);
//*
frame = new JFrame("Video streaming");
frame = new JFrame(BUNDLE.getString("Video-streaming"));
frame.setContentPane(contentPane);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

Expand Down Expand Up @@ -243,7 +247,7 @@ public void fireButtonStartStreaming()
{
fout = new FileOutputStream(new File(filename));
gui.fireStartVideoStream();
btnStartStream.setText("Stop Streaming");
btnStartStream.setText(BUNDLE.getString("Stop-Streaming"));
streaming = true;
} catch (FileNotFoundException e)
{
Expand Down
8 changes: 7 additions & 1 deletion src/AndroratServer/src/gui/panel/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,10 @@ Unread=Unread
Read=Read
Body-keyword=Body keyword :
Get-SMS=Get SMS
sms-filters=Optionnal filters
sms-filters=Optionnal filters
#VideoPanel
choose=choose
Standard-Aspect=Standard Aspect:
Start-stream=Start stream
Stop-Streaming=Stop Streaming
Video-streaming=Video streaming
8 changes: 7 additions & 1 deletion src/AndroratServer/src/gui/panel/messages_zh.properties
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,10 @@ Unread=\u672A\u8BFB
Read=\u5DF2\u8BFB
Body-keyword=\u5185\u5BB9\u5173\u952E\u5B57:
Get-SMS=\u83B7\u53D6\u77ED\u4FE1
sms-filters=\u8FC7\u6EE4\u9009\u9879
sms-filters=\u8FC7\u6EE4\u9009\u9879
#VideoPanel
choose=\u9009\u62E9
Standard-Aspect=\u9009\u62E9\u5C3A\u5BF8:
Start-stream=\u5F00\u59CB\u64AD\u653E
Stop-Streaming=\u505C\u6B62\u64AD\u653E
Video-streaming=\u89C6\u9891\u64AD\u653E

0 comments on commit 6de7014

Please sign in to comment.