aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ui.py
diff options
context:
space:
mode:
authorJu1-js <40339350+Ju1-js@users.noreply.github.com>2022-12-09 06:47:45 +0000
committerJu1-js <40339350+Ju1-js@users.noreply.github.com>2022-12-09 06:47:45 +0000
commitce04ba71b880aeb97b7d47d404ba4ea430891618 (patch)
tree9c8e6ad67bd1e1d728f467155eccde5ec0ae6801 /modules/ui.py
parent44c46f0ed395967cd3830dd481a2db759fda5b3b (diff)
downloadstable-diffusion-webui-gfx803-ce04ba71b880aeb97b7d47d404ba4ea430891618.tar.gz
stable-diffusion-webui-gfx803-ce04ba71b880aeb97b7d47d404ba4ea430891618.tar.bz2
stable-diffusion-webui-gfx803-ce04ba71b880aeb97b7d47d404ba4ea430891618.zip
Make # settings changed message grammatically correct
Make the ": " in the settings changed message not show if 0 settings were changed. "0 settings changed: ." -> "0 settings changed."
Diffstat (limited to 'modules/ui.py')
-rw-r--r--modules/ui.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/ui.py b/modules/ui.py
index b2b8de90..79bb3d1f 100644
--- a/modules/ui.py
+++ b/modules/ui.py
@@ -1450,7 +1450,7 @@ def create_ui():
opts.save(shared.config_filename)
except RuntimeError:
return opts.dumpjson(), f'{len(changed)} settings changed without save: {", ".join(changed)}.'
- return opts.dumpjson(), f'{len(changed)} settings changed: {", ".join(changed)}.'
+ return opts.dumpjson(), f'{len(changed)} settings changed{": " if len(changed) > 0 else ""}{", ".join(changed)}.'
def run_settings_single(value, key):
if not opts.same_type(value, opts.data_labels[key].default):