Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates #4355

Closed
wants to merge 1 commit into from
Closed

updates #4355

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions doc/gui/wxpython/example/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,25 @@
@author Anna Petrasova <kratochanna gmail.com>
"""

import wx

# i18n is taken care of in the grass library code.
# So we need to import it before any of the GUI code.
# NOTE: in this particular case, we don't really need the grass library;
# NOTE: we import it just for the side effects of gettext.install()
import grass

import os
import sys
import wx
import gettext
from core import globalvar
from gui_core.dialogs import SimpleDialog
from gui_core import gselect

# this enables to run application standalone (> python example/frame.py )
if __name__ == "__main__":
sys.path.append(os.path.join(os.environ["GISBASE"], "etc", "gui", "wxpython"))

# Instead of importing grass, we directly import the gettext function
gettext.install("grasswxpy", localedir=None, unicode=True)


class ExampleMapDialog(SimpleDialog):
"""!Dialog for adding raster map.
Expand Down
Loading