Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SG-21701 Replace instances of Shotgun strings in .py files in all tk-… #142

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions hooks/publish_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def settings(self):
],
"description": (
"List of file types to include. Each entry in the list "
"is a list in which the first entry is the Shotgun "
"is a list in which the first entry is the SG "
"published file type and subsequent entries are file "
"extensions that should be associated."
),
Expand Down Expand Up @@ -321,7 +321,7 @@ def validate(self, settings, item):
# happening.
error_msg = (
"Can not validate file path. There is already a publish in "
"Shotgun that matches this path. Please uncheck this "
"SG that matches this path. Please uncheck this "
"plugin or save the file to a different path."
)
self.logger.error(error_msg)
Expand All @@ -344,7 +344,7 @@ def validate(self, settings, item):
},
)

self.logger.info("A Publish will be created in Shotgun and linked to:")
self.logger.info("A Publish will be created in SG and linked to:")
self.logger.info(" %s" % (path,))

return True
Expand Down Expand Up @@ -425,11 +425,11 @@ def publish(self, settings, item):
item.properties.sg_publish_data = sgtk.util.register_publish(**publish_data)
self.logger.info("Publish registered!")
self.logger.debug(
"Shotgun Publish data...",
"SG Publish data...",
extra={
"action_show_more_info": {
"label": "Shotgun Publish Data",
"tooltip": "Show the complete Shotgun Publish Entity dictionary",
"label": "SG Publish Data",
"tooltip": "Show the complete SG Publish Entity dictionary",
"text": "<pre>%s</pre>"
% (pprint.pformat(item.properties.sg_publish_data),),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,7 @@ def run_validate(self, settings, item):
# check that we are not trying to publish to a site level context
if item.context.project is None:
status = False
self.logger.error(
"Please link '%s' to a Shotgun object and task!" % item.name
)
self.logger.error("Please link '%s' to a SG object and task!" % item.name)

if status:
self.logger.debug("Validation successful!")
Expand Down
6 changes: 3 additions & 3 deletions python/tk_multi_publish2/dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __init__(self, parent=None):
# tooltips for the task and link inputs
self.ui.context_widget.set_task_tooltip(
"<p>The task that the selected item will be associated with "
"in Shotgun after publishing. It is recommended to always "
"in SG after publishing. It is recommended to always "
"fill out the Task field when publishing. The menu button "
"to the right will provide suggestions for Tasks to publish "
"including the Tasks assigned to you, recently used Tasks, "
Expand All @@ -94,7 +94,7 @@ def __init__(self, parent=None):
)
self.ui.context_widget.set_link_tooltip(
"<p>The entity that the selected item will be associated with "
"in Shotgun after publishing. By selecting a Task in the field "
"in SG after publishing. By selecting a Task in the field "
"above, the Link will automatically be populated. It is "
"recommended that you always populate the Task field when "
"publishing. The Task menu above will display any tasks associated "
Expand Down Expand Up @@ -306,7 +306,7 @@ def closeEvent(self, event):
# shut down main threadpool
self._task_manager.shut_down()
except Exception:
logger.exception("Error running Shotgun Panel App closeEvent()")
logger.exception("Error running SG Panel App closeEvent()")

# ensure the context widget's recent contexts are saved
self.ui.context_widget.save_recent_contexts()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def setupUi(self, ProgressDetailsWidget):
def retranslateUi(self, ProgressDetailsWidget):
ProgressDetailsWidget.setWindowTitle(QtGui.QApplication.translate("ProgressDetailsWidget", "Form", None, QtGui.QApplication.UnicodeUTF8))
self.progress_label.setText(QtGui.QApplication.translate("ProgressDetailsWidget", "Progress Details", None, QtGui.QApplication.UnicodeUTF8))
self.copy_log_button.setToolTip(QtGui.QApplication.translate("ProgressDetailsWidget", "<html><head/><body><p>Open the publisher\'s log file. The log file is useful for deeper debugging of publish issues. For issues involving Shotgun Support, please include a copy of this file when submitting a support request. </p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
self.copy_log_button.setToolTip(QtGui.QApplication.translate("ProgressDetailsWidget", "<html><head/><body><p>Open the publisher\'s log file. The log file is useful for deeper debugging of publish issues. For issues involving SG Support, please include a copy of this file when submitting a support request. </p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
self.copy_log_button.setText(QtGui.QApplication.translate("ProgressDetailsWidget", "Copy to Clipboard", None, QtGui.QApplication.UnicodeUTF8))
self.close.setToolTip(QtGui.QApplication.translate("ProgressDetailsWidget", "Close", None, QtGui.QApplication.UnicodeUTF8))
self.log_tree.setAccessibleName(QtGui.QApplication.translate("ProgressDetailsWidget", "<html><head/><body><p>Opens the log file for the current engine which will include log messages from the publisher. This file is extremely useful for deeper debugging and understanding of publish issues. A copy of this file should be included when submitting support requests to the Shotgun Support team.</p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
self.log_tree.setAccessibleName(QtGui.QApplication.translate("ProgressDetailsWidget", "<html><head/><body><p>Opens the log file for the current engine which will include log messages from the publisher. This file is extremely useful for deeper debugging and understanding of publish issues. A copy of this file should be included when submitting support requests to the SG Support team.</p></body></html>", None, QtGui.QApplication.UnicodeUTF8))

from . import resources_rc
2 changes: 1 addition & 1 deletion python/tk_multi_publish2/ui/dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ def setupUi(self, Dialog):
Dialog.setTabOrder(self.stop_processing, self.scrollArea)

def retranslateUi(self, Dialog):
Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "Shotgun Publish", None, QtGui.QApplication.UnicodeUTF8))
Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "SG Publish", None, QtGui.QApplication.UnicodeUTF8))
Dialog.setAccessibleName(QtGui.QApplication.translate("Dialog", "publish dialog", None, QtGui.QApplication.UnicodeUTF8))
self.main_stack.setAccessibleName(QtGui.QApplication.translate("Dialog", "stackedwidget", None, QtGui.QApplication.UnicodeUTF8))
self.large_drop_area_label.setText(QtGui.QApplication.translate("Dialog", "Drag and drop files or folders here", None, QtGui.QApplication.UnicodeUTF8))
Expand Down
14 changes: 7 additions & 7 deletions tests/test_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def test_custom_plugin(app_dialog):
# Validation of the Publish to Shotgun with items plugin
# Select plugin Publish to Shotgun with items of the first item
app_dialog.root["collected items tree"].outlineitems[
"Publish to Shotgun with items"
"Publish to SG with items"
].mouseClick()
# Make sure the checkbox is check
if (
Expand All @@ -305,9 +305,9 @@ def test_custom_plugin(app_dialog):
"Set task to in review"
].mouseClick()
# Select plugin Publish to Shotgun with items of the second item
app_dialog.root["collected items tree"].outlineitems[
"Publish to Shotgun with items"
][1].mouseClick()
app_dialog.root["collected items tree"].outlineitems["Publish to Shotgun with items"][
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Black would make changes.

1
].mouseClick()
# Make sure the checkbox is unchecked
if (
app_dialog.root["details frame"].checkboxes["Set task to in review"].checked
Expand Down Expand Up @@ -371,9 +371,9 @@ def test_custom_plugin(app_dialog):
"Set task to in review"
].mouseClick()
# Select Publish to Shotgun without items of the second item
app_dialog.root["collected items tree"].outlineitems[
"Publish to Shotgun without items"
][1].mouseClick()
app_dialog.root["collected items tree"].outlineitems["Publish to Shotgun without items"][
1
].mouseClick()
# Make sure the checkbox is unchecked
if (
app_dialog.root["details frame"].checkboxes["Set task to in review"].checked
Expand Down