r20089 - gnucash/trunk/src/business/business-ledger - Improve the for translators problematic format string from gnc_entry_ledger_verify_acc_cell_ok

Frank H. Ellenberger fell at code.gnucash.org
Thu Jan 13 18:12:41 EST 2011


Author: fell
Date: 2011-01-13 18:12:41 -0500 (Thu, 13 Jan 2011)
New Revision: 20089
Trac: http://svn.gnucash.org/trac/changeset/20089

Modified:
   gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c
Log:
Improve the for translators problematic format string from gnc_entry_ledger_verify_acc_cell_ok

This version uses 2 separate sentences,
mentions currencies and
gives a clue for the account type.
Add enable basic doxygen output.

Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c	2011-01-13 22:01:14 UTC (rev 20088)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c	2011-01-13 23:12:41 UTC (rev 20089)
@@ -1,9 +1,10 @@
-/*
- * gncEntryLedgerControl.c -- Control for GncEntry ledger
+/** \file gncEntryLedgerControl.c
+ * \brief Control for GncEntry ledger
+ *
  * Copyright (C) 2001, 2002, 2003 Derek Atkins
  * Author: Derek Atkins <warlord at MIT.EDU>
- * Copyright (C) 2010 Christian Stimming <christian at cstimming.de>
- *
+ * Copyright (C) 2010 Christian Stimming <christian at cstimming.de> */
+/*
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
  * published by the Free Software Foundation; either version 2 of
@@ -149,16 +150,16 @@
     name = cell->cell.value;
     if (!name || *name == '\0')
     {
-        /* Translators: %s is the string "an Account" i.e. its translation. */
-        const char *format = _("Invalid Entry:  You need to supply %s.");
+        const char *format = ("%s %s");
+        const char *gen_msg = _("Invalid Entry: You need to supply an account in the right currency for this position.");
 
-        gnc_error_dialog (ledger->parent, format, cell_msg);
+        gnc_error_dialog (ledger->parent, format, gen_msg, cell_msg);
         return FALSE;
     }
     return TRUE;
 }
 
-/* Verify whether we can save the entry, or warn the user when we can't
+/** Verify whether we can save the entry, or warn the user when we can't
  * return TRUE if we can save, FALSE if there is a problem
  */
 static gboolean
@@ -176,13 +177,13 @@
         {
         case GNCENTRY_INVOICE_ENTRY:
             if (!gnc_entry_ledger_verify_acc_cell_ok (ledger, ENTRY_IACCT_CELL,
-                    _("an Account")))
+                    _("This account should usually be of type income.")))
                 return FALSE;
             break;
         case GNCENTRY_BILL_ENTRY:
         case GNCENTRY_EXPVOUCHER_ENTRY:
             if (!gnc_entry_ledger_verify_acc_cell_ok (ledger, ENTRY_BACCT_CELL,
-                    _("an Account")))
+                    _("This account should usually be of type expense or asset.")))
                 return FALSE;
             break;
         default:



More information about the gnucash-changes mailing list