Properly use gettext for plural forms

This commit is contained in:
Igor Murzov 2014-06-30 03:44:07 +04:00
parent e624345d3d
commit af50cdc7e1
1 changed files with 3 additions and 5 deletions

View File

@ -152,12 +152,10 @@ packagekit_popup_update(E_PackageKit_Instance *inst)
}
}
if (num_updates == 1)
snprintf(buf, sizeof(buf), "%s", _("One update available"));
else if (num_updates > 1)
snprintf(buf, sizeof(buf), _("%d updates available"), num_updates);
if (num_updates >= 1)
snprintf(buf, sizeof(buf), P_("One update available", "%d updates available", num_updates), num_updates);
else
snprintf(buf, sizeof(buf), "%s", _("Your system is updated"));
snprintf(buf, sizeof(buf), _("Your system is updated"));
e_widget_label_text_set(inst->popup_label, buf);
}