mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
fix grammar and tone of the user messages
This commit is contained in:
parent
1750d565b4
commit
b526757405
1 changed files with 42 additions and 41 deletions
|
|
@ -352,8 +352,8 @@ class SyncEntitiesFactory:
|
||||||
|
|
||||||
def filter_by_duplicate_regex(self):
|
def filter_by_duplicate_regex(self):
|
||||||
filter_queue = queue.Queue()
|
filter_queue = queue.Queue()
|
||||||
failed_regex_msg = "{} - Entity has invalid symbol/s in name"
|
failed_regex_msg = "{} - Entity has invalid symbols in the name"
|
||||||
duplicate_msg = "Multiple entities have name \"{}\":"
|
duplicate_msg = "There are multiple entities with the name: \"{}\":"
|
||||||
|
|
||||||
for ids in self.failed_regex.values():
|
for ids in self.failed_regex.values():
|
||||||
for id in ids:
|
for id in ids:
|
||||||
|
|
@ -779,8 +779,8 @@ class SyncEntitiesFactory:
|
||||||
|
|
||||||
if not_set_ids:
|
if not_set_ids:
|
||||||
self.log.debug((
|
self.log.debug((
|
||||||
"- Debug information: Filtering bug, in entities dict are "
|
"- Debug information: Filtering bug, there are empty dicts"
|
||||||
"empty dicts (function should not affect) <{}>"
|
"in entities dict (functionality should not be affected) <{}>"
|
||||||
).format("| ".join(not_set_ids)))
|
).format("| ".join(not_set_ids)))
|
||||||
for id in not_set_ids:
|
for id in not_set_ids:
|
||||||
self.entities_dict.pop(id)
|
self.entities_dict.pop(id)
|
||||||
|
|
@ -970,7 +970,7 @@ class SyncEntitiesFactory:
|
||||||
self.deleted_entities = deleted_entities
|
self.deleted_entities = deleted_entities
|
||||||
|
|
||||||
self.log.debug((
|
self.log.debug((
|
||||||
"Ftrack -> Avalon comparation: New <{}> "
|
"Ftrack -> Avalon comparison: New <{}> "
|
||||||
"| Existing <{}> | Deleted <{}>"
|
"| Existing <{}> | Deleted <{}>"
|
||||||
).format(
|
).format(
|
||||||
len(create_ftrack_ids),
|
len(create_ftrack_ids),
|
||||||
|
|
@ -1103,9 +1103,9 @@ class SyncEntitiesFactory:
|
||||||
))
|
))
|
||||||
self._ent_pats_by_ftrack_id.pop(ftrack_id, None)
|
self._ent_pats_by_ftrack_id.pop(ftrack_id, None)
|
||||||
msg = (
|
msg = (
|
||||||
"<Entity renamed back> It is not allowed to change"
|
"<Entity renamed back> It is not possible to change"
|
||||||
" name of entity or it's parents"
|
" the name of an entity or it's parents, "
|
||||||
" that already has published context"
|
" if it already contained published data."
|
||||||
)
|
)
|
||||||
self.report_items["warning"][msg].append(ent_path)
|
self.report_items["warning"][msg].append(ent_path)
|
||||||
|
|
||||||
|
|
@ -1125,14 +1125,14 @@ class SyncEntitiesFactory:
|
||||||
# TODO logging
|
# TODO logging
|
||||||
ent_path = self.get_ent_path(ftrack_id)
|
ent_path = self.get_ent_path(ftrack_id)
|
||||||
msg = (
|
msg = (
|
||||||
"<Entity moved back in hierachy> It is not allowed"
|
"<Entity moved back in hierachy> It is not possible"
|
||||||
" to change hierarchy of entity or it's parents"
|
" to change the hierarchy of an entity or it's parents,"
|
||||||
" that already has published context"
|
" if it already contained published data."
|
||||||
)
|
)
|
||||||
self.report_items["warning"][msg].append(ent_path)
|
self.report_items["warning"][msg].append(ent_path)
|
||||||
self.log.warning((
|
self.log.warning((
|
||||||
"Entity has published context so was moved"
|
" Entity contains published data so it was moved"
|
||||||
" back in hierarchy <{}>"
|
" back to it's original hierarchy <{}>"
|
||||||
).format(ent_path))
|
).format(ent_path))
|
||||||
self.entities_dict[ftrack_id]["entity"]["parent_id"] = (
|
self.entities_dict[ftrack_id]["entity"]["parent_id"] = (
|
||||||
old_ftrack_parent_id
|
old_ftrack_parent_id
|
||||||
|
|
@ -1173,14 +1173,14 @@ class SyncEntitiesFactory:
|
||||||
# TODO logging
|
# TODO logging
|
||||||
# TODO report (turn off auto-sync?)
|
# TODO report (turn off auto-sync?)
|
||||||
self.log.error((
|
self.log.error((
|
||||||
"Entity has published context but was moved in"
|
"The entity contains published data but it was moved to"
|
||||||
" hierarchy and previous parent was not found so it is"
|
" a different place in the hierarchy and it's previous"
|
||||||
" not possible to solve this programmatically <{}>"
|
" parent cannot be found."
|
||||||
|
" It's impossible to solve this programmatically <{}>"
|
||||||
).format(ent_path))
|
).format(ent_path))
|
||||||
msg = (
|
msg = (
|
||||||
"<Entity not synchronizable> Parent of entity can't be"
|
"<Entity can't be synchronised> Hierarchy of an entity" " can't be changed due to published data and missing"
|
||||||
" changed due to published context and previous parent"
|
" previous parent"
|
||||||
" was not found"
|
|
||||||
)
|
)
|
||||||
self.report_items["error"][msg].append(ent_path)
|
self.report_items["error"][msg].append(ent_path)
|
||||||
self.filter_with_children(ftrack_id)
|
self.filter_with_children(ftrack_id)
|
||||||
|
|
@ -1200,14 +1200,15 @@ class SyncEntitiesFactory:
|
||||||
):
|
):
|
||||||
ent_path = self.get_ent_path(ftrack_id)
|
ent_path = self.get_ent_path(ftrack_id)
|
||||||
self.log.error((
|
self.log.error((
|
||||||
"Entity has published context but was moved in"
|
"The entity contains published data but it was moved to"
|
||||||
" hierarchy and previous parents were moved too it is"
|
" a different place in the hierarchy and it's previous"
|
||||||
" not possible to solve this programmatically <{}>"
|
" parents were moved too."
|
||||||
|
" It's impossible to solve this programmatically <{}>"
|
||||||
).format(ent_path))
|
).format(ent_path))
|
||||||
msg = (
|
msg = (
|
||||||
"<Entity not synchronizable> Parent of entity can't be"
|
"<Entity not synchronizable> Hierarchy of an entity"
|
||||||
" changed due to published context but whole hierarchy"
|
" can't be changed due to published data and scrambled"
|
||||||
" was scrambled"
|
"hierarchy"
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
@ -1217,8 +1218,8 @@ class SyncEntitiesFactory:
|
||||||
entities_to_create = []
|
entities_to_create = []
|
||||||
# TODO logging
|
# TODO logging
|
||||||
self.log.warning(
|
self.log.warning(
|
||||||
"Ftrack entities must be recreated because have"
|
"Ftrack entities must be recreated because they were deleted,"
|
||||||
" published context but were removed"
|
" but they contain published data."
|
||||||
)
|
)
|
||||||
|
|
||||||
_avalon_ent = old_parent_ent
|
_avalon_ent = old_parent_ent
|
||||||
|
|
@ -1235,13 +1236,13 @@ class SyncEntitiesFactory:
|
||||||
# TODO report
|
# TODO report
|
||||||
# TODO logging
|
# TODO logging
|
||||||
self.log.error((
|
self.log.error((
|
||||||
"Can't recreate entity in Ftrack because entity with"
|
"Can't recreate the entity in Ftrack because an entity" " with the same name already exists in a different"
|
||||||
" same name already exists in different hierarchy <{}>"
|
" place in the hierarchy <{}>"
|
||||||
).format(av_ent_path))
|
).format(av_ent_path))
|
||||||
msg = (
|
msg = (
|
||||||
"<Entity not synchronizable> Parent of entity can't be"
|
"<Entity not synchronizable> Hierarchy of an entity"
|
||||||
" changed due to published context but previous parent"
|
" can't be changed. I contains published data and it's" " previous parent had a name, that is duplicated at a "
|
||||||
" had name that exist in different hierarchy level"
|
" different hierarchy level"
|
||||||
)
|
)
|
||||||
self.report_items["error"][msg].append(av_ent_path)
|
self.report_items["error"][msg].append(av_ent_path)
|
||||||
self.filter_with_children(ftrack_id)
|
self.filter_with_children(ftrack_id)
|
||||||
|
|
@ -1593,7 +1594,7 @@ class SyncEntitiesFactory:
|
||||||
else:
|
else:
|
||||||
# TODO logging - What is happening here?
|
# TODO logging - What is happening here?
|
||||||
self.log.warning((
|
self.log.warning((
|
||||||
"In avalon are entities without valid parents that"
|
"Avalon contains entities without valid parents that"
|
||||||
" lead to Project (should not cause errors)"
|
" lead to Project (should not cause errors)"
|
||||||
" - MongoId <{}>"
|
" - MongoId <{}>"
|
||||||
).format(str(entity_id)))
|
).format(str(entity_id)))
|
||||||
|
|
@ -1755,7 +1756,7 @@ class SyncEntitiesFactory:
|
||||||
"Project code was changed back to \"{}\"".format(avalon_code)
|
"Project code was changed back to \"{}\"".format(avalon_code)
|
||||||
)
|
)
|
||||||
msg = (
|
msg = (
|
||||||
"It is not allowed to change"
|
"It is not possible to change"
|
||||||
" project code after synchronization"
|
" project code after synchronization"
|
||||||
)
|
)
|
||||||
self.report_items["warning"][msg] = sub_msg
|
self.report_items["warning"][msg] = sub_msg
|
||||||
|
|
@ -1980,8 +1981,8 @@ class SyncEntitiesFactory:
|
||||||
|
|
||||||
ent_path = self.get_ent_path(new_entity_id)
|
ent_path = self.get_ent_path(new_entity_id)
|
||||||
msg = (
|
msg = (
|
||||||
"Deleted entity was recreated because had (or his children)"
|
"Deleted entity was recreated because it or its children"
|
||||||
" published context"
|
" contain published data"
|
||||||
)
|
)
|
||||||
|
|
||||||
self.report_items["info"][msg].append(ent_path)
|
self.report_items["info"][msg].append(ent_path)
|
||||||
|
|
@ -1991,7 +1992,7 @@ class SyncEntitiesFactory:
|
||||||
def regex_duplicate_interface(self):
|
def regex_duplicate_interface(self):
|
||||||
items = []
|
items = []
|
||||||
if self.failed_regex or self.tasks_failed_regex:
|
if self.failed_regex or self.tasks_failed_regex:
|
||||||
subtitle = "Not allowed symbols in entity names:"
|
subtitle = "Entity names contain prohibited symbols:"
|
||||||
items.append({
|
items.append({
|
||||||
"type": "label",
|
"type": "label",
|
||||||
"value": "# {}".format(subtitle)
|
"value": "# {}".format(subtitle)
|
||||||
|
|
@ -1999,7 +2000,7 @@ class SyncEntitiesFactory:
|
||||||
items.append({
|
items.append({
|
||||||
"type": "label",
|
"type": "label",
|
||||||
"value": (
|
"value": (
|
||||||
"<p><i>NOTE: Allowed symbols are Letters( a-Z ),"
|
"<p><i>NOTE: You can use Letters( a-Z ),"
|
||||||
" Numbers( 0-9 ) and Underscore( _ )</i></p>"
|
" Numbers( 0-9 ) and Underscore( _ )</i></p>"
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
@ -2052,8 +2053,8 @@ class SyncEntitiesFactory:
|
||||||
items.append({
|
items.append({
|
||||||
"type": "label",
|
"type": "label",
|
||||||
"value": (
|
"value": (
|
||||||
"<p><i>NOTE: It is not allowed to have same name"
|
"<p><i>NOTE: It is not allowed to use the same name"
|
||||||
" for multiple entities in one project</i></p>"
|
" for multiple entities in the same project</i></p>"
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
log_msgs = []
|
log_msgs = []
|
||||||
|
|
@ -2272,7 +2273,7 @@ class SyncToAvalonLocal(BaseAction):
|
||||||
self.log.error(
|
self.log.error(
|
||||||
"Synchronization failed due to code error", exc_info=True
|
"Synchronization failed due to code error", exc_info=True
|
||||||
)
|
)
|
||||||
msg = "An error has happened during synchronization"
|
msg = "An error occurred during synchronization"
|
||||||
title = "Synchronization report ({}):".format(ft_project_name)
|
title = "Synchronization report ({}):".format(ft_project_name)
|
||||||
items = []
|
items = []
|
||||||
items.append({
|
items.append({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue