Store previous string in po files #627

Closed
wants to merge 50 commits into
from

Conversation

Projects
None yet
@nijel
Contributor

nijel commented Jan 9, 2013

This easies translators works on fuzzy strings, where they can check
what has been changed.

This can be disabled using --no-previous parameter.

wrap long words in field labels on admin forms, closes #18755
Otherwise, words overlap into the fields themselves, which makes the labels
unreadable.
@ramiro

This comment has been minimized.

Show comment Hide comment
@ramiro

ramiro Jan 19, 2013

Member

This needs tests.

Member

ramiro commented Jan 19, 2013

This needs tests.

@nijel

This comment has been minimized.

Show comment Hide comment
@nijel

nijel Jan 23, 2013

Contributor

Rebased on current master and added testcase.

Contributor

nijel commented Jan 23, 2013

Rebased on current master and added testcase.

LucianU and others added some commits Jan 29, 2013

Fixed #19690 - Removed unused import
Removed an import of a class unused in the Ajax example.
Merge pull request #690 from rafales/ticket_19711
Fixed #19711 -- Typo in django.test.simple.__all__
Fixed #19709 -- Fixed TimeField introspection on MySQL
Thanks Eugene Grachev for the report.
Fixed #19714 -- Updated documentation about TemplateView context
Thanks Aramgutang for the report. Refs #17228.
Merge pull request #334 from dlo/tickets/18755
Fixed #18755 -- Wrapped long admin forms fields labels.
Fix rst syntax error.
Thanks Chris Rebert for the report.
Avoided ambiguous output when runserver port is already in use.
Thanks James Pic for the suggestion (PR 88).
Fixed #19663 -- Allowed None in colorize() text parameter
Thanks Jonathan Liuti for the report and the initial patch, and
Simon Charette for the review.
Merge pull request #682 from LucianU/master
Fixed #19690 - Removed unused import in doc examples
Added test to demonstrate issue 11263 isn't there anymore.
Thanks veena for the report and jaklaassen for the patch. Fixes #11263.
Added test to demonstrate issue 11387 isn't there anymore.
Thanks adurdin for the report and patch. Fixes #11387.
Made ungettext_lazy usable for messages that do not contain the count.
Fixed #19160 (again). Thanks Alexey Boriskin.
Fixed #18144 -- Added backwards compatibility with old unsalted MD5 p…
…asswords

Thanks apreobrazhensky at gmail.com for the report.
Lowered field ordering requirement in ogrinspect test
This test was randomly failing depending on the library environment.
Fixed #19700 - Added documentation for BoundField.field.
Thanks Tiberiu Ana for the report and patch.
Fixed #19333 -- Moved compress.py outside of the admin static folder.…
… Thanks to camilonova, Russell Keith-Magee, Aymeric Augustin and Ramiro Morales for the feedback.
@camilonova

This comment has been minimized.

Show comment Hide comment
@camilonova

camilonova Feb 2, 2013

Contributor

@jphalip nice, thanks.

Contributor

camilonova commented on c9c40bc Feb 2, 2013

@jphalip nice, thanks.

This comment has been minimized.

Show comment Hide comment
@jezdez

jezdez Feb 3, 2013

Owner

:rollseyes:

Owner

jezdez replied Feb 3, 2013

:rollseyes:

ramiro and others added some commits Feb 3, 2013

Fixed #14305 -- Switched inspectdb to create unmanaged models.
Thanks Ian Kelly for the report and initial patch.
Fixed #17797 -- Enabled support for PATCH requests in the dummy test …
…client. Thanks to pfarmer for the suggestion and initial patch.
Fixed #19730 -- Don't validate importability of settings by using i18…
…n in management commands.

They are handled independently now and the latter can be influenced by
the new BaseCommand.leave_locale_alone internal option.

Thanks chrischambers for the report, Claude, lpiatek, neaf and gabooo for
their work on a patch, originally on refs. #17379.

charettes and others added some commits Feb 4, 2013

Fixed #19724 -- Output error when settings are improperly configured
...during retrieval of available management commands.
Thanks Peter Davis for the report and Julien Phalip for the review.
Revert "Fixed #19724 -- Output error when settings are improperly con…
…figured"

This reverts commit 40ca990.
Outputting error is not always suitable, for example this shouldn't
happen for the 'startproject' command.
Enhanced docs and docctrings added in 869c9ba.
Thanks Claude for the suggestion.
Simplified default project template.
Squashed commit of:

commit 508ec91
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 22:50:55 2013 +0100

    Tweaked default settings file.

    * Explained why BASE_DIR exists.
    * Added a link to the database configuration options, and put it in its
      own section.
    * Moved sensitive settings that must be changed for production at the
      top.

