Wireshark mailing list archives
Re: Is there a way to internationalize the text of dissector's preference?
From: Guy Harris <gharris () sonic net>
Date: Thu, 5 Nov 2020 08:41:09 -0800
On Nov 5, 2020, at 5:31 AM, qiangxiong.huang <qiangxiong.huang () qq com> wrote:
It seems that only qt releated code (in .cpp) can be internationalized by QString::tr(). Is there a way to internationalize the text of dissector preference which is usually set in epan/dissectors/packet-xxx.c ?
Currently, no. What *could* be done would be to use, in the non-Qt code, the GLib wrappers for gettext(): https://developer.gnome.org/glib/stable/glib-I18N.html (GLib itself requires gettext() to be present, so, if you're building Wireshark, you have the gettext() API available and you have any tools needed to process .po files). Then we'd create .po files for various languages; Transifex can, as far as I know, handle .po files. (This won't internationalize the results of dissection; that could, in principle, be done the same way, but it would be a *HUGE* task.) Note that we would not be internationalizing the names of the preferences, just the descriptions. The preference *names* can be used in shell scripts, e.g. running TShark - or Wireshark! - from the command line with the -o command-line flag, so those shouldn't be internationalized. They only appear in the GUI in the "Advanced" tab of the preferences. (The same would apply to field names, as opposed to field descriptions, as they appear in packet-matching expressions, such as display filters and coloring rules.) ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Is there a way to internationalize the text of dissector's preference? qiangxiong.huang (Nov 05)
- Re: Is there a way to internationalize the text of dissector's preference? Guy Harris (Nov 05)
- Re: Is there a way to internationalize the text of dissector's preference? Alexis La Goutte (Nov 05)
- Re: Is there a way to internationalize the text of dissector's preference? qiangxiong.huang (Nov 06)
- Re: Is there a way to internationalize the text of dissector's preference? Alexis La Goutte (Nov 06)
- Re: Is there a way to internationalize the text of dissector's preference? qiangxiong.huang (Nov 06)