Regarding the "default keyword TODO": there are tools that can be used for working with translations, in the gettext suite.

For instance, for a given django.po file, the following command prints all untranslated strings:


    msgattrib --untranslated path/to/django.po


We have the following command somewhere in a wiki:


    for k in */locale/*/LC_MESSAGES/django.po; do echo $(msgattrib --untranslated $k | grep msgstr | wc -l) $k; done | grep -v '^0 ' | sort -n

which prints the files with missing translations, together with how many translations are missing.



Unrelated tips for makemessages, but if you start overriding makemessages, good extra flags would be:

* just hard-code `no_location` to True. It makes the generated .po-file non-stable when adding even 1 extra line in the source file.

* same for hard-coding `no_wrap` to be honest, *or* the line-width.

* "--sort-output" (for msgmerge and msgattrib), so that the generated .po-file is stable, even when the code itself has been moved around.

* add the flag "--keyword=_l", so that you can use `_l` instead of `gettext_lazy`, but that's depending on taste.

Regards,

Sjoerd Job


On 11/01/2019 07:42, אורי wrote:
https://code.djangoproject.com/ticket/10852

I also don't like the "fuzzy" keyword and I spent hours in deleting them from our django.po files after running makemessages. I would like to disable them completely since they don't make sense in our project. Every time after running makemessages I have to search for the "fuzzy" keywords, delete them and also delete translations which are incorrect. I would like all the translations to be blank if not exactly translated.

I didn't understand what you mean by "msgmerge with the "-N" option swiches off fuzzy-matching.".

By the way, is it possible to add a default keyword that will be used for all new translations instead of "" in a specific language? For example "TODO"? Because I don't want to forget to translate them. Currently I have to search and manually replace "" with "TODO". And by the way the string "" appears also with translated texts.

Thanks,
אורי (Uri)
u...@speedy.net <mailto:u...@speedy.net>
--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com <mailto:django-developers+unsubscr...@googlegroups.com>. To post to this group, send email to django-developers@googlegroups.com <mailto:django-developers@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CABD5YeHU68Vr9M%2BMCvb3DiJYUpBUaO2PJuEpXb%3DctqE1HJX4fQ%40mail.gmail.com <https://groups.google.com/d/msgid/django-developers/CABD5YeHU68Vr9M%2BMCvb3DiJYUpBUaO2PJuEpXb%3DctqE1HJX4fQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django 
developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/6082c7ef-e39c-3109-3bcf-dd19ef6f7bad%40sjec.nl.
For more options, visit https://groups.google.com/d/optout.

Reply via email to