Unexpected messages appear during localization

29 views
Skip to first unread message

Aleksey Litvinov

unread,
Jun 16, 2016, 8:40:45 PM6/16/16
to Google Sky Map

Hi guys,

 

I try to localize sky-map to Russian language and have two questions:

 

1. At first I corrected text in language_apology.xml and corrected some values for popular_date_examples list and sensor_damping list in arrays.xml.

When I built and installed apk it seems to be ok.

 

Then I added new record with translation to strings.xml file:

<string name="menu_calibrate">Калибровать</string>

 

Button menu_calibrate was renamed correctly but some unexpected messages appear on the screen:

"Google"

"Do not show this message again"

"Why do we ask for your location?"

some_hex_value:android:some_hex_value

Please see attached screenshot (red boxes added by me.) 

These messages move with Earth's rotation.

 

What could be the problem here?

 

2. In app\src\main\res\values castellation names spreaded along celestial_objects.xml and strings.xml.

Should they be saved in one file as it is one entity?

 

P.S. When I add celestial_objects.xml with translation to app\src\main\res\values-ru the unexpected messages appear on the screen as well.

 

Please advise how to avoid first issue and probably you have some approach to translation (which files should I modify/which shouldn't or some other advices).

Screenshot_1.png

John Taylor

unread,
Jul 4, 2016, 3:33:20 PM7/4/16
to Google Sky Map
Oh hi Alex - I just noticed your fork and asked if I could merge it!  Thanks for doing this - it is *so* appreciated.

To answer question 1.  The reason is because of the strange and inelegant way we handle the names of celestial objects in the data files.  As I'm sure you know, each string in Android is referenced by an integer ID.  The integer IDs corresponding to each celestial object are hard-coded in the data files.  If you add a new string then the ID<>string mapping is changed, and the IDs in the data files are no longer correct.  If you are lucky you see the effect you saw - the strings are inappropriate.  If you're unlucky the app will crash.

The way to deal with this is to regenerate the data files if you change the number of strings.  There's a shell script that will do this for you - 

For question 2.  Yes.  This is a work in progress to partition the strings into different files.  My hope is that this will make translations easier to manage, but I haven't completed the job yet.  I'll try to do that soon.  Have you already started work on those two files?  If so, I'll refrain from doing any major changes to avoid giving you merge troubles.

John

--
You received this message because you are subscribed to the Google Groups "Google Sky Map" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-sky-ma...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aleksey Litvinov

unread,
Jul 5, 2016, 1:29:46 PM7/5/16
to Google Sky Map
Hi John,

Thank you for explanation.
I didn't work on celestial_objects.xml and strings.xml files, only corrected existing records.
So you could merge changes and then just notify me when you finished with updates to these files so I'll continue.

Alex

понедельник, 4 июля 2016 г., 22:33:20 UTC+3 пользователь John Taylor написал:

John Taylor

unread,
Jul 5, 2016, 2:12:20 PM7/5/16
to Google Sky Map
Thanks Alex - I've merged in your current changes.
Reply all
Reply to author
Forward
0 new messages