commit 6515fd2
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 14:35:21 2013 +0100

    Documented the simplified app & project templates in the changelog.

commit 2c5b576
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 13:59:27 2013 +0100

    Minor fixes in tutorials 5 and 6.

commit 55a5153
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 13:51:11 2013 +0100

    Updated tutorial 2 for the new project template.

commit 29ddae8
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 11:58:54 2013 +0100

    Updated tutorial 1 for the new project template.

commit 0ecb9f6
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 11:29:13 2013 +0100

    Adjusted the default URLconf detection to account for the admin.

    It's now enabled by default.

commit 5fb4da0
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 10:36:55 2013 +0100

    Added security warnings for the most sensitive settings.

commit 718d84b
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 23:24:06 2013 +0100

    Used an absolute path for the SQLite database.

    This ensures the settings file works regardless of which directory
    django-admin.py / manage.py is invoked from.

    BASE_DIR got a +1 from a BDFL and another core dev. It doesn't involve
    the concept of a "Django project"; it's just a convenient way to express
    relative paths within the source code repository for non-Python files.

    Thanks Jacob Kaplan-Moss for the suggestion.

commit 1b559b4
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 23:22:40 2013 +0100

    Removed STATIC_ROOT from the default settings template.

    It isn't necessary in development, and it confuses beginners to no end.

    Thanks Carl Meyer for the suggestion.

commit a55f141
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 23:21:43 2013 +0100

    Removed MEDIA_ROOT/URL from default settings template.

    Many sites will never deal with user-uploaded files, and MEDIA_ROOT is
    complicated to explain.

    Thanks Carl Meyer for the suggestion.

commit 44bf2f2
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 22:22:09 2013 +0100

    Removed logging config.

    This configuration is applied regardless of the value of LOGGING;
    duplicating it in LOGGING is confusing.

commit eac747e
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 22:05:31 2013 +0100

    Enabled the locale middleware by default.

    USE_I18N is True by default, and doesn't work well without
    LocaleMiddleware.

commit d806c62
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 22:03:16 2013 +0100

    Enabled clickjacking protection by default.

commit 99152c3
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 22:01:48 2013 +0100

    Reorganized settings in logical sections, and trimmed comments.

commit d37ffdf
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:54:11 2013 +0100

    Avoided misleading TEMPLATE_DEBUG = DEBUG.

    According to the docs TEMPLATE_DEBUG works only when DEBUG = True.

commit 15d9478
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:46:25 2013 +0100

    Removed STATICFILES_FINDERS/TEMPLATE_LOADERS from default settings file.

    Only developers with special needs ever need to change these settings.

commit 574da0e
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:45:01 2013 +0100

    Removed STATICFILES/TEMPLATES_DIRS from default settings file.

    The current best practice is to put static files and templates in
    applications, for easier testing and deployment.

commit 8cb18db
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:24:16 2013 +0100

    Removed settings related to email reporting from default settings file.

    While handy for small scale projects, it isn't exactly a best practice.

commit 8ecbfcb
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 18:54:43 2013 +0100

    Documented how to enable the sites framework.

commit 23fc91a
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:28:59 2013 +0100

    Disabled the sites framework by default.

    RequestSite does the job for single-domain websites.

commit c4d82eb
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 00:08:33 2013 +0100

    Added a default admin.py to the application template.

    Thanks Ryan D Hiebert for the suggestion.

commit 4071dc7
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 10:59:49 2013 +0100

    Enabled the admin by default.

    Everyone uses the admin.

commit c807a31
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 10:57:05 2013 +0100

    Removed admindocs from default project template.

commit 09e4ce0
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:32:52 2013 +0100

    Added links to the settings documentation.

commit 5b8f5ea
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 11:06:54 2013 +0100

    Used a significant example for URLconf includes.

commit 908e91d
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:22:31 2013 +0100

    Moved code comments about WSGI to docs, and rewrote said docs.

commit 50417e5
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 15:51:50 2013 +0100

    Normalized the default application template.

    Removed the default test that 1 + 1 = 2, because it's been committed
    way too many times, in too many projects.

    Added an import of `render` for views, because the first view will
    often be:

    def home(request):
        return render(request, "mysite/home.html")
@claudep

This comment has been minimized.

Show comment Hide comment
@claudep

claudep Feb 4, 2013

Member

I'm not sure I understand those 2 lines. Why are you importing settings here while there are not used later in the method?

I'm not sure I understand those 2 lines. Why are you importing settings here while there are not used later in the method?

This comment has been minimized.

