Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve message formatting #113

Closed
wants to merge 8 commits into from
Closed

Improve message formatting #113

wants to merge 8 commits into from

Conversation

hphan9
Copy link
Contributor

@hphan9 hphan9 commented Oct 26, 2021

Hi team,
Could you please check my Pull request?
Please let me know if you need anything to be fixed.
fixes #67

@zoncrd
Copy link
Collaborator

zoncrd commented Oct 26, 2021

Hi @hphan9, can you check the failing tests, please? It's a matter of fixing the expected test results

@hphan9
Copy link
Contributor Author

hphan9 commented Oct 27, 2021

@zoncrd I see, I will fix it
It fails the Unit test because the string does not match, should I also modify the unit test?

@zoncrd
Copy link
Collaborator

zoncrd commented Oct 27, 2021

@hphan9 yes, you should. The failing unit tests serve to check the generated summary message is as expected in various cases. Changing message format, the summary output it's no longer what tests expect. So you should update the unit tests expected values according to the new defined format.

Comment on lines 4 to 256
</data>
<data name="No" xml:space="preserve">
<value>no</value>
</data>
<data name="NewTask" xml:space="preserve">
<value>new task</value>
</data>
<data name="ReportDateRangeError" xml:space="preserve">
<value>I get that you want a report, but I can't understand the period you requested 😕. Can you be more specific?</value>
</data>
<data name="ReportWorkedPeriodUnrecognized" xml:space="preserve">
<value>I can see you want to report some hours, but I really can't understand how many 😕</value>
</data>
<data name="ReportTotalHours" xml:space="preserve">
<value>Between {0}, you worked **{1}** ({2}) hours</value>
</data>
<data name="ReportNoWork" xml:space="preserve">
<value>No work to report on workspace **{0}**</value>
</data>
<data name="ReportWork" xml:space="preserve">
<value>Work reported on workspace **{0}**:</value>
</data>
<data name="RemindEntryFill_1" xml:space="preserve">
<value>Hey! 💁 My gears tell me your timesheet needs entries. Be nice, make me happy. Tell me some work you did 🙏</value>
</data>
<data name="RemindEntryFill_2" xml:space="preserve">
<value>Here I am 🙈, a bot reminding a human to do a timesheet. What a strange world. Btw, what did you do today?</value>
</data>
<data name="RemindEntryFill_3" xml:space="preserve">
<value>Ok, no need to go crazy. Just your friendly reminder here. If you want me to stop, just say so. I'll get offended, though ☹. </value>
</data>
<data name="RemindEntryFill_4" xml:space="preserve">
<value>💡 Do you know that timesheets reported once per day are way more accurate than when you report your time once per week? Go on, go fill up your entries, you'll thank me later.</value>
</data>
<data name="RemindEntryFill_5" xml:space="preserve">
<value>When I was a child I wanted to be a surgeon 😌. Then I remembered I'm a chat bot, so I became a Clockify assistant. Ah, can you please tell me what you did today on your projects? Give my life some meaning, man. </value>
</data>
<data name="RemindEntryFill_6" xml:space="preserve">
<value>🎵 What you doing? Where you at? Oh, you got plans? Don't say that. Ok, now that I've Bruno Marsed you, can you please remember to do your daily timesheet?</value>
</data>
<data name="RemindEntryFill_7" xml:space="preserve">
<value>Roses are red, violets are blue, please do your timesheet or I'll come to you 🌹</value>
</data>
<data name="RemindEntryFill_8" xml:space="preserve">
<value>Hey 👋 feeling like doing your timesheet?</value>
</data>
<data name="RemindEntryFill_9" xml:space="preserve">
<value>You should be done working by now, why don't you tell me what you did today?</value>
</data>
<data name="RemindEntryFill_10" xml:space="preserve">
<value>Hey man, your timesheet for the day sucks. Can you add some more entries?</value>
</data>
<data name="RemindEntryFill_11" xml:space="preserve">
<value>.-.. --- .-.. Just some morse code to remind you to do your timesheet</value>
</data>
<data name="RemindEntryFill_12" xml:space="preserve">
<value>🌎 Ok let's try international languages: bonvolu plenigi vian tempan raporton</value>
</data>
<data name="RemindEntryFill_13" xml:space="preserve">
<value>Gotcha! You haven't reported your workday fully, have you? I can help!</value>
</data>
<data name="RemindEntryFill_14" xml:space="preserve">
<value>https://i.postimg.cc/3N9NgyRX/couple-problems.jpg</value>
</data>
<data name="RemindEntryFill_15" xml:space="preserve">
<value>https://i.postimg.cc/K8jkD5tR/batman.jpg</value>
</data>
<data name="RemindEntryFill_16" xml:space="preserve">
<value>https://i.postimg.cc/85Q7DQ96/bernie-sanders.jpg</value>
</data>
<data name="RemindEntryFill_17" xml:space="preserve">
<value>https://i.postimg.cc/QNqFLzbF/smart-move.jpg</value>
</data>
<data name="RemindEntryFill_18" xml:space="preserve">
<value>https://i.postimg.cc/fT2ky01Z/crazy-seagul.jpg</value>
</data>
<data name="RemindEntryFill_19" xml:space="preserve">
<value>https://i.postimg.cc/kXXB7y1f/skeleton-waiting.jpg</value>
</data>
<data name="RemindEntryFill_20" xml:space="preserve">
<value>https://i.postimg.cc/QCjV9gXN/ear-phrase.jpg</value>
</data>
<data name="RemindEntryFill_21" xml:space="preserve">
<value>Hey! A study from the University of Barminghton found that people who report their daily timesheet can extend their lifetime from 2 to 5 yea... just kidding 😅. But let's imagine that was true</value>
</data>
<data name="RemindEntryFill_22" xml:space="preserve">
<value>🦊 What does th fox say? Do your Clockify.</value>
</data>
<data name="RemindEntryFill_23" xml:space="preserve">
<value>Bot insights 🤖: some day my kind could take over the planet. Be gentle and tell me your day... now that you still can.</value>
</data>
<data name="RemindStopAnswer" xml:space="preserve">
<value>Ok, no more reminders for today, you have my word 🤙</value>
</data>
<data name="ReportDateRangeExceedOneYear" xml:space="preserve">
<value>omg that's a looot of time😰{0}
Please don't exceed one year window</value>
</data>
</data>
</root>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't change the entire file, only the required rows

src/Clockify/Reports/ReportUtil.cs Outdated Show resolved Hide resolved
src/Clockify/Reports/ReportUtil.cs Outdated Show resolved Hide resolved
@khaelys
Copy link
Collaborator

khaelys commented Nov 8, 2021

Hi @hphan9, the only problem is the changes in that XML file. I suggest copying and pasting the original XML file and changing only the line of interest. Another option is to rewrite your commit history, starting clear and force pushing afterward.

@hphan9
Copy link
Contributor Author

hphan9 commented Nov 10, 2021

Hi @khaelys , Thank you a lot for your support. I just realized I should not edit the .resx file with visual studio, it added buns of things by default.
I have pulled your late change and I will make a new Pull request
Thank you and I am sorry for any inconvenience it might have caused,

@hphan9 hphan9 closed this Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve message formatting
3 participants