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

First sketch for credit-issue #589

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

kerstenkenan
Copy link
Contributor

@kerstenkenan kerstenkenan changed the title First sketch First sketch for credit-issue Dec 6, 2024
@kerstenkenan kerstenkenan self-assigned this Dec 6, 2024
Copy link
Contributor

@Theophile-Madet Theophile-Madet left a comment

Choose a reason for hiding this comment

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

I left a few comments, I couldn't test further because the container can't start with this version of the code.

tapir/accounts/templates/accounts/user_detail.html Outdated Show resolved Hide resolved
tapir/statistics/models.py Outdated Show resolved Hide resolved
tapir/translations/locale/de/LC_MESSAGES/django.po Outdated Show resolved Hide resolved
Copy link
Contributor

@Theophile-Madet Theophile-Madet left a comment

Choose a reason for hiding this comment

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

A few more changes needed

@kerstenkenan
Copy link
Contributor Author

Hope all changes done.

Copy link
Contributor

@Theophile-Madet Theophile-Madet left a comment

Choose a reason for hiding this comment

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

Getting better, there's a few more mistakes to fix and maybe an improvement to the layout of user_detail.html.

@kerstenkenan
Copy link
Contributor Author

Hope, everything better now. I don't know why I get always these django.po conflicts and failed test. I didn't changed anything on the django.po file in this PR. Have you an idea, why this happens? Is it really necessary to have the translation test, who almost fails all the time 😳?

Copy link
Contributor

@Theophile-Madet Theophile-Madet left a comment

Choose a reason for hiding this comment

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

Looks good now, there's on the double ul thing in tapir/statistics/templates/statistics/tags/credit_account_card.html, then you can merge (don't forget to pick the "squash and merge" option when merging).

Comment on lines 13 to 14
<ul class="list-group list-group-flush">
<li class="list-group-item">
Copy link
Contributor

Choose a reason for hiding this comment

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

This ul should be removed and the li should be in the ul above.

@Theophile-Madet
Copy link
Contributor

I don't know why I get always these django.po conflicts

There's a conflict as long as Git doesn't know how to merge your version of the .po file with the version in master.
Even if your version didn't change, the master one probably did, so you get conflicts. This can usually be solved by merging master in your branch then generating the translation file again.

and failed test

Which test is failing? Do you mean the github action check, not a test maybe?

- name: Check translations
run: docker compose run web make check-translations

It only fails if we forget to update the translation file, which we often do (I do it all the time), but then at least I get a warning that I forgot to do it.
This scenario can happen If the file is outdated:

  • I create a branch. I add code that needs new translations, then generate the translation file.
  • Since the translation file was outdated, it shows many changes that are not relevant to my changes.
  • Meanwhile, someone else updates a translation on the master branch.
  • Now there's a conflict between the new branch and master. It is almost impossible to merge the translation file since the line numbers changed everywhere.
  • The solution is then to pick just important text changes from the translation file of the branch, save them somewhere, reset the translation file on the branch to be the same as master, then put the changes back in. This is very hard to do because when looking at differences, there are many irrelevant ones.

If both versions (master and branch) are as up to date as possible, the only changes shown on the branch version are the relevant ones. It's still not super easy to merge, but it's doable.
That's why it's important to keep the translation file as up to date as possible, even if it's just line numbers that change. If we do it, merge is annoying but doable. If we don't do it, merging is almost impossible.

@kerstenkenan kerstenkenan marked this pull request as ready for review December 12, 2024 18:46
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.

Add to the member's profile page the current amount of money they have on BioOffice
2 participants