get rid of hardcoded text

This commit is contained in:
Jonathan Wren 2022-05-01 10:39:38 -07:00
parent eeca1e2338
commit fd930922db
2 changed files with 4 additions and 6 deletions

View file

@ -161,7 +161,7 @@ class MsgText(Enum):
ImportAborted = "Entries were NOT imported"
JournalsToUpgrade = """
The following {journal_type} journals will be upgraded to jrnl {version}:
The following journals will be upgraded to jrnl {version}:
"""
@ -171,7 +171,7 @@ class MsgText(Enum):
"""
UpgradingJournal = """
Upgrading {journal_type} '{journal_name}' journal stored in {path}...
Upgrading '{journal_name}' journal stored in {path}...
"""
UpgradingConfig = "Upgrading config..."
@ -209,6 +209,8 @@ class MsgText(Enum):
YAML export must be to a directory, not a single file
"""
JournalExportedTo = "Journal exported to {path}"
# --- Import --- #
ImportSummary = """
{count} imported to {journal_name} journal

View file

@ -92,7 +92,6 @@ def upgrade_jrnl(config_path):
header=Message(
MsgText.JournalsToUpgrade,
params={
"journal_type": "encrypted",
"version": __version__,
},
),
@ -104,7 +103,6 @@ def upgrade_jrnl(config_path):
header=Message(
MsgText.JournalsToUpgrade,
params={
"journal_type": "plain text",
"version": __version__,
},
),
@ -126,7 +124,6 @@ def upgrade_jrnl(config_path):
Message(
MsgText.UpgradingJournal,
params={
"journal_type": "encrypted",
"journal_name": journal_name,
"path": path,
},
@ -144,7 +141,6 @@ def upgrade_jrnl(config_path):
Message(
MsgText.UpgradingJournal,
params={
"journal_type": "plain text",
"journal_name": journal_name,
"path": path,
},