Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n: Use string instead of unit and other cleanups #6556

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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