Fix retrieval of reconcile abbreviation if the translators erroneously

did not use the same string length as the english string. Bug #339722.




git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13888 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming
2006-04-30 10:32:34 +00:00
parent 2f5698d619
commit a0bbda961f
2 changed files with 30 additions and 10 deletions
+6
View File
@@ -1,3 +1,9 @@
2006-04-30 Christian Stimming <stimming@tuhh.de>
* src/app-utils/gnc-ui-util.c: Fix retrieval of reconcile
abbreviation if the translators erroneously did not use the same
string length as the english string. Bug #339722.
2006-04-29 David Hampton <hampton@employees.org>
* src/engine/gnc-lot.c:
+24 -10
View File
@@ -483,6 +483,20 @@ gnc_ui_account_get_tax_info_string (const Account *account)
}
static const char *
string_after_colon (const char *msgstr)
{
const char *string_at_colon;
g_assert(msgstr);
string_at_colon = strchr(msgstr, ':');
if (string_at_colon)
return string_at_colon + 1;
else
/* No colon found; we assume the translation contains only the
part after the colon, similar to the disambiguation prefixes */
return msgstr;
}
/********************************************************************\
* gnc_get_reconcile_str *
* return the i18n'd string for the given reconciled flag *
@@ -497,16 +511,16 @@ gnc_get_reconcile_str (char reconciled_flag)
{
/* Translators: For the following strings, the single letters
after the colon are abbreviations of the word before the
colon. Please only translate the letter *after* the colon. */
case NREC: return _("not cleared:n") + 12;
/* Please only translate the letter *after* the colon. */
case CREC: return _("cleared:c") + 8;
/* Please only translate the letter *after* the colon. */
case YREC: return _("reconciled:y") + 11;
/* Please only translate the letter *after* the colon. */
case FREC: return _("frozen:f") + 7;
/* Please only translate the letter *after* the colon. */
case VREC: return _("void:v") + 5;
colon. You should only translate the letter *after* the colon. */
case NREC: return string_after_colon(_("not cleared:n"));
/* Translators: Please only translate the letter *after* the colon. */
case CREC: return string_after_colon(_("cleared:c"));
/* Translators: Please only translate the letter *after* the colon. */
case YREC: return string_after_colon(_("reconciled:y"));
/* Translators: Please only translate the letter *after* the colon. */
case FREC: return string_after_colon(_("frozen:f"));
/* Translators: Please only translate the letter *after* the colon. */
case VREC: return string_after_colon(_("void:v"));
default:
PERR("Bad reconciled flag\n");
return NULL;