Skip to content

Commit

Permalink
i18n: Use string instead of unit
Browse files Browse the repository at this point in the history
Translators are used to string, and is also the most used translation
for this thing throughout Pootle.
  • Loading branch information
unho committed Jul 5, 2017
1 parent 97e3126 commit 6a6e868
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pootle/apps/pootle_language/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class LanguageSuggestionAdminView(PootleLanguageAdminFormView):
form_class = LanguageSuggestionAdminForm
success_url_pattern = "pootle-language-admin-suggestions"
formtable_columns = (
_("Unit"),
_("String"),
_("State"),
_("Source"),
_("Suggestion"),
Expand Down
2 changes: 1 addition & 1 deletion pootle/apps/pootle_store/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ def clean_target_f(self):
self.add_error(
"target_f",
forms.ValidationError(
_("Suggestion '%s' equals to current unit target value.",
_("Suggestion '%s' equals to current string translation.",
target)))
else:
return self.cleaned_data["target_f"]
Expand Down
2 changes: 1 addition & 1 deletion pootle/apps/pootle_store/unit/timeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def __init__(self, unit_source, **kwargs):

@property
def context(self):
ctx = dict(description=_(u"Unit created"))
ctx = dict(description=_(u"String created"))
if self.target_event is not None:
if self.target_event.value.old_value != '':
ctx['value'] = self.target_event.value.old_value
Expand Down
2 changes: 1 addition & 1 deletion pootle/templates/editor/units/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<li><span class="content-wrapper">{{ language.name }}</span></li>
<li><span class="content-wrapper">{{ project }}</span></li>
<li><span class="content-wrapper">{{ unit.store.path }}</span></li>
<li><span class="content-wrapper">{% blocktrans with url=unit.get_translate_url id=unit.id %}<a href="{{ url }}">Unit #{{ id }}</a>{% endblocktrans %}</span></li>
<li><span class="content-wrapper">{% blocktrans with url=unit.get_translate_url id=unit.id %}<a href="{{ url }}">String #{{ id }}</a>{% endblocktrans %}</span></li>
</ul>
</div>
<div class="translate-{% locale_align %}">
Expand Down
2 changes: 1 addition & 1 deletion pootle/templates/languages/admin/language_team.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ <h3>{% trans "Projects" %}</h3>
</div>
</div>
<div class="config-content-panel">
<h3>{% trans "Unit and suggestions admin" %}</h3>
<h3>{% trans "String and suggestions admin" %}</h3>
<div class="padded">
{% url 'pootle-language-translate' language_code=language.code as translate_url %}
<ul>
Expand Down
8 changes: 4 additions & 4 deletions tests/pootle_store/timeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def test_timeline_translated_unit_creation(store0, member):
assert len(group['events']) == 1
assert group['events'][0]['value'] == unit.target
assert group['events'][0]['translation']
assert group['events'][0]['description'] == u"Unit created"
assert group['events'][0]['description'] == u"String created"
assert group['via_upload'] is False
assert group['datetime'] == unit.creation_time
assert group['user'].username == member.username
Expand All @@ -287,7 +287,7 @@ def test_timeline_untranslated_unit_creation(store0, member):
assert len(group['events']) == 1
assert 'value' not in group['events'][0]
assert 'translation' not in group['events'][0]
assert group['events'][0]['description'] == u"Unit created"
assert group['events'][0]['description'] == u"String created"
assert group['via_upload'] is False
assert group['datetime'] == unit.creation_time
assert group['user'].username == member.username
Expand All @@ -306,7 +306,7 @@ def test_timeline_untranslated_unit_creation_with_updates(store0, member):
assert len(group['events']) == 1
assert 'value' not in group['events'][0]
assert 'translation' not in group['events'][0]
assert group['events'][0]['description'] == u"Unit created"
assert group['events'][0]['description'] == u"String created"
assert group['via_upload'] is False
assert group['datetime'] == unit.creation_time
assert group['user'].username == member.username
Expand All @@ -327,7 +327,7 @@ def test_timeline_translated_unit_creation_with_updates(store0, member):
assert len(group['events']) == 1
assert group['events'][0]['value'] == "Bar"
assert group['events'][0]['translation']
assert group['events'][0]['description'] == u"Unit created"
assert group['events'][0]['description'] == u"String created"
assert group['via_upload'] is False
assert group['datetime'] == unit.creation_time
assert group['user'].username == member.username
Expand Down

0 comments on commit 6a6e868

Please sign in to comment.