Skip to content

Commit

Permalink
Fixing an error in JDR i18n support
Browse files Browse the repository at this point in the history
The re-definition of the _ function didn't apply globally
so messages always fell back to default translation.
  • Loading branch information
jhjaggars authored and bstansberry committed Feb 1, 2012
1 parent 38a49a3 commit b36d4de
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jdr/jboss-as-sos/src/main/resources/sos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ def set_i18n(path=None, basename="sos.po.sos"):
ResourceBundle.getString. This is really only useful when using jython.
Path is expected to be the path to a jarfile that contains the translation
files (.properties)"""

# Since we are trying to modify the module-level _sos variable
# we have to declare it global
global _sos

try:
from java.util import ResourceBundle, Locale

Expand Down

0 comments on commit b36d4de

Please sign in to comment.