Commit a7b08834 authored by Michal Čihař's avatar Michal Čihař

Document isblank usage

parent 6c8b4563
......@@ -15,8 +15,8 @@ MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'weblate', # Or path to database file if using sqlite3.
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'weblate.db', # Or path to database file if using sqlite3.
'USER': 'weblate', # Not used with sqlite3.
'PASSWORD': 'weblate', # Not used with sqlite3.
'HOST': '127.0.0.1', # Set to empty string for localhost. Not used with sqlite3.
......
......@@ -798,6 +798,9 @@ class Translation(models.Model):
# Load po file
store = self.get_store()
for pos, unit in enumerate(store.units):
# We care only about translatable strings
# For some reason, blank string does not mean non translatable
# unit in some formats (XLIFF), so let's skip those as well
if not unit.istranslatable() or unit.isblank():
continue
newunit = Unit.objects.update_from_unit(self, unit, pos)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment