Skip to content

Commit f712779

Browse files
authored
Merge pull request #280 from cuducos/cuducos-locale-files
Fix i18n bugs
2 parents d76e446 + 4d36fdf commit f712779

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Authors
1010
- Daniel Levy
1111
- Daniel Roschka
1212
- David Hite
13+
- Eduardo Cuducos
1314
- George Vilches
1415
- Grzegorz Bialy
1516
- Hamish Downer

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ include MANIFEST.in
22
include *.rst
33
include *.txt
44
recursive-include docs *.rst
5+
recursive-include simple_history/locale *
56
recursive-include simple_history/templates *

simple_history/models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from django.utils.encoding import python_2_unicode_compatible
1313
from django.utils.encoding import smart_text
1414
from django.utils.timezone import now
15-
from django.utils.translation import string_concat
15+
from django.utils.translation import string_concat, ugettext as _
1616

1717
try:
1818
from django.apps import apps
@@ -206,9 +206,9 @@ def get_instance(self):
206206
user_model, null=True, related_name=self.user_related_name,
207207
on_delete=models.SET_NULL),
208208
'history_type': models.CharField(max_length=1, choices=(
209-
('+', 'Created'),
210-
('~', 'Changed'),
211-
('-', 'Deleted'),
209+
('+', _('Created')),
210+
('~', _('Changed')),
211+
('-', _('Deleted')),
212212
)),
213213
'history_object': HistoricalObjectDescriptor(model),
214214
'instance': property(get_instance),

simple_history/templates/simple_history/object_history.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
{{ action.history_user }}
3636
{% endif %}
3737
{% else %}
38-
None
38+
{% trans "None" %}
3939
{% endif %}
4040
</td>
4141
</tr>

0 commit comments

Comments
 (0)