Modify

Opened 5 years ago

Closed 5 years ago

#18388 closed defect (fixed)

[GNU/Linux] JOSM does not respect LC_MEASUREMENT locale variable

Reported by: Self-Perfection Owned by: Don-vip
Priority: normal Milestone: 20.01
Component: Core Version:
Keywords: measurement locale Cc:

Description

My current settings are:

$ locale
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES=en_US.UTF-8
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=

And JOSM shows me all distance and speed numbers in feets/miles:

  • zoom is measured in feets or miles,
  • gpx track segments are measured in feets/miles
  • speed in gpx tracks is measured in mph
  • etc

But I expect JOSM to use meteres/kilometers, as dictated by LC_MEASUREMENT="ru_RU.UTF-8"! I figured out, that JOSM uses LC_MESSAGES to select both language of UI strings and measurement units. But only strings language should be affected by LC_MESSAGES variable.

JOSM version is 15492

Attachments (0)

Change History (9)

comment:1 by stoecker, 5 years ago

Resolution: worksforme
Status: newclosed

JOSM has own settings for the units. Default is metric. You somehow changed the units. Either change them at map preferences or right click in the status line on the ruler field and select correct setting.

comment:2 by Self-Perfection, 5 years ago

Aha! Found that setting, using it is a good enough workaround for me.

But still in case of missing line <tag key='system_of_measurement' value='???' (as was for me) JOSM incorrectly relies on LC_MESSAGES instead of LC_MEASUREMENT environment variable. This is still a bug, though might be a trivial.

comment:3 by stoecker, 5 years ago

JOSM is always metric on purpose - except for the US. I don't totally agree with this US change Vincent introduced, as defaulting to imperial is nothing I'd like, but I can live with it.

in reply to:  2 comment:4 by skyper, 5 years ago

Cc: Don-vip added

Replying to Self-Perfection:

But still in case of missing line <tag key='system_of_measurement' value='???' (as was for me) JOSM incorrectly relies on LC_MESSAGES instead of LC_MEASUREMENT environment variable. This is still a bug, though might be a trivial.

I have the same problem that LC_MEASUREMENT is not respected.
It is another regression of r15395.
Please, use the dedicated environment variable if present.

in reply to:  3 comment:5 by skyper, 5 years ago

Replying to stoecker:

JOSM is always metric on purpose - except for the US. I don't totally agree with this US change Vincent introduced, as defaulting to imperial is nothing I'd like, but I can live with it.

As en_US is the default language on many linux distributions, the default setting in JOSM did now change to imperial for many users. Could we, please, somehow change this ?

comment:6 by stoecker, 5 years ago

Milestone: 19.12
Resolution: worksforme
Status: closedreopened

comment:7 by Don-vip, 5 years ago

Cc: Don-vip removed
Keywords: measurement locale added
Owner: changed from team to Don-vip
Priority: minornormal
Status: reopenednew
Version: tested

comment:8 by Don-vip, 5 years ago

Milestone: 19.1220.01

comment:9 by simon04, 5 years ago

Resolution: fixed
Status: newclosed

In 15661/josm:

fix #18388 - SystemOfMeasurement: primarily obtain country from LC_MEASUREMENT

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.