Merge lp://qastaging/~suutari-olli/openlp/combined-bible-quick-search into lp://qastaging/openlp
Status: | Superseded |
---|---|
Proposed branch: | lp://qastaging/~suutari-olli/openlp/combined-bible-quick-search |
Merge into: | lp://qastaging/openlp |
Diff against target: |
453 lines (+203/-73) 6 files modified
openlp/core/common/uistrings.py (+36/-0) openlp/plugins/bibles/bibleplugin.py (+2/-1) openlp/plugins/bibles/lib/biblestab.py (+23/-0) openlp/plugins/bibles/lib/manager.py (+35/-33) openlp/plugins/bibles/lib/mediaitem.py (+106/-39) resources/images/openlp-2.qrc (+1/-0) |
To merge this branch: | bzr merge lp://qastaging/~suutari-olli/openlp/combined-bible-quick-search |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tim Bentley | Needs Fixing | ||
Tomas Groth | Pending | ||
Review via email: mp+290846@code.qastaging.launchpad.net |
This proposal supersedes a proposal from 2016-04-04.
This proposal has been superseded by a proposal from 2016-04-09.
Description of the change
Thank you for your review Tim,
I’ve managed to simplify the code structure.
“This needs to be broken down into vers small bits which cannot be broken. Look at the about ui for a example.”
I’m not sure if I understand what you meant with that.
The example verses need to be translatable.
I agree with you, the string with the scripture reference error is
already quite horrifying and I can remember how I used to struggle
with it for the Finnish translation. However, I feel like the
sample verses make the message much easier to understand.
If we can’t find an alternative solution for this, I propose the following:
We (I) copy paste the old translation from scripture reference error and add localized sample verses by ourselves, thus limiting the possibility of translation screw ups. By having the template and just replacing the foreign Bible book names to it, it shouldn’t take too long.
Refactored the code for combined search.
- Added: def on_quick_
and moved definition of reference search there.
- Added: def on_quick_
and moved definition of text search there.
- Removed some un-needed code duplicates
(Double finalizing, 3rd normalizing of mouse cursor)
- Searching scripture ref with shorter than 3 char search is now possible
(G1 = Genesis 1)
Also removed “Search” from “Search Text or Reference…”
since it does not fit the box properly.
"- Noticed I had left an old comment to a wrong place. (Moved it to def on_quick_
lp:~suutari-olli/openlp/combined-bible-quick-search (revision 2624)
[←[1;32mSUCCESS
[←[1;32mSUCCESS
[←[1;32mSUCCESS
[←[1;32mSUCCESS
[←[1;32mSUCCESS
[←[1;32mSUCCESS
[←[1;32mSUCCESS
-------
This branch introduces following improvements to Quick Bible search:
- Combined Reference/Text search which first performs the Reference
search and then moves to Text search if nothing is found.
- Possibility to use “.” when shortening Book names in Reference search.
For an example Gen. 1 = Gen 1 = Genesis 1.
- New/Improved error messages (E.g. added actual example verses
to Reference error)
(Parts of the new messages are Bolded so <br> is required since
\n does not work with bolding)
This branch also prevents users from performing Text searches which are:
- Shorter than 3 characters long (not including spaces)
- Searches consisting from only spaces
These currently possible bad search quarries result in LONG search times
and program instability/
separated by spaces, but that scenario is relatively rarer.
Please don't include the changed resources.py in the merge request, it makes it impossible to see the code that has actually been changed.
Places the new image in "resources/images/" if it is not already there, but during the test/review process don't include the updated resources.py. We'll generate it locally for testing.