EPhoto: Add plural translating
This commit is contained in:
parent
d4a477db41
commit
de374892ee
|
@ -140,7 +140,9 @@ _add_slideshow_config(Evas_Object *parent, Ephoto *ephoto)
|
|||
|
||||
spinner = elm_spinner_add(table);
|
||||
elm_spinner_editable_set(spinner, EINA_TRUE);
|
||||
elm_spinner_label_format_set(spinner, "%1.0f seconds");
|
||||
memset(buf, 0, PATH_MAX);
|
||||
snprintf(buf, PATH_MAX, "%%1.0f %s", _("seconds"));
|
||||
elm_spinner_label_format_set(spinner, buf);
|
||||
elm_spinner_step_set(spinner, 1);
|
||||
elm_spinner_value_set(spinner, ephoto->config->slideshow_timeout);
|
||||
elm_spinner_min_max_set(spinner, 1, 60);
|
||||
|
@ -223,14 +225,14 @@ _add_about_config(Evas_Object *parent, Ephoto *ephoto)
|
|||
label = elm_label_add(scroller);
|
||||
evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
eina_strbuf_append_printf(sbuf, "<b>About Ephoto</b><br/>"
|
||||
eina_strbuf_append_printf(sbuf, _("<b>About Ephoto</b><br/>"
|
||||
"Ephoto is a comprehensive image viewer based on the EFL.<br/>"
|
||||
"For more information, please visit the Ephoto project page on the Enlightenment wiki:<br/>"
|
||||
"https://phab.enlightenment.org/w/projects/ephoto<br/>"
|
||||
"Ephoto's source can be found through Enlightenment's git:<br/>"
|
||||
"http://git.enlightenment.org/apps/ephoto.git<br/>"
|
||||
"<br/>"
|
||||
"<b>Authors:</b><br/>");
|
||||
"<b>Authors:</b><br/>"));
|
||||
f = fopen(PACKAGE_DATA_DIR "/AUTHORS", "r");
|
||||
if (f)
|
||||
{
|
||||
|
|
|
@ -515,23 +515,23 @@ _ephoto_get_file_size(const char *path)
|
|||
size_t size = eina_file_size_get(f);
|
||||
eina_file_close(f);
|
||||
double dsize = (double)size;
|
||||
if (dsize < 1024.0) snprintf(isize, sizeof(isize), "%'.0f%s", dsize, _("B"));
|
||||
if (dsize < 1024.0) snprintf(isize, sizeof(isize), "%'.0f%s", dsize, ngettext("B", "Bs", dsize));
|
||||
else
|
||||
{
|
||||
dsize /= 1024.0;
|
||||
if (dsize < 1024) snprintf(isize, sizeof(isize), "%'.0f%s", dsize, _("KB"));
|
||||
if (dsize < 1024) snprintf(isize, sizeof(isize), "%'.0f%s", dsize, ngettext("KB", "KBs", dsize));
|
||||
else
|
||||
{
|
||||
dsize /= 1024.0;
|
||||
if (dsize < 1024) snprintf(isize, sizeof(isize), "%'.1f%s", dsize, _("MB"));
|
||||
if (dsize < 1024) snprintf(isize, sizeof(isize), "%'.1f%s", dsize, ngettext("MB", "MBs", dsize));
|
||||
else
|
||||
{
|
||||
dsize /= 1024.0;
|
||||
if (dsize < 1024) snprintf(isize, sizeof(isize), "%'.1f%s", dsize, _("GB"));
|
||||
if (dsize < 1024) snprintf(isize, sizeof(isize), "%'.1f%s", dsize, ngettext("GB", "GBs", dsize));
|
||||
else
|
||||
{
|
||||
dsize /= 1024.0;
|
||||
snprintf(isize, sizeof(isize), "%'.1f%s", dsize, _("TB"));
|
||||
snprintf(isize, sizeof(isize), "%'.1f%s", dsize, ngettext("TB", "TBs", dsize));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -698,7 +698,7 @@ _ephoto_thumb_populate_end(void *data, int type EINA_UNUSED, void *event EINA_UN
|
|||
evas_object_size_hint_align_set(tb->nolabel, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_table_pack(tb->table, tb->nolabel, 0, 0, 4, 1);
|
||||
evas_object_show(tb->nolabel);
|
||||
snprintf(buf, PATH_MAX, "<b>%s:</b> 0 %s <b>%s:</b> 0 %s", _("Total"), _("images"), _("Size"), _("bytes"));
|
||||
snprintf(buf, PATH_MAX, "<b>%s:</b> 0 %s <b>%s:</b> 0%s", _("Total"), ngettext("image", "images", 0), _("Size"), ngettext("B", "Bs", 0));
|
||||
elm_object_text_set(tb->infolabel, buf);
|
||||
}
|
||||
}
|
||||
|
@ -713,29 +713,29 @@ _ephoto_thumb_populate_end(void *data, int type EINA_UNUSED, void *event EINA_UN
|
|||
char isize[PATH_MAX];
|
||||
char image_info[PATH_MAX];
|
||||
|
||||
if (tb->totsize < 1024.0) snprintf(isize, sizeof(isize), "%'.0f%s", tb->totsize, _("B"));
|
||||
if (tb->totsize < 1024.0) snprintf(isize, sizeof(isize), "%'.0f%s", tb->totsize, ngettext("B", "Bs", tb->totsize));
|
||||
else
|
||||
{
|
||||
tb->totsize /= 1024.0;
|
||||
if (tb->totsize < 1024) snprintf(isize, sizeof(isize), "%'.0f%s", tb->totsize, _("KB"));
|
||||
if (tb->totsize < 1024) snprintf(isize, sizeof(isize), "%'.0f%s", tb->totsize, ngettext("KB", "KBs", tb->totsize));
|
||||
else
|
||||
{
|
||||
tb->totsize /= 1024.0;
|
||||
if (tb->totsize < 1024) snprintf(isize, sizeof(isize), "%'.1f%s", tb->totsize, _("MB"));
|
||||
if (tb->totsize < 1024) snprintf(isize, sizeof(isize), "%'.1f%s", tb->totsize, ngettext("MB", "MBs", tb->totsize));
|
||||
else
|
||||
{
|
||||
tb->totsize /= 1024.0;
|
||||
if (tb->totsize < 1024) snprintf(isize, sizeof(isize), "%'.1f%s", tb->totsize, _("GB"));
|
||||
if (tb->totsize < 1024) snprintf(isize, sizeof(isize), "%'.1f%s", tb->totsize, ngettext("GB", "GBs", tb->totsize));
|
||||
else
|
||||
{
|
||||
tb->totsize /= 1024.0;
|
||||
snprintf(isize, sizeof(isize), "%'.1f%s", tb->totsize, _("TB"));
|
||||
snprintf(isize, sizeof(isize), "%'.1f%s", tb->totsize, ngettext("TB", "TBs", tb->totsize));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
snprintf(image_info, PATH_MAX, "<b>%s:</b> %d %s <b>%s:</b> %s",
|
||||
_("Total"), tb->totimages, _("images"), _("Size"), isize);
|
||||
_("Total"), tb->totimages, ngettext("image", "images", tb->totimages), _("Size"), isize);
|
||||
elm_object_text_set(tb->infolabel, image_info);
|
||||
}
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
|
|
Loading…
Reference in New Issue