Bundelbuilder should not use localized activity name #1968 (Walter Bender)

The localized activity name is only used for
user-facing strings. The .xo and .tar files are
left in the original name.
This commit is contained in:
Simon Schampijer 2010-06-03 08:56:42 +02:00
parent 883fefe782
commit 3aa0995096
2 changed files with 11 additions and 3 deletions

View File

@ -82,7 +82,7 @@ class Config(object):
def update(self):
self.bundle = bundle = ActivityBundle(self.source_dir)
self.version = bundle.get_activity_version()
self.activity_name = bundle.get_name()
self.activity_name = bundle.get_bundle_name()
self.bundle_id = bundle.get_bundle_id()
self.bundle_name = reduce(lambda x, y: x+y, self.activity_name.split())
self.bundle_root_dir = self.bundle_name + '.activity'

View File

@ -51,6 +51,7 @@ class ActivityBundle(Bundle):
self.bundle_exec = None
self._name = None
self._local_name = None
self._icon = None
self._bundle_id = None
self._mime_types = None
@ -69,6 +70,9 @@ class ActivityBundle(Bundle):
if linfo_file:
self._parse_linfo(linfo_file)
if self._local_name == None:
self._local_name = self._name
def _get_manifest(self):
if self._manifest is None:
self._manifest = self._read_manifest()
@ -217,7 +221,7 @@ class ActivityBundle(Bundle):
section = 'Activity'
if cp.has_option(section, 'name'):
self._name = cp.get(section, 'name')
self._local_name = cp.get(section, 'name')
if cp.has_option(section, 'tags'):
tag_list = cp.get(section, 'tags').strip(';')
@ -240,7 +244,11 @@ class ActivityBundle(Bundle):
return self._path
def get_name(self):
"""Get the activity user visible name."""
"""Get the activity user-visible name."""
return self._local_name
def get_bundle_name(self):
"""Get the activity bundle name."""
return self._name
def get_installation_time(self):