Add translation context for Sensor Options and Track Color Mode.

Convention:
Use "option" to indicate a display string like "sensor_type_option_ant".
Use "value" to indicate a stored value like "sensor_type_value_ant".

Additional proposals not in this changeset:
- rename "Sensor Options" to "Sensor"?
- rename "Track Color Mode" to "Track color"?
This commit is contained in:
Jimmy Shih
2011-10-26 10:41:33 -07:00
parent e7c0f3b5d0
commit 58ce6d8a2c
19 changed files with 198 additions and 150 deletions
+1 -1
View File
@@ -415,5 +415,5 @@ limitations under the License.
<string name="sending">S\'està enviant</string>
<!-- Sensor Type Options -->
<string name="no_sensor_option">Cap</string>
<string name="sensor_type_option_none">Cap</string>
</resources>
+3 -3
View File
@@ -129,7 +129,7 @@ limitations under the License.
-->
<!-- Sensor Type Options -->
<string name="no_sensor_option">Ninguna</string>
<string name="ant_sensor_option">ANT+ Sensores</string>
<string name="ant_bridge_sensor_option">SRM ANT+ Puente</string>
<string name="sensor_type_option_none">Ninguna</string>
<string name="sensor_type_option_ant">ANT+ Sensores</string>
<string name="sensor_type_option_srm_ant_bridge">SRM ANT+ Puente</string>
</resources>
+9 -8
View File
@@ -514,14 +514,15 @@ limitations under the License.
<string name="read_tracks_permission_description">Poder leer datos, como puntos de interés.</string>
<string name="write_tracks_permission_description">Poder escribir datos, como registrar o añadir puntos de interés.</string>
<!-- Sensor Type Options -->
<string name="no_sensor_option">Ninguno</string>
<string name="ant_sensor_option">Sensores ANT+</string>
<string name="ant_bridge_sensor_option">Puente SRM ANT+</string>
<string name="polar_bt_sensor_option">Bluetooth Polar</string>
<string name="zephyr_bt_sensor_option">Bluetooth Zephyr</string>
<!-- Sensor Type Options -->
<string name="sensor_type_option_none">Ninguno</string>
<string name="sensor_type_option_ant">Sensores ANT+</string>
<string name="sensor_type_option_srm_ant_bridge">Puente SRM ANT+</string>
<string name="sensor_type_option_polar">Bluetooth Polar</string>
<string name="sensor_type_option_zephyr">Bluetooth Zephyr</string>
<!-- Track Color Modes -->
<string name="track_color_mode_fixed">Fijo (BETA)</string>
<string name="track_color_mode_dynamic">Dinámico (BETA)</string>
<string name="track_color_mode_option_none">Ninguno</string>
<string name="track_color_mode_option_fixed">Fijo (BETA)</string>
<string name="track_color_mode_option_dynamic">Dinámico (BETA)</string>
</resources>
+5 -5
View File
@@ -499,11 +499,11 @@ limitations under the License.
<string name="searching">Etsitään</string>
<string name="sending">Lähetetään</string>
<string name="no_sensor_option">Ei sensoria</string>
<string name="ant_sensor_option">ANT+ -sensori</string>
<string name="ant_bridge_sensor_option">SRM ANT+ -silta</string>
<string name="polar_bt_sensor_option">Polar bluetooth</string>
<string name="zephyr_bt_sensor_option">Zephyr bluetooth</string>
<string name="sensor_type_option_none">Ei sensoria</string>
<string name="sensor_type_option_ant">ANT+ -sensori</string>
<string name="sensor_type_option_srm_ant_bridge">SRM ANT+ -silta</string>
<string name="sensor_type_option_polar">Polar bluetooth</string>
<string name="sensor_type_option_zephyr">Zephyr bluetooth</string>
<!-- Manifest description (not seen inside the app) -->
<string name="notification_permission_label">vastaanota huomautuksia reitin tallentamisesta</string>
+5 -5
View File
@@ -403,11 +403,11 @@ limitations under the License.
<string name="sending">Envoi</string>
<!-- Sensor Type Options -->
<string name="no_sensor_option">Aucun</string>
<string name="ant_sensor_option">Capteur ANT+</string>
<string name="ant_bridge_sensor_option">Pont SRM ANT+</string>
<string name="polar_bt_sensor_option">Bluetooth Polar</string>
<string name="zephyr_bt_sensor_option">Bluetooth Zephyr</string>
<string name="sensor_type_option_none">Aucun</string>
<string name="sensor_type_option_ant">Capteur ANT+</string>
<string name="sensor_type_option_srm_ant_bridge">Pont SRM ANT+</string>
<string name="sensor_type_option_polar">Bluetooth Polar</string>
<string name="sensor_type_option_zephyr">Bluetooth Zephyr</string>
<!-- Manifest description (not seen inside the app) -->
<string name="notification_permission_label">notifications lors de l\'enregistrement de parcours</string>
+3 -3
View File
@@ -469,9 +469,9 @@ limitations under the License.
<string name="sending">送信中</string>
<!-- Sensor Type Options -->
<string name="no_sensor_option">なし</string>
<string name="ant_sensor_option">ANT+ センサー</string>
<string name="ant_bridge_sensor_option">SRM ANT+ ブリッジ</string>
<string name="sensor_type_option_none">なし</string>
<string name="sensor_type_option_ant">ANT+ センサー</string>
<string name="sensor_type_option_srm_ant_bridge">SRM ANT+ ブリッジ</string>
<!-- Manifest description (not seen inside the app) -->
<string name="notification_permission_label">トラック記録通知受信</string>
+3 -3
View File
@@ -496,9 +496,9 @@ limitations under the License.
<string name="sending">Отправка</string>
<!-- Sensor Type Options -->
<string name="no_sensor_option">Нет</string>
<string name="ant_sensor_option">ANT+ Датчик</string>
<string name="ant_bridge_sensor_option">SRM ANT+ Bridge</string>
<string name="sensor_type_option_none">Нет</string>
<string name="sensor_type_option_ant">ANT+ Датчик</string>
<string name="sensor_type_option_srm_ant_bridge">SRM ANT+ Bridge</string>
<!-- Manifest description (not seen inside the app) -->
<string name="notification_permission_label">получать уведомления о записи трека</string>
+5 -5
View File
@@ -476,10 +476,10 @@ limitations under the License.
<string name="sending">发送中</string>
<!-- Sensor Type Options -->
<string name="no_sensor_option">无</string>
<string name="ant_sensor_option">ANT+ 感应器</string>
<string name="ant_bridge_sensor_option">SRM ANT+ 转接器</string>
<string name="polar_bt_sensor_option">Polar Bluetooth</string>
<string name="zephyr_bt_sensor_option">Zephyr 蓝牙设备</string>
<string name="sensor_type_option_none">无</string>
<string name="sensor_type_option_ant">ANT+ 感应器</string>
<string name="sensor_type_option_srm_ant_bridge">SRM ANT+ 转接器</string>
<string name="sensor_type_option_polar">Polar Bluetooth</string>
<string name="sensor_type_option_zephyr">Zephyr 蓝牙设备</string>
</resources>
+83 -76
View File
@@ -16,37 +16,38 @@ limitations under the License.
-->
<resources>
<!-- Do not translate any arrays in this file. -->
<string-array name="min_required_accuracy_values">
<!-- Display settings -->
<string-array name="track_color_mode_options">
<item>@string/track_color_mode_option_none</item>
<item>@string/track_color_mode_option_fixed</item>
<item>@string/track_color_mode_option_dynamic</item>
</string-array>
<string-array name="track_color_mode_values">
<item>@string/track_color_mode_value_none</item>
<item>@string/track_color_mode_value_fixed</item>
<item>@string/track_color_mode_value_dynamic</item>
</string-array>
<!-- Recording settings -->
<string-array name="task_frequency_values">
<item>0</item>
<item>-100</item>
<item>-50</item>
<item>-25</item>
<item>-10</item>
<item>-5</item>
<item>-1</item>
<item>60</item>
<item>30</item>
<item>15</item>
<item>10</item>
<item>20</item>
<item>50</item>
<item>100</item>
<item>200</item>
<item>500</item>
<item>1000</item>
<item>2000</item>
<item>5000</item>
<item>5</item>
<item>2</item>
<item>1</item>
</string-array>
<string-array name="min_recording_distance_values">
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>10</item>
<item>100</item>
</string-array>
<string-array name="max_recording_distance_values">
<item>50</item>
<item>100</item>
<item>200</item>
<item>500</item>
<item>1000</item>
<item>5000</item>
</string-array>
<string-array name="min_recording_interval_values">
<item>-2</item>
<item>-1</item>
@@ -65,24 +66,38 @@ limitations under the License.
<item>900</item>
<item>1800</item>
</string-array>
<string-array name="task_frequency_values">
<item>0</item>
<item>-100</item>
<item>-50</item>
<item>-25</item>
<item>-10</item>
<item>-5</item>
<item>-1</item>
<item>60</item>
<item>30</item>
<item>15</item>
<item>10</item>
<item>5</item>
<item>2</item>
<string-array name="min_recording_distance_values">
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>10</item>
<item>100</item>
</string-array>
<string-array name="max_recording_distance_values">
<item>50</item>
<item>100</item>
<item>200</item>
<item>500</item>
<item>1000</item>
<item>5000</item>
</string-array>
<string-array name="min_required_accuracy_values">
<item>10</item>
<item>20</item>
<item>50</item>
<item>100</item>
<item>200</item>
<item>500</item>
<item>1000</item>
<item>2000</item>
<item>5000</item>
</string-array>
<string-array name="auto_resume_track_timeout_values">
<item>0</item>
<item>5</item>
@@ -91,43 +106,35 @@ limitations under the License.
<item>-1</item>
</string-array>
<!-- Sensor Options settings -->
<array name="sensor_type_options">
<item>@string/sensor_type_option_none</item>
<item>@string/sensor_type_option_ant</item>
<item>@string/sensor_type_option_srm_ant_bridge</item>
<item>@string/sensor_type_option_polar</item>
<item>@string/sensor_type_option_zephyr</item>
</array>
<array name="sensor_type_values">
<item>@string/sensor_type_value_none</item>
<item>@string/sensor_type_value_ant</item>
<item>@string/sensor_type_value_srm_ant_bridge</item>
<item>@string/sensor_type_value_polar</item>
<item>@string/sensor_type_value_zephyr</item>
</array>
<string-array name="ant_sensor_type_values">
<item>@string/sensor_type_value_ant</item>
<item>@string/sensor_type_value_srm_ant_bridge</item>
</string-array>
<!-- Others -->
<array name="export_formats">
<item>GPX</item>
<item>KML</item>
<item>CSV</item>
<item>TCX</item>
</array>
<array name="sensor_type_options">
<item>@string/no_sensor_option</item>
<item>@string/ant_sensor_option</item>
<item>@string/ant_bridge_sensor_option</item>
<item>@string/polar_bt_sensor_option</item>
<item>@string/zephyr_bt_sensor_option</item>
</array>
<array name="sensor_type_values">
<item>@string/none</item>
<item>@string/ant_sensor_type</item>
<item>@string/srm_ant_bridge_sensor_type</item>
<item>@string/polar_sensor_type</item>
<item>@string/zephyr_sensor_type</item>
</array>
<string-array name="ant_sensor_type_values">
<item>@string/ant_sensor_type</item>
<item>@string/srm_ant_bridge_sensor_type</item>
</string-array>
<string-array name="track_color_mode_options">
<item>@string/none</item>
<item>@string/track_color_mode_fixed</item>
<item>@string/track_color_mode_dynamic</item>
</string-array>
<string-array name="track_color_mode_values">
<item>@string/none</item>
<item>@string/track_color_mode_fixed</item>
<item>@string/track_color_mode_dynamic</item>
</string-array>
</resources>
+11 -6
View File
@@ -29,12 +29,17 @@ limitations under the License.
<string name="about_rdamazio">Rodrigo Damazio Bovendorp</string>
<string name="about_sandor">Sandor Dornbush</string>
<!-- Sensor Types -->
<string name="none">NONE</string>
<string name="ant_sensor_type">ANT</string>
<string name="srm_ant_bridge_sensor_type">SRM_ANT_BRIDGE</string>
<string name="polar_sensor_type">POLAR</string>
<string name="zephyr_sensor_type">ZEPHYR</string>
<!-- Sensor Type values stored in preference -->
<string name="sensor_type_value_none">NONE</string>
<string name="sensor_type_value_ant">ANT</string>
<string name="sensor_type_value_srm_ant_bridge">SRM_ANT_BRIDGE</string>
<string name="sensor_type_value_polar">POLAR</string>
<string name="sensor_type_value_zephyr">ZEPHYR</string>
<!-- Track Color Mode values stored in preference -->
<string name="track_color_mode_value_none">NONE</string>
<string name="track_color_mode_value_fixed">FIXED</string>
<string name="track_color_mode_value_dynamic">DYNAMIC</string>
<!-- Send to Google URLs -->
<string name="sendtogoogle_google_fusiontables_url">google.com/fusiontables</string>
+45 -10
View File
@@ -55,7 +55,8 @@ limitations under the License.
My Location
</string>
<string name="switch_to_sat"
translation_description="In the menu for the map view, to switch the display to the satellite mode.">
translation_description="In the menu for the map view, to switch the display to the satellite
mode.">
Satellite Mode
</string>
<string name="switch_to_map"
@@ -577,13 +578,47 @@ limitations under the License.
MyTracks and start/stop MyTracks recording.</string>
<!-- Sensor Type Options -->
<string name="no_sensor_option">NONE</string>
<string name="ant_sensor_option">ANT+ Sensors</string>
<string name="ant_bridge_sensor_option">SRM ANT+ Bridge</string>
<string name="polar_bt_sensor_option">Polar Bluetooth</string>
<string name="zephyr_bt_sensor_option">Zephyr Bluetooth</string>
<string name="sensor_type_option_none"
translation_description="In the Sensor Options settings page, for the Sensor Type picker, the
dropdown option to not connect to any sensor.">
None
</string>
<string name="sensor_type_option_ant"
translation_description="In the Sensor Options settings page, for the Sensor Type picker, the
dropdown option to connect to an ANT+ sensor.">
ANT+ Sensor
</string>
<string name="sensor_type_option_srm_ant_bridge"
translation_description="In the Sensor Options settings page, for the Sensor Type picker, the
dropdown option to connect to a SRM ANT+ bridge.">
SRM ANT+ Bridge
</string>
<string name="sensor_type_option_polar"
translation_description="In the Sensor Options settings page, for the Sensor Type picker, the
dropdown option to connect to a Polar bluetooth sensor.">
Polar Bluetooth
</string>
<string name="sensor_type_option_zephyr"
translation_description="In the Sensor Options settings page, for the Sensor Type picker, the
dropdown option to connect to a Zephyr bluetooth sensor.">
Zephyr Bluetooth
</string>
<!-- Track Color Modes -->
<string name="track_color_mode_fixed">Fixed (BETA)</string>
<string name="track_color_mode_dynamic">Dynamic (BETA)</string>
</resources>
<!-- Track Color Mode Options -->
<string name="track_color_mode_option_none"
translation_description="In the Display settings page, for the Track Color Mode picker, the
dropdown option to only use one color to color a track.">
One Color
</string>
<string name="track_color_mode_option_fixed"
translation_description="In the Display settings page, for the Track Color Mode picker, the
dropdown option to use different colors to color a track based on fixed speed thresholds.">
Fixed Thresholds
</string>
<string name="track_color_mode_option_dynamic"
translation_description="In the Display settings page, for the Track Color Mode picker, the
dropdown option to use different colors to color a track based on dynamic speed thresholds."
>
Dynamic Thresholds
</string>
</resources>
+2 -2
View File
@@ -39,7 +39,7 @@ limitations under the License.
android:summary="@string/settings_track_color_mode_summary"
android:entries="@array/track_color_mode_options"
android:entryValues="@array/track_color_mode_values"
android:defaultValue="@string/none"/>
android:defaultValue="@string/track_color_mode_value_none"/>
<PreferenceCategory android:title="@string/fixed_speed_options"
android:key="@string/track_color_mode_fixed_speed_options_key">
@@ -162,7 +162,7 @@ limitations under the License.
android:summary="@string/settings_sensor_type_summary"
android:entries="@array/sensor_type_options"
android:entryValues="@array/sensor_type_values"
android:defaultValue="@string/none"/>
android:defaultValue="@string/sensor_type_value_none"/>
<!-- Bluetooth -->
<PreferenceCategory android:title="@string/bluetooth_options">
@@ -323,8 +323,8 @@ public class SettingsActivity extends PreferenceActivity {
private void updateSensorSettings(String sensorType) {
boolean usesBluetooth =
getString(R.string.zephyr_sensor_type).equals(sensorType)
|| getString(R.string.polar_sensor_type).equals(sensorType);
getString(R.string.sensor_type_value_zephyr).equals(sensorType)
|| getString(R.string.sensor_type_value_polar).equals(sensorType);
findPreference(
getString(R.string.bluetooth_sensor_key)).setEnabled(usesBluetooth);
findPreference(
@@ -336,15 +336,15 @@ public class SettingsActivity extends PreferenceActivity {
Preference antSrm = findPreference(getString(R.string.ant_srm_bridge_sensor_id_key));
if (antHrm != null && antSrm != null) {
antHrm
.setEnabled(getString(R.string.ant_sensor_type).equals(sensorType));
.setEnabled(getString(R.string.sensor_type_value_ant).equals(sensorType));
antSrm
.setEnabled(getString(R.string.srm_ant_bridge_sensor_type).equals(sensorType));
.setEnabled(getString(R.string.sensor_type_value_srm_ant_bridge).equals(sensorType));
}
}
private void updateTrackColorModeSettings(String trackColorMode) {
boolean usesFixedSpeed = trackColorMode.equals(getString(R.string.track_color_mode_fixed));
boolean usesDynamicSpeed = trackColorMode.equals(getString(R.string.track_color_mode_dynamic));
boolean usesFixedSpeed = trackColorMode.equals(getString(R.string.track_color_mode_value_fixed));
boolean usesDynamicSpeed = trackColorMode.equals(getString(R.string.track_color_mode_value_dynamic));
findPreference(
getString(R.string.track_color_mode_fixed_speed_slow_display_key)).setEnabled(usesFixedSpeed);
@@ -49,12 +49,12 @@ public class TrackPathPainterFactory {
String colorMode = prefs.getString(context.getString(R.string.track_color_mode_key), null);
Log.i(TAG, "Creating track path painter of type: " + colorMode);
if (colorMode == null || colorMode.equals(context.getString(R.string.none))) {
if (colorMode == null || colorMode.equals(context.getString(R.string.track_color_mode_value_none))) {
return new SingleColorTrackPathPainter(context);
} else if (colorMode.equals(context.getString(R.string.track_color_mode_fixed))) {
} else if (colorMode.equals(context.getString(R.string.track_color_mode_value_fixed))) {
return new DynamicSpeedTrackPathPainter(context,
new FixedSpeedTrackPathDescriptor(context));
} else if (colorMode.equals(context.getString(R.string.track_color_mode_dynamic))) {
} else if (colorMode.equals(context.getString(R.string.track_color_mode_value_dynamic))) {
return new DynamicSpeedTrackPathPainter(context,
new DynamicSpeedTrackPathDescriptor(context));
} else {
@@ -53,13 +53,13 @@ public class SensorManagerFactory {
if (sensor == null) {
return null;
} else if (sensor.equals(context.getString(R.string.ant_sensor_type))) {
} else if (sensor.equals(context.getString(R.string.sensor_type_value_ant))) {
return new AntDirectSensorManager(context);
} else if (sensor.equals(context.getString(R.string.srm_ant_bridge_sensor_type))) {
} else if (sensor.equals(context.getString(R.string.sensor_type_value_srm_ant_bridge))) {
return new AntSRMSensorManager(context);
} else if (sensor.equals(context.getString(R.string.zephyr_sensor_type))) {
} else if (sensor.equals(context.getString(R.string.sensor_type_value_zephyr))) {
return new ZephyrSensorManager(context);
} else if (sensor.equals(context.getString(R.string.polar_sensor_type))) {
} else if (sensor.equals(context.getString(R.string.sensor_type_value_polar))) {
return new PolarSensorManager(context);
} else {
Log.w(Constants.TAG, "Unable to find sensor type: " + sensor);
@@ -15,11 +15,11 @@
*/
package com.google.android.apps.mytracks.services.sensors;
import android.content.Context;
import com.google.android.apps.mytracks.content.Sensor;
import com.google.android.maps.mytracks.R;
import android.content.Context;
/**
* A collection of methods for message parsers.
*
@@ -99,7 +99,7 @@ public class SensorUtils {
public static String getStateAsString(Sensor.SensorState state, Context c) {
switch (state) {
case NONE:
return c.getString(R.string.none);
return c.getString(R.string.sensor_type_value_none);
case CONNECTING:
return c.getString(R.string.connecting);
case CONNECTED:
@@ -46,11 +46,11 @@ public class TrackPathPainterFactoryTest extends TrackPathPainterTestCase {
return;
}
testTrackPathPainterFactorySpecific(context, prefs, R.string.none,
testTrackPathPainterFactorySpecific(context, prefs, R.string.track_color_mode_value_none,
SingleColorTrackPathPainter.class);
testTrackPathPainterFactorySpecific(context, prefs, R.string.track_color_mode_fixed,
testTrackPathPainterFactorySpecific(context, prefs, R.string.track_color_mode_value_fixed,
DynamicSpeedTrackPathPainter.class);
testTrackPathPainterFactorySpecific(context, prefs, R.string.track_color_mode_dynamic,
testTrackPathPainterFactorySpecific(context, prefs, R.string.track_color_mode_value_dynamic,
DynamicSpeedTrackPathPainter.class);
}
@@ -625,7 +625,7 @@ public class TrackRecordingServiceTest
@MediumTest
public void testWithProperties_zephyrSensorType() throws Exception {
functionalTest(R.string.sensor_type_key,
context.getString(R.string.zephyr_sensor_type));
context.getString(R.string.sensor_type_value_zephyr));
}
private ITrackRecordingService bindAndGetService(Intent intent) {
@@ -30,17 +30,17 @@ public class SensorManagerFactoryTest extends AndroidTestCase {
@SmallTest
public void testCreateZephyr() throws Exception {
assertClassForName(ZephyrSensorManager.class, R.string.zephyr_sensor_type);
assertClassForName(ZephyrSensorManager.class, R.string.sensor_type_value_zephyr);
}
@SmallTest
public void testCreateAnt() throws Exception {
assertClassForName(AntDirectSensorManager.class, R.string.ant_sensor_type);
assertClassForName(AntDirectSensorManager.class, R.string.sensor_type_value_ant);
}
@SmallTest
public void testCreateAntSRM() throws Exception {
assertClassForName(AntSRMSensorManager.class, R.string.srm_ant_bridge_sensor_type);
assertClassForName(AntSRMSensorManager.class, R.string.sensor_type_value_srm_ant_bridge);
}
private void assertClassForName(Class<?> c, int i) {