Code

Opened 5 years ago

Closed 4 years ago

#12193 closed (fixed)

Add details to the i18n documentation for translation of model classes (relations and methods)

Reported by: maxime.petazzoni@… Owned by: nobody
Component: Documentation Version: 1.1
Severity: Keywords: i18n
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

While working on the internationalization of a Django application recently, I had a hard time finding how to translate a few things used in model classes : relations and model methods, when used for columns or fields in the Django admin site.

I finally found the solutions from some random code snippet on the web, but I think this really belongs to Django's excellent documentation, so you'll find attached a patch to add a few details on how this is done.

I know there's an i18n documentation refactoring going on in #10260. If my patch needs to be reworked on top of that refactoring once it's checked in, please let me know.

Attachments (2)

django-doc-i18n.patch (1.7 KB) - added by maxime.petazzoni@… 5 years ago.
Adding a section "Notes on model classes translation" to the i18n documentation
12193.diff (1.8 KB) - added by ramiro 4 years ago.
Patch updated to post i18n docs refactor.

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by maxime.petazzoni@…

Adding a section "Notes on model classes translation" to the i18n documentation

comment:1 Changed 5 years ago by maxime.petazzoni@…

  • Summary changed from Add details to the 18n documentation for translation of model classes to Add details to the i18n documentation for translation of model classes (relations and methods)

Fixing typo in bug summary.

comment:2 Changed 4 years ago by russellm

  • milestone set to 1.2
  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to Accepted

Will need to be updated to be integrated into the changes for #10260, but otherwise seems reasonable.

Changed 4 years ago by ramiro

Patch updated to post i18n docs refactor.

comment:3 Changed 4 years ago by ramiro

  • Patch needs improvement unset

comment:4 Changed 4 years ago by ubernostrum

  • milestone 1.2 deleted

This isn't critical to 1.2; we can always go back and improve documentation as needed, but attention right now should focus on actual bugs.

comment:5 Changed 4 years ago by timo

  • Resolution set to fixed
  • Status changed from new to closed

(In [15103]) [1.2.X] Fixed #12193 - Add details to the i18n documentation for translation of model classes (relations and methods). Thanks Maxime Petazzoni and Ramiro for work on the patch.

Backport of r15102 from trunk.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.