]> source.dussan.org Git - tigervnc.git/commitdiff
Avoid translation strings with leading and/or trailing whitespace. Our
authorPeter Åstrand <astrand@cendio.se>
Mon, 29 Aug 2011 13:14:51 +0000 (13:14 +0000)
committerPeter Åstrand <astrand@cendio.se>
Mon, 29 Aug 2011 13:14:51 +0000 (13:14 +0000)
experience is that translators very often fails to notice them and
forgets to include the whitespace in the translated string.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4661 3789f03b-4d11-0410-bbf8-ca57d06f2519

vncviewer/vncviewer.cxx

index 6fea19928db80d03e4488c0f05ccc8debf30b9b1..1efe1d7d16055261b081640ca912b1bab21ddba5 100644 (file)
@@ -140,13 +140,21 @@ static void init_fltk()
   fl_close  = _("Close");
 
 #ifdef __APPLE__
-  Fl_Mac_App_Menu::about = _("About ");
+  /* Needs trailing space */
+  static char fltk_about[16];
+  snprintf(fltk_about, sizeof(fltk_about), "%s ", _("About"));
+  Fl_Mac_App_Menu::about = fltk_about;
+  static char fltk_hide[16];
+  snprintf(fltk_hide, sizeof(fltk_hide), "%s ", _("Hide"));
+  Fl_Mac_App_Menu::hide = fltk_hide;
+  static char fltk_quit[16];
+  snprintf(fltk_quit, sizeof(fltk_quit), "%s ", _("Quit"));
+  Fl_Mac_App_Menu::quit = fltk_quit;
+
   Fl_Mac_App_Menu::print = ""; // Don't want the print item
   Fl_Mac_App_Menu::services = _("Services");
-  Fl_Mac_App_Menu::hide = _("Hide ");
   Fl_Mac_App_Menu::hide_others = _("Hide Others");
   Fl_Mac_App_Menu::show = _("Show All");
-  Fl_Mac_App_Menu::quit = _("Quit ");
 
   fl_mac_set_about(about_callback, NULL);
 #endif