Show comment Hide comment
@ramiro

ramiro Feb 4, 2013

Member

It's simply to check if settings are available just like the documentation of can_import_settings says.

This is what used to be implemented by importing django.util.traslation (which then load settings to know the value of USE_I18N)

I see in the file history that previously it used to try/catch and report the error condition but it seems to have been changed to simply trying to trigger settings loading. I suspect because the ImportError is handled at an upper level.

Member

ramiro replied Feb 4, 2013

It's simply to check if settings are available just like the documentation of can_import_settings says.

This is what used to be implemented by importing django.util.traslation (which then load settings to know the value of USE_I18N)

I see in the file history that previously it used to try/catch and report the error condition but it seems to have been changed to simply trying to trigger settings loading. I suspect because the ImportError is handled at an upper level.

claudep and others added some commits Feb 2, 2013

Fixed error message test assertions under Python 3.3
Thanks Florian Apolloner for testing.
Fixed #19734 -- Missing values in `DATETIME_INPUT_FORMATS` doc.
Also changed formating of `DATE_INPUT_FORMATS` and
`TIME_INPUT_FORMATS` for readability.

Thanks minddust for the report!
@jezdez

This comment has been minimized.

Show comment Hide comment
@jezdez

jezdez Feb 4, 2013

Owner

ZOMG YES!!!

Owner

jezdez commented on 7c5b244 Feb 4, 2013

ZOMG YES!!!

This comment has been minimized.

Show comment Hide comment
@mjtamlyn

mjtamlyn Feb 5, 2013

Member

Should (or could) this be considered a public API now?

Member

mjtamlyn replied Feb 5, 2013

Should (or could) this be considered a public API now?

This comment has been minimized.

Show comment Hide comment
@sebleblanc

sebleblanc Feb 5, 2013

Wow, what a cleanup!

Wow, what a cleanup!

This comment has been minimized.

Show comment Hide comment
@claudep

claudep Feb 5, 2013

Member

Should (or could) this be considered a public API now?

Not until it is documented on https://docs.djangoproject.com/en/dev/ref/utils/. However, feel free to open a Trac ticket requesting it to be documented (hence public API), if you think it's really useful.

Member

claudep replied Feb 5, 2013

Should (or could) this be considered a public API now?

Not until it is documented on https://docs.djangoproject.com/en/dev/ref/utils/. However, feel free to open a Trac ticket requesting it to be documented (hence public API), if you think it's really useful.

This comment has been minimized.

Show comment Hide comment
@mjtamlyn

mjtamlyn Feb 5, 2013

Member

I know of a lot of libraries which utilise this sort of functionality for their own settings. Opened https://code.djangoproject.com/ticket/19748

Member

mjtamlyn replied Feb 5, 2013

I know of a lot of libraries which utilise this sort of functionality for their own settings. Opened https://code.djangoproject.com/ticket/19748

ramiro and others added some commits Feb 4, 2013

Store previous string in po files
This easies translators works on fuzzy strings, where they
can check what has been changed.

This can be disabled using --no-previous parameter.
@timgraham

This comment has been minimized.

Show comment Hide comment
@timgraham

timgraham May 31, 2013

Owner

Is there a trac ticket?

Owner

timgraham commented May 31, 2013

Is there a trac ticket?

@nijel

This comment has been minimized.

Show comment Hide comment
@nijel

nijel Jun 3, 2013

Contributor

No, is it required?

Contributor

nijel commented Jun 3, 2013

No, is it required?

@timgraham

This comment has been minimized.

Show comment Hide comment
@timgraham

timgraham Jun 3, 2013

Owner

Yes, it helps the pull request from getting lost.

Owner

timgraham commented Jun 3, 2013

Yes, it helps the pull request from getting lost.

@nijel

This comment has been minimized.

Show comment Hide comment
@nijel

nijel Jun 6, 2013

Contributor
Contributor

nijel commented Jun 6, 2013

@timgraham

This comment has been minimized.

Show comment Hide comment
@timgraham

timgraham Aug 4, 2013

Owner

Is model_name still considered private API? (#20853)

Owner

timgraham commented on ec469ad Aug 4, 2013

Is model_name still considered private API? (#20853)

@timgraham

This comment has been minimized.

Show comment Hide comment
@timgraham

timgraham Feb 6, 2014

Owner

Closing this in light of the alternate patch proposed on the ticket.

Owner

timgraham commented Feb 6, 2014

Closing this in light of the alternate patch proposed on the ticket.

@timgraham timgraham closed this Feb 6, 2014

ramiro pushed a commit to ramiro/django that referenced this pull request Jul 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment