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:
parent
883fefe782
commit
3aa0995096
@ -82,7 +82,7 @@ class Config(object):
|
|||||||
def update(self):
|
def update(self):
|
||||||
self.bundle = bundle = ActivityBundle(self.source_dir)
|
self.bundle = bundle = ActivityBundle(self.source_dir)
|
||||||
self.version = bundle.get_activity_version()
|
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_id = bundle.get_bundle_id()
|
||||||
self.bundle_name = reduce(lambda x, y: x+y, self.activity_name.split())
|
self.bundle_name = reduce(lambda x, y: x+y, self.activity_name.split())
|
||||||
self.bundle_root_dir = self.bundle_name + '.activity'
|
self.bundle_root_dir = self.bundle_name + '.activity'
|
||||||
|
@ -51,6 +51,7 @@ class ActivityBundle(Bundle):
|
|||||||
self.bundle_exec = None
|
self.bundle_exec = None
|
||||||
|
|
||||||
self._name = None
|
self._name = None
|
||||||
|
self._local_name = None
|
||||||
self._icon = None
|
self._icon = None
|
||||||
self._bundle_id = None
|
self._bundle_id = None
|
||||||
self._mime_types = None
|
self._mime_types = None
|
||||||
@ -69,6 +70,9 @@ class ActivityBundle(Bundle):
|
|||||||
if linfo_file:
|
if linfo_file:
|
||||||
self._parse_linfo(linfo_file)
|
self._parse_linfo(linfo_file)
|
||||||
|
|
||||||
|
if self._local_name == None:
|
||||||
|
self._local_name = self._name
|
||||||
|
|
||||||
def _get_manifest(self):
|
def _get_manifest(self):
|
||||||
if self._manifest is None:
|
if self._manifest is None:
|
||||||
self._manifest = self._read_manifest()
|
self._manifest = self._read_manifest()
|
||||||
@ -217,7 +221,7 @@ class ActivityBundle(Bundle):
|
|||||||
section = 'Activity'
|
section = 'Activity'
|
||||||
|
|
||||||
if cp.has_option(section, 'name'):
|
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'):
|
if cp.has_option(section, 'tags'):
|
||||||
tag_list = cp.get(section, 'tags').strip(';')
|
tag_list = cp.get(section, 'tags').strip(';')
|
||||||
@ -240,7 +244,11 @@ class ActivityBundle(Bundle):
|
|||||||
return self._path
|
return self._path
|
||||||
|
|
||||||
def get_name(self):
|
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
|
return self._name
|
||||||
|
|
||||||
def get_installation_time(self):
|
def get_installation_time(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user