Skip to content

Commit

Permalink
GUI-1081
Browse files Browse the repository at this point in the history
move locale dir to top level out of necessity. move locale files to /usr/share/locale for install, fix build to refer to new locale dir. tell pyramid to look for files in /usr/share/locale
  • Loading branch information
dkavanagh committed Jun 20, 2014
1 parent ffd1b31 commit 939b3d9
Show file tree
Hide file tree
Showing 20 changed files with 16 additions and 16 deletions.
1 change: 1 addition & 0 deletions eucaconsole/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def get_configurator(settings, enable_auth=True):
'eucaconsole.layout:templates/master_layout.pt')
config.add_translation_dirs('eucaconsole:locale')
config.set_locale_negotiator(custom_locale_negotiator)
config.add_translation_dirs('/usr/share/locale')
for route in urls:
config.add_route(route.name, route.pattern)
setup_tweens(config)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ with-coverage = 1
cover-erase = 1

[compile_catalog]
directory = eucaconsole/locale
directory = locale
domain = eucaconsole
statistics = true

[extract_messages]
add_comments = TRANSLATORS:
output_file = eucaconsole/locale/eucaconsole.pot
output_file = locale/eucaconsole.pot
width = 80

[init_catalog]
domain = eucaconsole
input_file = eucaconsole/locale/eucaconsole.pot
output_dir = eucaconsole/locale
input_file = locale/eucaconsole.pot
output_dir = locale

[update_catalog]
domain = eucaconsole
input_file = eucaconsole/locale/eucaconsole.pot
output_dir = eucaconsole/locale
input_file = locale/eucaconsole.pot
output_dir = locale
previous = true
19 changes: 9 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,19 @@

from eucaconsole import __version__

DATA_DIR='./'
DATA_DIR='/usr/share/'

def get_data_files(path):
data_files = {}
data_files = []
for root, _, filenames in os.walk(path, followlinks=True):
data_file_dir = os.path.join(DATA_DIR, root)
for filename in filenames:
data_files.setdefault(data_file_dir, [])
data_files[data_file_dir].append(os.path.join(root, filename))
return list(data_files.items())
files = []
for file in filenames:
files.append(os.path.join(root, file))
data_files.append((os.path.join(DATA_DIR, root), files))
print "data_files = "+str(data_files)
return data_files


DATA_FILES = get_data_files("eucaconsole/locale")

here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.rst')) as f:
README = f.read()
Expand Down Expand Up @@ -151,7 +150,7 @@ def make_release_tree(self, base_dir, files):
'dev': dev_extras,
},
message_extractors=message_extractors,
data_files=DATA_FILES,
data_files=get_data_files("locale"),
test_suite="tests",
entry_points="""\
[paste.app_factory]
Expand Down

0 comments on commit 939b3d9

Please sign in to comment.