Wireshark mailing list archives

Re: Localization problem with UTF entities


From: Alexis La Goutte <alexis.lagoutte () gmail com>
Date: Mon, 28 Mar 2016 12:44:04 +0200

On Thu, Mar 24, 2016 at 10:43 PM, Thomas Wiens <th.wiens () gmx de> wrote:

found out that changing the entry in "wireshark_de.ts" to:
<source>Check for Updates…</source>
still does the job.

I have missed the point to regenerate the .qm file, calling lrelease
program from Qt directory.

But the .ts files are automatically generated by lupdate from the
cpp-sourcefiles. So manually adding the "…" into the .ts file(s) is not
a solution.
I think there are at least two solutions:

1) Before calling lupdate use scripting/temporary files and replace <"
UTF8_HORIZONTAL_ELLIPSIS> with <"…">, and all other UTF8 entities used
in the .cpp sourcefiles.

2) Move the UTF chars outside from tr(). E.g. replace:

QAction *update_action = new QAction(tr("Check for Updates"
UTF8_HORIZONTAL_ELLIPSIS), main_ui_->menuHelp);

with:

QAction *update_action = new QAction(tr("Check for Updates") +
UTF8_HORIZONTAL_ELLIPSIS, main_ui_->menuHelp);

and all other occurrencies of UTF8 entities, with the disadvantage of
string concatenation during runtime.
For any reason, changing the language does only affect this entry when
wireshark is restarted. All other texts change immediately.


I think 1) is the better solution, as lupdate is not called during the
msbuild process as far as I can see.
Who does this job (calling update-tx) to sync with Transifex and
generate the .ts / .qm files?

Hi,

I prefer solution 2, no need to to change update process translation...

Also about no update after changing language on preference, it is a known
issue (there is a bug for this)
We need to (re) add text about need relaunch Wireshark to have all string
update

Cheers


--
Thomas
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org
?subject=unsubscribe

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: