Shrink progress text so that it fits better on 4:3 screens.
[dcpomatic.git] / src / lib / util.cc
index e0db5de2ef2aa71558d2bc8a5b3d701e50ee254d..728e7d048199f08652329b078e214039e244bbc1 100644 (file)
 #include <glib.h>
 #include <openjpeg.h>
 #include <pangomm/init.h>
+#ifdef DCPOMATIC_IMAGE_MAGICK
 #include <magick/MagickCore.h>
+#else
+#include <magick/common.h>
+#include <magick/magick_config.h>
+#endif
 #include <magick/version.h>
 #include <dcp/version.h>
 #include <dcp/util.h>
@@ -151,14 +156,11 @@ seconds_to_approximate_hms (int s)
 
        if (hours) {
                if (m > 30 && !minutes) {
-                       ap << (h + 1) << N_(" ") << _("hours");
+                       /* TRANSLATORS: h here is an abbreviation for hours */
+                       ap << (h + 1) << _("h");
                } else {
-                       ap << h << N_(" ");
-                       if (h == 1) {
-                               ap << _("hour");
-                       } else {
-                               ap << _("hours");
-                       }
+                       /* TRANSLATORS: h here is an abbreviation for hours */
+                       ap << h << _("h");
                }
 
                if (minutes | seconds) {
@@ -169,14 +171,11 @@ seconds_to_approximate_hms (int s)
        if (minutes) {
                /* Minutes */
                if (s > 30 && !seconds) {
-                       ap << (m + 1) << N_(" ") << _("minutes");
+                       /* TRANSLATORS: m here is an abbreviation for minutes */
+                       ap << (m + 1) << _("m");
                } else {
-                       ap << m << N_(" ");
-                       if (m == 1) {
-                               ap << _("minute");
-                       } else {
-                               ap << _("minutes");
-                       }
+                       /* TRANSLATORS: m here is an abbreviation for minutes */
+                       ap << m << _("m");
                }
 
                if (seconds) {
@@ -186,12 +185,8 @@ seconds_to_approximate_hms (int s)
 
        if (seconds) {
                /* Seconds */
-               ap << s << N_(" ");
-               if (s == 1) {
-                       ap << _("second");
-               } else {
-                       ap << _("seconds");
-               }
+               /* TRANSLATORS: s here is an abbreviation for seconds */
+               ap << s << _("s");
        }
 
        return ap.str ();