Opened 10 years ago

Closed 10 years ago

#1455 closed defect (fixed)

Keep language when confirming preferences

Reported by: LonelyPixel Owned by: cbro@…
Priority: major Milestone:
Component: merkaartor Version:
Keywords: Cc:

Description

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.

Attachments (1)

MainWindow.cpp.diff (1.6 KB) - added by LonelyPixel 10 years ago.
Patch of my proposed implementation

Download all attachments as: .zip

Change History (2)

Changed 10 years ago by LonelyPixel

Attachment: MainWindow.cpp.diff added

Patch of my proposed implementation

comment:1 Changed 10 years ago by LonelyPixel

Resolution: fixed
Status: newclosed

Implemented in Changeset 13058

Note: See TracTickets for help on using tickets.