mendhak / gpslogger

:satellite: Lightweight GPS Logging Application For Android.
https://gpslogger.app
Other
2k stars 609 forks source link

multi-laguage entries in protocol #1005

Open sjvudp opened 2 years ago

sjvudp commented 2 years ago

I noticed (for a German Android 12) that some message sin the protocol have the English and the German string in one entry. I guess that is not intended. Maybe the translation file is just not correct for German. Can you check and confirm?

(I'd like to paste an example here, but I found no way to get the protocol messages into an editor)

Examples (copied by typing):

Nur 0.0 m zurückgelegt. Messunkt verworfen., point discarded

Only accuracy of 83.1 m. Point discarded.Ungenauer Messpunkt verworfen

mendhak commented 2 years ago

Oh I think there are some strings being displayed mixed with hardcoded strings that weren't put up for translation.

The first one is here: https://github.com/mendhak/gpslogger/blob/db9869a01cdd48e338067b77b82ccce9bba38284/gpslogger/src/main/java/com/mendhak/gpslogger/GpsLoggingService.java#L900

For the second one it's this: https://github.com/mendhak/gpslogger/blob/db9869a01cdd48e338067b77b82ccce9bba38284/gpslogger/src/main/java/com/mendhak/gpslogger/GpsLoggingService.java#L871

I think I had left some English in there to help with debugging, since these same messages go in the debug log and I help other users with troubleshooting. Not sure if there's a better way to do that.

sjvudp commented 2 years ago

I can think of two solutions:

  1. Don't translate any string on the debug log
  2. Assign some identifier to each log message that isn't translated, like "I000: Starting application" (I would mean that it's an informational message, and the number would be just a sequential number)

Alternatively you could construct some tool that translates back the localized messages to the English original.