[qt] The desktop app crashes when launched in russian locale #1638
Labels
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
2 participants
Due date
No due date set.
Dependencies
No dependencies set.
Reference: organicmaps/organicmaps-tmp#1638
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It works fine with
en
locale though.Looks like parsing of doubles can't handle the comma "," decimal separator used in
ru
locale.@biodranik
Please make sure that you don't have LC_ALL set already in your shell, it overrides everything. Use
LANG=ru_RU.utf8 ../omim-build-debug/OMaps
to override the locale.It starts now, thanks!
Though there is absolutely no change in the app, e.g. the app itself is not translated and e.g. POI names are still shown both in en (first) and ru (second).
Moreover there is no change in the search behavior, e.g. the reason I wanted to start it in ru locale was to test #1621 - when "пит" is entered into the search box it should show a "питьевая вода" search suggestion - but it doesn't (works for en "drink"->"drinking water"). Also when entered manually "питьевая вода" doesn't search for drinking water types.
So I guess the desktop app doesn't support any localization ATM.
On Mac, the map language changes when LANG variable is changed (after unset LC_ALL). It should work also on Linux.
What is displayed in logs? Does it show ru?
I nailed it finally!
The issue was I had a
LANGUAGE=en_US
env var set. Apparently it has a precedence overLANG
.Now when I start
LANGUAGE=ru_RU ../omim-build-release/OMaps -data_path ./data
the map is shown in Russian (and it appears in the logs too). The search works as expected now, except selecting a search suggestion doesn't do anything (its not copied in the search input field).Did it work before overriding? Should be easy to fix IMO.
It would be great to document locale vars for developers.
Nope, it did not work in en locale either.
Now that's really weird - the app shows the russian map always even if I start it with
LANGUAGE=en_US
(and in the log there isLOG TID(1) INFO 0.131926 search/processor.cpp:232 SetPreferredLocale() New preferred locale: en
)When I click "edit place" it shows both ru and en names as containing russian, though before it was russian and english accordingly.
Is it possible the app had overwritten the map data when it was in ru locale? Or maybe it stores the locale is some config?
No, locale is not stored. Please double check all env vars, and try to use LANG
And let's close this issue after updating documentation.
Clicking search results works on Mac, they are properly inserted into the search field.
LANG works only if I unset manually LANGUAGE first, so LANGUAGE seems to have a higher priority. Hence I suggest to add LANGUAGE to the docs.
The issue could be closed now.