AI2 Component  (Version nb184)
TranslationContainer.java
Go to the documentation of this file.
1 package com.google.appinventor.components.common;
2 
3 import java.util.HashMap;
4 import java.util.Map;
5 
6 public class TranslationContainer {
7  private Map<String, String> CompTransMap = new HashMap<String, String>();
9 
10  //Palette components name
11  CompTransMap.put("Basic", "基本");
12  CompTransMap.put("Media", "媒体");
13  CompTransMap.put("Animation", "动画");
14  CompTransMap.put("Social", "社交的");
15  CompTransMap.put("Sensors", "传感器");
16  CompTransMap.put("Screen Arrangement", "屏幕布局");
17  CompTransMap.put("LEGO\u00AE MINDSTORMS\u00AE", "乐高机器人套件\u00AE");
18  CompTransMap.put("Other stuff", "其他东西");
19  CompTransMap.put("Not ready for prime time", "测试中的套件");
20  CompTransMap.put("Old stuff", "旧东西");
21 
22  //Basic
23  CompTransMap.put("Button","按钮");
24  CompTransMap.put("Canvas","画布");
25  CompTransMap.put("CheckBox","复选框");
26  CompTransMap.put("Clock","时钟");
27  CompTransMap.put("Image","图像");
28  CompTransMap.put("Label","便签");
29  CompTransMap.put("ListPicker","列表选择器");
30  CompTransMap.put("PasswordTextBox","密码框");
31  CompTransMap.put("TextBox","文本框");
32  CompTransMap.put("TinyDB","细小数据库");
33 
34  //Media
35  CompTransMap.put("Camcorder","摄像机");
36  CompTransMap.put("Camera","相机");
37  CompTransMap.put("ImagePicker","画像选择器");
38  CompTransMap.put("Player","播放器");
39  CompTransMap.put("Sound","声音");
40  CompTransMap.put("VideoPlayer","媒体播放器");
41 
42  //Animation
43  CompTransMap.put("Ball","球");
44  CompTransMap.put("ImageSprite","图片精灵");
45 
46  //Social
47  CompTransMap.put("ContactPicker","联系信息选择器");
48  CompTransMap.put("EmailPicker","邮件选择器");
49  CompTransMap.put("PhoneCall","电话");
50  CompTransMap.put("PhoneNumberPicker","电话号码选择器");
51  CompTransMap.put("Texting","信息");
52  CompTransMap.put("Twitter","Twitter");
53 
54  //Sensor
55  CompTransMap.put("AccelerometerSensor","加速度传感器");
56  CompTransMap.put("LocationSensor","位置传感器");
57  CompTransMap.put("OrientationSensor","方向传感器");
58 
59  //Screen Arrangement
60  CompTransMap.put("HorizontalArrangement", "水平排列");
61  CompTransMap.put("TableArrangement", "表安排");
62  CompTransMap.put("VerticalArrangement", "竖向布置");
63 
64  //Lego Mindstorms
65  CompTransMap.put("NxtColorSensor", "Nxt颜色传感器");
66  CompTransMap.put("NxtDirectCommands", "Nxt直接命令");
67  CompTransMap.put("NxtDrive", "Nxt驱动");
68  CompTransMap.put("NxtLightSensor", "Nxt光传感器");
69  CompTransMap.put("NxtSoundSensor", "Nxt声音传感器");
70  CompTransMap.put("NxtTouchSensor", "Nxt触摸传感器");
71  CompTransMap.put("NxtUltrasonicSensor", "Nxt超声波传感器");
72 
73  //Other stuff
74  CompTransMap.put("ActivityStarter", "活动启动");
75  CompTransMap.put("BarcodeScanner", "条码扫描器");
76  CompTransMap.put("BluetoothClient", "蓝牙客户");
77  CompTransMap.put("BluetoothServer", "蓝牙服务器");
78  CompTransMap.put("Notifier", "通告人");
79  CompTransMap.put("SpeechRecognizer", "语音识别");
80  CompTransMap.put("TextToSpeech", "文本到语音");
81  CompTransMap.put("TinyWebDB", "细小网络数据库");
82  CompTransMap.put("Web", "网络");
83 
84  //Not ready for prime time
85  CompTransMap.put("FusiontablesControl","Fusiontables控制");
86  CompTransMap.put("GameClient","游戏客户端");
87  CompTransMap.put("SoundRecorder","声音记录器");
88  CompTransMap.put("Voting","投票");
89  CompTransMap.put("WebViewer","网页浏览器");
90  };
91 
92  public String getCorrespondingString(String key) {
93  if (CompTransMap.containsKey(key)) {
94  return CompTransMap.get(key);
95  } else {
96  return "Missing name";
97  }
98  }
99 }
com.google.appinventor.components.common.TranslationContainer
Definition: TranslationContainer.java:6
com.google.appinventor.components.common.TranslationContainer.getCorrespondingString
String getCorrespondingString(String key)
Definition: TranslationContainer.java:92
com.google.appinventor.components.common.TranslationContainer.TranslationContainer
TranslationContainer()
Definition: TranslationContainer.java:8