Skip to content

Commit

Permalink
Polish the bubble help texts a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
ospalh committed Nov 1, 2012
1 parent c9569b6 commit defce2c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 29 deletions.
35 changes: 18 additions & 17 deletions downloadaudio/review_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,30 +78,31 @@ def __init__(self, note, files_list):
self.list = files_list
super(ReviewFiles, self).__init__() # Cut-and-pasted
self.buttons_groups = []
self.text_help = _(u"""Text used to retrieve audio.<br>
(Mouse over the texts below to see further information.""")
self.play_help = u"Play the retrieved file."
self.play_old_help = _(u"""<p>Play the current content of the
audio field. No button means the field is empty. Hovering over the
button shows the current field contetn as text.""")
self.text_help = _(u"""<h4>Text used to retrieve audio.</h4>
<p>Mouse over the texts below to see further information.</p>""")
self.play_help = u"<h4>Play the retrieved file.</h4>"
self.play_old_help = _(u"""<h4>Play the current content of the
audio field.</h4>
<p>No button means the field is empty. Hovering over the button shows
the current field content as text.</p> """)
self.play_old_empty_line_help = _(u"The target field is empty.")
self.add_help_text_long = _(u"""Add the sound to the
card.<br>This is the normal thing to select for a good download. (But
you may want to select only one file in this column.)""")
self.add_help_text_long = _(u"""<h4>Add the sound to the card.</h4>
<p>This is the normal thing to select for a good download.
(You may want to select only one file in this column.)</p>""")
self.add_help_text_short = _(u"Add this sound to the card")
self.keep_help_text_long = _(u"""Keep the file.<br> Keep this
file in the media collection folder, but don’t add it to the
card. (This means the file will show up as an unused medium and may be
deleted during the unused media check.""")
self.keep_help_text_long = _(u"""<h4>Keep the file.</h4>
<p>Keep this file in the media collection folder, but don’t add it to
the card. (This means the file will show up as an unused medium and
may be deleted during the unused media check.</p>""")
self.keep_help_text_short = _(u"Keep this file")
self.delete_help_text_long = _(u"""Delete the file.<br>
This is the normal thing to do with a file you don’t like.""")
self.delete_help_text_long = _(u"""<h4>Delete the file.</h4>
<p>This is the normal thing to do with a file you don’t like.</p>""")
self.delete_help_text_short = _(u"Delete this file")
self.blacklist_help_text_long = _(u"""Blacklist the file.<br>
self.blacklist_help_text_long = _(u"""<h4>Blacklist the file.</h4>
Add an idetifier for this file to a blacklist. When this file is
downloaded again, it will be silently dropped. This behaviour is
useful for Japanesepod downloads. When your downloaded file tells you
that they they are sorry, will add this soon &c., click on this.""")
that they are sorry, will add this soon &c., click on this.""")
self.blacklist_help_text_short = _(u"Blacklist this file")
self.initUI()

Expand Down
25 changes: 13 additions & 12 deletions downloadaudio/update_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ def __init__(self, general_fields, japanese_fields, language_code):
self.initUI()

def initUI(self):
language_help = _(u'''<p>This will be transmitted as part of the
requst sent to Google TTS. Use a standard language code here. Using
invalid values or codes of unsupported languages will result in no
downloads.</p>''')
language_help = _(u'''<h4>Language code.</h4>
<p>This will be transmitted as part of the requst sent to Google
TTS. Use a standard language code here. Using invalid values or codes
of unsupported languages will result in no downloads. Do <em>not</em> use domain codes (E.g. <code>zh</code> rather than <code>ch</code> for Chinese.)</p>''')
self.setWindowTitle(_(u'Anki – Download audio'))
self.setWindowIcon(QIcon(":/icons/anki.png"))
layout = QVBoxLayout()
Expand Down Expand Up @@ -101,8 +101,9 @@ def create_general_rows(self, layout):
gf_layout.addWidget(label, num + 1, 0)
ledit = QLineEdit(text)
ledit.setToolTip(
_(u'''<p>Text of the request. Edit this as appropriate.
Clear it to not download anything for this field.</p>'''))
_(u'''<h4>Text of the request.</h4>
<p>Edit this as appropriate. Clear it to not download anything for
this field.</p>'''))
gf_layout.addWidget(ledit, num + 1, 1)
self.general_text_lineedits.append(ledit)
layout.addLayout(gf_layout)
Expand All @@ -118,16 +119,16 @@ def create_japanese_rows(self, layout):
label.setToolTip(_(u'Source of the request text'))
jf_layout.addWidget(label, num + 1, 0)
kanji_edit = QLineEdit(kanji)
kanji_edit.setToolTip(
_(u'''<p>Kanji of the request. Edit this as appropriate.
Clear it to not download anything for this field.
For pure kana words, enter (or keep) the kana here.</p>'''))
kanji_edit.setToolTip(_(u'''<h4>Kanji of the request.</h4>
<p>Edit this as appropriate. Clear it to not download anything for
this field. For pure kana words, enter (or keep) the kana here.</p>'''))
jf_layout.addWidget(kanji_edit, num + 1, 1)
self.kanji_lineedits.append(kanji_edit)
kana_edit = QLineEdit(kana)
kana_edit.setToolTip(
_(u'''<p>Kana of the request. Edit this as appropriate.
For pure kana words, enter (or keep) the kana here or clear this field.</p>'''))
_(u'''<h4>Kana of the request.</h4>
<p>Edit this as appropriate. For pure kana words, enter (or keep) the
kana here or clear this field.</p>'''))
jf_layout.addWidget(kana_edit, num + 1, 2)
self.kana_lineedits.append(kana_edit)
layout.addLayout(jf_layout)

0 comments on commit defce2c

Please sign in to comment.