r19077 - gnucash/trunk - Bug #616696 - Development version warning string should not include hardcode version.

Geert Janssens janssens-geert at telenet.be
Tue Apr 27 16:25:40 EDT 2010


On Tuesday 27 April 2010, Christian Stimming wrote:
> Dear Geert,
> 
> unfortunately even this updated patch won't work.
> 
> The problem is that the translators will see the string including
>  @-VERSION-@ in the gnucash.pot file, and provide a translation for that.
>  But at runtime, the string will be different (due to the creation rule for
> tip_of_the_day.list), as it will contain "2.2.9" instead of "@-VERSION-@"
>  at this place. Hence, no translation for this can be found anymore,
>  because the translations match only for the string containing @-VERSION- at .
> 
> The deeper reason for this is that the version number replacement of any
> placeholder must be done *after translation*, which implies it can only be
> done at run-time and not at install time (which your patch would do).
> 
> I think the only solution is to change the code that displays the
>  tip_of_day to check whether the string contains "%s", *after translation*.
>  If it does, the translated string is passed through g_strdup_printf to
>  insert some version number here.
> 
Ugh, I had this gut feeling something wasn't right...

I've quickly looked at the code, but I don't think it's easy to modify it in 
such a way that parameters can be substituted generically. I could add some 
exception code that particularly tests for my use case 
(GNUCASH_LATEST_STABLE_VERSION), but I don't like that idea.

Unless someone knows a better way to implement this, I'll just revert my 
change altogether.

Geert


More information about the gnucash-devel mailing list