Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Keep language when confirming preferences #1455

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment
Closed

Keep language when confirming preferences #1455

openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment

Comments

@openstreetmap-trac
Copy link

Reporter: LonelyPixel
[Submitted to the original trac issue database at 6.50pm, Friday, 9th January 2009]

When I confirm the preferences dialogue, Merkaartor only speaks in
English to me from then on. Before that and after a restart of the
application, it usually speaks in German (my UI default). The problem is
that it won't find my translation files. In MainWindow::updateLanguage()
it only looks in the current directory, but that has oft proven to be in
some distant galaxy. This patch adds the application executable's
directory as a default, like the Qt library's function is the default
for the Qt system language. Additionally, it displays an error message
if a language couldn't be found - and won't change anything (i.e.
install that null pointer language).

This patch basically keeps the language setting for my Merkaartor
version, which it wouldn't do alone. This may be specific to my build
procedure though and may not happen in other builds or platforms. But
then again, I believe that it doesn't harm.

I've been notified that not setting TRANSDIR_MERKAARTOR for qmake is the problem. But as a Windows user, I cannot specify a translation files location before the application has been installed on the target computer. So there must be a deterministic default for Windows, which in turn does not break things on other platforms. Since the current directory is never a reasonable place to look translation files for, the path to the application executable is still better.

@openstreetmap-trac
Copy link
Author

Author: LonelyPixel
[Added to the original trac issue at 3.16pm, Saturday, 10th January 2009]

Implemented in Changeset 13058

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant