Skip to content

Commit

Permalink
Merge pull request #53 from edx/ned/fixes-for-edx-platform
Browse files Browse the repository at this point in the history
Fixes to keep the latest refactoring working for edx-platform
  • Loading branch information
nedbat committed Jan 23, 2017
2 parents 3906473 + e1750de commit ee649fe
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
10 changes: 10 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ Details of the config.yaml file are in `edx-platform/conf/locale/config.yaml
Changes
=======

v0.3.7
------

* A few small fixes for Django projects.

v0.3.6
------

* Major refactoring to enable use on Django apps as well as Django projects.

v0.3.5
------

Expand Down
6 changes: 3 additions & 3 deletions i18n/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
import argparse
import sys

__version__ = '0.3.6'
from . import config

__version__ = '0.3.7'


class Runner:
Expand Down Expand Up @@ -41,8 +43,6 @@ def run(self, args):
raise NotImplementedError

def __call__(self, **kwargs):
from . import config

args = self.parser.parse_known_args(self.args)[0]
for key, val in kwargs.items():
setattr(args, key, val)
Expand Down
2 changes: 1 addition & 1 deletion i18n/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def run(self, args):
babel_mako_cmd = babel_cmd_template.format(
verbosity=babel_verbosity,
config=babel_mako_cfg,
output=self.base(configuration.CONFIGURATION.source_messages_dir, 'mako.po'),
output=self.base(configuration.source_messages_dir, 'mako.po'),
)

execute(babel_mako_cmd, working_directory=configuration.root_dir, stderr=stderr)
Expand Down
3 changes: 1 addition & 2 deletions i18n/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ def run(self, args):
logging.basicConfig(stream=sys.stdout, level=logging.INFO)

configuration = self.configuration
root_dir = args.root_dir
if args.ltr:
langs = configuration.ltr_langs
elif args.rtl:
Expand All @@ -186,7 +185,7 @@ def run(self, args):
stderr = None
else:
stderr = DEVNULL
execute(compile_cmd, working_directory=root_dir, stderr=stderr)
execute(compile_cmd, working_directory=configuration.root_dir, stderr=stderr)

main = Generate() # pylint: disable=invalid-name

Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

from setuptools import setup

import i18n

setup(
name='edx-i18n-tools',
version=i18n.__version__,
version='0.3.7',
description='edX Internationalization Tools',
author='edX',
author_email='oscm@edx.org',
Expand Down

0 comments on commit ee649fe

Please sign in to comment.