Mon 01 Dec 2014 07:48:02 AM UTC, comment #8:
Added a note in the xgettext manual:
http://git.sv.gnu.org/cgit/gettext.git/commit/?id=9c69b129
|
Wed 21 May 2014 04:47:03 PM UTC, comment #7:
Indeed, you're right, I'm sorry, it worked when placing the comment above the string when I retried it.
I don't know what went wrong with my first try.
Maybe we should document to put it just above the string and not before the gettext call.
Thanks for your help.
|
Wed 21 May 2014 09:15:08 AM UTC, comment #6:
That's strange. I got the output below if I run xgettext as follows:
|
Wed 21 May 2014 08:49:14 AM UTC, comment #5:
Hi,
I have tried doing so as mentionned here: https://code.djangoproject.com/ticket/22578#ticket :
with https://github.com/django/django/blob/master/django/core/management/commands/makemessages.py line 107:
But it doesn't seem to work.
Thanks for your help.
|
Tue 20 May 2014 10:50:44 PM UTC, comment #4:
Well, I meant to put comments inside the argument list, like this:
PEP8 doesn't seem to forbid this and actually flake8 accepts it.
|
Tue 20 May 2014 12:13:00 PM UTC, comment #3:
We can't always easily workaround this by putting the comment immediately followed by the first argument, because by doing so the code could fail being validated by PEP8:
http://legacy.python.org/dev/peps/pep-0008/#indentation
http://legacy.python.org/dev/peps/pep-0008/#maximum-line-length
example:
"Aligned with opening delimiter" indentation would make it harder by needing to split the text even more into very short lines each
We often need this kind of indentation otherwise code gets rejected by pep8 and flake8 code styling validators.
Strings formatted this way (implicit multi-line joined strings) is very common in python code in order to respect it's indentation requirements.
|
Sat 17 May 2014 01:22:17 AM UTC, comment #2:
https://savannah.gnu.org/bugs/?33451
It is known but I wonder if it is worth being supported, though we probably should clarify the current behavior in the documentation.
Can't you easily work this around by putting the comment immediately followed by the first argument?
|
Fri 16 May 2014 12:30:00 PM UTC, comment #1:
$ xgettext --version
xgettext (GNU gettext-tools) 0.18.3
Copyright (C) 1995-1998, 2000-2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Ulrich Drepper.
|
Fri 16 May 2014 12:24:16 PM UTC, original submission:
xgettext: comment for language=Python may be omitted if first argument starts not at a line with keyword
Consider we have a file like that:
The bug was initially found in Django: https://code.djangoproject.com/ticket/22578#no4
|