#959 Dual mode progress bar - original and percentage

3.1
closed-fixed
5
2015-01-22
2014-02-19
cienislaw
No

after post in OmegaT group about Yu Tang playing with progress bar message I've decided to transform it to a feature. here is link to Yu Tang code:
http://dirtysexyquery.blogspot.tw/2013/03/omegat-custom-progress-format.html

what I did:
1. i've added two display modes for progress bar:
- original
- Yu Tang precentage
2. modes are switchable by clicking on progress bar
3. current mode is saved in OmegaT preferences
4. some tweaks in existing lables (spaces at the end)
5. added fix which clears progress and length messages after project close

patch in attachment. please let me know if I did anything wrong while implementing this feature.

question ath the end: is usage Mnemonics for mainWindow.progressLabel and mainWindow.lengthLabel really necessary? I ask because it only used at creation of those labels and after that setText is always used. also there is no shortcuts for those two. thanx for answer.

1 Attachments

Discussion

  • Yu Tang

    Yu Tang - 2014-02-19

    Hi Piotr,

    Thank you for the patch.
    Let me say something about what happened for me after blog entry posted.
    I noticed a subtle change in the percentage while non-unique translations and alternate translations are around. I don't know that difference is acceptable or not for the others. I didn't find a solution. I postponed creating RFE myself, get very busy (still now) and forgot about it.
    So, I'm happy with the way things turned out for this. If you don't mind above change (error, diff, fluctuation, call it what you may), I don't mind too.
    Thanks again for your work.

     
  • cienislaw

    cienislaw - 2014-02-19

    Hi Yu,

    Currently our team is not doing any project so didn't have a chance yet to fully test your solution. I've did some basic usage and was more than happy with result. But when you mentioned this 'situation' I will try to look into it.

    This patch is also good experience for me because I plan to do some changes in gui with Properties usage. I hope its coded ok, if not feel free to point my mistakes.

     
  • Didier Briel

    Didier Briel - 2014-02-20

    But when you mentioned this 'situation' I will try to look into it.

    Let me know when you have checked the 'issue'.

    Didier

     
  • cienislaw

    cienislaw - 2014-02-20

    Checked and this occurs in default progress view too. RealProject.setTranslation does not take in account fact that when alternative translation is created, hotStat.numberofTranslatedSegments should not be altered.

     
    • Didier Briel

      Didier Briel - 2014-02-20

      Thanks.

      Could you fix the bug first (as a separate ticket)?

      Didier

       
  • cienislaw

    cienislaw - 2014-02-20

    Sure.

     
    • Didier Briel

      Didier Briel - 2014-02-20

      Thank you.

      Didier

       
  • cienislaw

    cienislaw - 2014-02-21

    https://sourceforge.net/p/omegat/bugs/663/

    I was playing with it but failed. Need a fresh look on it and/or some suggestions. Main problem is that in setTranslation() there is no info if 'create alternative translation/use as default translation' was used. Also there is a bit difference between main menu and popup menu entries ie different chain of commands (probably because popup is also used for multiple translations pane). There is also no check now when dealing with alternative translations, if nulled segment translation is the last one for that multiplied source.

    While digging through source I found a few other 'non expected behaviors', will report them later.

     
  • cienislaw

    cienislaw - 2014-03-06

    'non expected behaviors' got fixed before I had a chance to report them, so one thing less.

    as for now proper fixing of hot stats calculation even for default progress bar mode isn't so bright so my proposal is: 'fix it' by making sure counter wont go below 0 and won't get higher than unique segment count, and then include % mode progress. I know its far from perfect but default progress mode has this flaw already and it won't be removed because of that. of course its not a problem for me if it won't be included now - I compile Omega from sources all the time. also I've forgot about make changes in Test suite, which will be supplied with newer patch. please let me know what you think about this proposal. thanx.

     
    • Didier Briel

      Didier Briel - 2014-05-02

      Since the bug happens in standard mode too, I agree with your suggestion: just fix what is necessary to avoid big errors, and you have my go ahead to implement the dual mode bar.

      Didier

       
  • Didier Briel

    Didier Briel - 2014-05-02
    • summary: Dual mode progress bar - original and precentage --> Dual mode progress bar - original and percentage
     
  • cienislaw

    cienislaw - 2014-05-22

    Implemented in /trunk.

    I've used enum instead of bool for Preferences, so adding additional mode shouldn't be a problem. For sure string management for not loaded project and tooltips will need smarter approach.

     
  • Didier Briel

    Didier Briel - 2014-05-26
    • status: open --> open-fixed
     
  • Didier Briel

    Didier Briel - 2014-06-26

    Implemented in the released version 3.1.2 of OmegaT.

    Didier

     
  • Didier Briel

    Didier Briel - 2014-06-26
    • status: open-fixed --> closed-fixed
    • Group: 3.0 --> 3.1
     

Log in to post a comment.