This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sampo.hippelainen
Recipients jcrmatos, python-dev, sampo.hippelainen, serhiy.storchaka, terry.reedy
Date 2022-03-04.14:30:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1646404218.68.0.780743490303.issue31613@roundup.psfhosted.org>
In-reply-to
Content
>Tk does not provide localized [Ok] and [Cancel] buttons.

This is not true. You can call ::msgcat::mc to localize core strings such as "OK" and "Cancel".

The full tk.call becomes

    tk.call("namespace", "eval", "::tk", "::msgcat::mc", s)

to translate a string s, such as "OK".

I have made a custom modified version of simpledialog.py that makes use of this and indeed localizes the OK/Cancel buttons as they would be localized for tk messageboxes (which use Tcl/Tk Core localization). I submitted this now as a GitHub PR.
History
Date User Action Args
2022-03-04 14:30:18sampo.hippelainensetrecipients: + sampo.hippelainen, terry.reedy, python-dev, serhiy.storchaka, jcrmatos
2022-03-04 14:30:18sampo.hippelainensetmessageid: <1646404218.68.0.780743490303.issue31613@roundup.psfhosted.org>
2022-03-04 14:30:18sampo.hippelainenlinkissue31613 messages
2022-03-04 14:30:18sampo.hippelainencreate