savoirfairelinux / sous-chef

Sous-Chef is a web application to help organizations to plan and deliver meals, and to manage clients files.
GNU Affero General Public License v3.0
67 stars 45 forks source link

Fixed #703: improve version control of .po file #714

Closed lingxiaoyang closed 7 years ago

lingxiaoyang commented 7 years ago

Fixes #703 by lingxiaoyang

Changes proposed in this pull request:

  1. Drop English .po files.
  2. Remove line numbers from the location strings. This is achieved by extending django-admin makemessages command, before an official solution is provided.
  3. Disable the line wrap of translatable strings to improve file readability.
  4. Replace {% blocktrans %} with {% blocktrans trimmed %} to avoid newline confusion.
  5. Provide an example of translator comment.
  6. Update developer instructions in i18n doc.
  7. Update CONTRIBUTING.md

Status

How to verify this change

  1. See if the doc update makes sense (or your comments on .po file versionning).
  2. Test python3 src/manage.py makemessages -l fr --no-wrap --add-location=file. See if it works fine.
  3. Check updated django.po files and see if there are any errors. Don't bother with fuzzy ones as they will be double-checked on Transifex.

Deployment notes and migration

none

New translatable strings

Additional notes

none

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.09%) to 94.864% when pulling 4d9e63f8c3c9cb356b51357c4b55e8500e7c982a on lingxiaoyang:fix_703 into f0fb0910f5bd82a43e1f1f3c65c5da50ff4dc6a9 on savoirfairelinux:dev.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.01%) to 94.875% when pulling d06b2ef423e95d65bf00fc4f3669fd7e8ed31ec1 on lingxiaoyang:fix_703 into a613b7b0392a30b143609f8d7781b0d23be58818 on savoirfairelinux:dev.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 94.948% when pulling 5e068208f341984856c741ea27b7e9ec499a53f7 on lingxiaoyang:fix_703 into a613b7b0392a30b143609f8d7781b0d23be58818 on savoirfairelinux:dev.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.01%) to 94.875% when pulling 5e068208f341984856c741ea27b7e9ec499a53f7 on lingxiaoyang:fix_703 into a613b7b0392a30b143609f8d7781b0d23be58818 on savoirfairelinux:dev.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.06%) to 94.948% when pulling 5e068208f341984856c741ea27b7e9ec499a53f7 on lingxiaoyang:fix_703 into a613b7b0392a30b143609f8d7781b0d23be58818 on savoirfairelinux:dev.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.1%) to 94.857% when pulling 83fae071aa18c7836c09370ae82cd3bc11c7d903 on lingxiaoyang:fix_703 into c4d65d617375e0e5666035a00af184610c4439a2 on savoirfairelinux:dev.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.04%) to 94.857% when pulling 50f58c293386298f206a1863cbe57f0d74cc8231 on lingxiaoyang:fix_703 into fd8e3601e21fde4062a51dd3e93a0a1fbd835e3d on savoirfairelinux:dev.

lingxiaoyang commented 7 years ago

@aaboffill

why remove English .po files??

We are using English in the code...

And also, in English .po files, all strings are empty. I don't think they'll be compiled in a later step with "manage.py compilemessages".

aaboffill commented 7 years ago

We are using English in the code...

And also, in English .po files, all strings are empty. I don't think they'll be compiled in a later step with >"manage.py compilemessages".

@lingxiaoyang let me think about that, maybe there are a good reason to keep the English .po files.

aaboffill commented 7 years ago

@lingxiaoyang in our methodology of work on sous-chef we write always the translatable message in English, your proposal to remove the English .po files sound reasonable for me too... go ahead!!!

lingxiaoyang commented 7 years ago

@aaboffill I think I may merge this, based on your approval and the support of @erozqba in the issue discussion #703?