[Ovmsdev] OVMS Android localization

Denis KRAUTH denis.krauth at wanadoo.fr
Sun May 12 02:42:49 HKT 2013


Mark,

 

In addition to my previous message, I parsed the source files on github.

I am no java developer, but I think following strings need to be made
localizable too:

 

In src / com / openvehicles / OVMS / api / ApiTask.java

                337         mCarData.car_speed_units =
(mCarData.car_distance_units_raw.equals("M"))?"mph":"kph";

                               // “kph” should be localizable (“km/h” for
example)

                573         mCarData.car_tpms_fl_p =
String.format("%.1f%s",mCarData.car_tpms_fl_p_raw, "psi");

                574         mCarData.car_tpms_fr_p =
String.format("%.1f%s",mCarData.car_tpms_fr_p_raw, "psi");

                575         mCarData.car_tpms_rl_p =
String.format("%.1f%s",mCarData.car_tpms_rl_p_raw, "psi");

                576         mCarData.car_tpms_rr_p =
String.format("%.1f%s",mCarData.car_tpms_rr_p_raw, "psi");

                               // “kPa” should be used (and conversion
performed) when metric units are selected, instead of “psi”.

 

In src / com / openvehicles / OVMS / receiver / C2DMReceiver.java

                64           Toast.makeText(context, "Push Notification
Registered", Toast.LENGTH_SHORT).show();

 

In src / com / openvehicles / OVMS / ui / CarFragment.java

                119         menu.setHeaderTitle("Homelink");

179         tv.setText("1 min");

183         tv.setText(String.format("%d days",days));

187         tv.setText(String.format("%d hours",hours));

191         tv.setText(String.format("%d mins",minutes));

195         tv.setText(String.format("%d mins",minutes));

213         tv.setText("just now");

215         tv.setText("1 min");

217         tv.setText(String.format("%d days",days));

219         tv.setText(String.format("%d hours",hours));

221         tv.setText(String.format("%d mins",minutes));

223         tv.setText(String.format("%d mins",minutes));

 

In src / com / openvehicles / OVMS / ui / MapFragment.java

                98           String lastReportDate =
pCarData.car_lastupdated == null ? "-" :

new SimpleDateFormat("MMM d, k:mm:ss").format(pCarData.car_lastupdated);

                100         OverlayItem overlayItem = new
OverlayItem(mLastGeoPoint, pCarData.sel_vehicleid,

                                               String.format("Last reported:
%s", lastReportDate));

 

In src / com / openvehicles / OVMS / utils / CarsStorage.java

                86           demoCar.sel_vehicle_label = "Demonstration
Car";

 

In src / com / openvehicles / OVMS / utils / OVMSNotifications.java

37           addNotification("Push Notifications", "Push notifications
received for your registered vehicles are archived here.");

 

Regarding notifications, I don’t know if there is a mechanism in Android
(there is one in webOS, that’s why I ask) that allows to translate dynamic
strings, so that typical notification strings can be translated too.

If there is such a mechanism, it should be added in OVMSNotifications.java
in functions such as “public void addNotification(String title, String
message)”

Then, the list of the notifications that can potentially be send from the
module would be needed to add the corresponding translations to the
translations resources file.

 

PS: Sorry, I just saw the messages from today, and that you already worked
on it, but I think there are still some I’ve listed above that are still
missing.

 

Denis.

 

Mark,

 

Thank you for the APK.

 

I ironed out some translations, and attached the new version of the French
translation file.

 

I found some strings that seem not localizable and are probably hard-coded:

“Demonstration Car”

“live”

 “just now”

“kph”

“CHARGING”

 “SLIDE TO CHARGE”

“Valet Mode Activated”

“Valet Mode Deactivated”

“Vehicle Locked”

“Vehicle Unlocked”

“Vehicle Awake”

“Push Notifications”

“Push notifications received for your registered vehicles are archived
here.”

“Command unenplemented”

“Module Rebooted”

and the strings displayed beside the parking and the antenna symbol (, “x
min”, “x hours”, etc)

 

 

Tires pressure seems to be hard-coded in psi. Here we use kPa. Can this be
changed in the app?

 

Denis.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20130511/00bb75d3/attachment.htm>


More information about the OvmsDev mailing list