r18568 - gnucash/trunk/src/business/business-gnome - Fix translation issues caused by r18474.

Derek Atkins warlord at MIT.EDU
Wed Jan 13 11:05:24 EST 2010


Geert,

The problem with this change is that the dialog might be for paying
a Vendor Bill or Employee Voucher but now the tooltip will always say
"Invoice" and "Customer", which isn't always correct!

What was the "translation issue" caused by this original change?

-derek

Geert Janssens <gjanssens at code.gnucash.org> writes:

> Fix translation issues caused by r18474.
>
> Modified: gnucash/trunk/src/business/business-gnome/dialog-payment.c
> ===================================================================
> --- gnucash/trunk/src/business/business-gnome/dialog-payment.c	2010-01-12 21:25:04 UTC (rev 18567)
> +++ gnucash/trunk/src/business/business-gnome/dialog-payment.c	2010-01-13 00:00:03 UTC (rev 18568)
> @@ -431,9 +431,6 @@
>    PaymentWindow *pw;
>    GladeXML *xml;
>    GtkWidget *box, *label;
> -  GtkTooltips *dialog_tips;
> -  gchar *tooltip;
> -  const gchar *ownerlabel, *invoicelabel;
>    char * cm_class = (gncOwnerGetType (owner) == GNC_OWNER_CUSTOMER ?
>  		     DIALOG_PAYMENT_CUSTOMER_CM_CLASS :
>  		     DIALOG_PAYMENT_VENDOR_CM_CLASS);
> @@ -468,9 +465,6 @@
>    xml = gnc_glade_xml_new ("payment.glade", "Payment Dialog");
>    pw->dialog = glade_xml_get_widget (xml, "Payment Dialog");
>    
> -  /* Prepare tooltips */
> -  dialog_tips = gtk_tooltips_new();
> -
>    /* Grab the widgets and build the dialog */
>    pw->num_entry = glade_xml_get_widget (xml, "num_entry");
>    pw->memo_entry = glade_xml_get_widget (xml, "memo_entry");
> @@ -480,29 +474,11 @@
>    label = glade_xml_get_widget (xml, "owner_label");
>    box = glade_xml_get_widget (xml, "owner_box");
>    pw->owner_choice = gnc_owner_select_create (label, box, book, owner);
> -  ownerlabel = gtk_label_get_text(GTK_LABEL(label));
>  
> -  /* Add tooltip to onwer widgets*/
> -  tooltip = g_strdup_printf(_("The %s this payment relates to."), ownerlabel);
> -  gtk_tooltips_set_tip (dialog_tips, label, tooltip, NULL);
> -  gtk_tooltips_set_tip (dialog_tips, box, tooltip, NULL);
> -  g_free (tooltip);
> -
>    label = glade_xml_get_widget (xml, "invoice_label");
>    box = glade_xml_get_widget (xml, "invoice_box");
>    pw->invoice_choice = gnc_invoice_select_create (box, book, owner, invoice, label);
> -  invoicelabel = gtk_label_get_text(GTK_LABEL(label));
>  
> -  /* Add tooltip */
> -  tooltip = g_strdup_printf(_(
> -		"The %s to assign this payment to.\n\nNote that is field is optional. "
> -		"If you leave it blank, GnuCash will automatically assign the payment to the "
> -		"first unpaid %s for this %s."), invoicelabel, invoicelabel, ownerlabel);
> -  gtk_tooltips_set_tip (dialog_tips, label, tooltip, NULL);
> -  gtk_tooltips_set_tip (dialog_tips, box, tooltip, NULL);
> -  g_free (tooltip);
> -  
> -  label = glade_xml_get_widget (xml, "amount_label");
>    box = glade_xml_get_widget (xml, "amount_box");
>    pw->amount_edit = gnc_amount_edit_new ();
>    gtk_box_pack_start (GTK_BOX (box), pw->amount_edit, TRUE, TRUE, 0);
> @@ -510,18 +486,6 @@
>  					 TRUE);
>    gnc_amount_edit_set_amount (GNC_AMOUNT_EDIT (pw->amount_edit), gnc_numeric_zero());
>  
> -  /* Add tooltip */
> -  tooltip = g_strdup_printf(_(
> -		"The amount to pay for this %s.\n\nIf you have selected a %s, GnuCash "
> -		"will propose the amount still due for it here, but you can "
> -		"decrease it for a partial payment or increase it for an over-payment. "
> -		"In case of an over-payment or if no %s was selected, GnuCash will automatically "
> -		"assign the  additional amount to the first unpaid %s for this %s."),
> -		ownerlabel, invoicelabel, invoicelabel, invoicelabel, ownerlabel);
> -  gtk_tooltips_set_tip (dialog_tips, label, tooltip, NULL);
> -  gtk_tooltips_set_tip (dialog_tips, box, tooltip, NULL);
> -  g_free (tooltip);
> -  
>    box = glade_xml_get_widget (xml, "date_box");
>    pw->date_edit = gnc_date_edit_new (time(NULL), FALSE, FALSE);
>    gtk_box_pack_start (GTK_BOX (box), pw->date_edit, TRUE, TRUE, 0);
>
> Modified: gnucash/trunk/src/business/business-gnome/glade/payment.glade
> ===================================================================
> --- gnucash/trunk/src/business/business-gnome/glade/payment.glade	2010-01-12 21:25:04 UTC (rev 18567)
> +++ gnucash/trunk/src/business/business-gnome/glade/payment.glade	2010-01-13 00:00:03 UTC (rev 18568)
> @@ -115,6 +115,7 @@
>  			  <property name="width_chars">-1</property>
>  			  <property name="single_line_mode">False</property>
>  			  <property name="angle">0</property>
> +			  <property name="tooltip" translatable="yes">The company associated with this payment.</property>
>  			</widget>
>  			<packing>
>  			  <property name="padding">0</property>
> @@ -140,6 +141,9 @@
>  			  <property name="width_chars">-1</property>
>  			  <property name="single_line_mode">False</property>
>  			  <property name="angle">0</property>
> +			  <property name="tooltip" translatable="yes">The invoice being paid.
> +
> +Note that is field is optional. If you leave it blank, GnuCash will automatically assign the payment to the first unpaid invoice for this company.</property>
>  			</widget>
>  			<packing>
>  			  <property name="padding">0</property>
> @@ -190,6 +194,11 @@
>  			  <property name="width_chars">-1</property>
>  			  <property name="single_line_mode">False</property>
>  			  <property name="angle">0</property>
> +			  <property name="tooltip" translatable="yes">The amount to pay for this invoice.
> +
> +If you have selected an invoice, GnuCash will propose the amount still due for it. You can change this amount to create a partial payment or an over-payment.
> +
> +In case of an over-payment or if no invoice was selected, GnuCash will automatically assign the remaining amount to the first unpaid invoice for this company.</property>
>  			</widget>
>  			<packing>
>  			  <property name="padding">0</property>
> @@ -267,6 +276,7 @@
>  			  <property name="visible">True</property>
>  			  <property name="homogeneous">False</property>
>  			  <property name="spacing">0</property>
> +			  <property name="tooltip" translatable="yes">The company associated with this payment.</property>
>  
>  			  <child>
>  			    <placeholder/>
> @@ -284,7 +294,10 @@
>  			  <property name="visible">True</property>
>  			  <property name="homogeneous">False</property>
>  			  <property name="spacing">0</property>
> +			  <property name="tooltip" translatable="yes">The invoice to be paid.
>  
> +Note that is field is optional. If you leave it blank, GnuCash will automatically assign the payment to the first unpaid invoice for this company.</property>
> +
>  			  <child>
>  			    <placeholder/>
>  			  </child>
> @@ -318,7 +331,12 @@
>  			  <property name="visible">True</property>
>  			  <property name="homogeneous">False</property>
>  			  <property name="spacing">0</property>
> +			  <property name="tooltip" translatable="yes">The amount to pay for this invoice.
>  
> +If you have selected an invoice, GnuCash will propose the amount still due for it. You can change this amount to create a partial payment or an over-payment.
> +
> +In case of an over-payment or if no invoice was selected, GnuCash will automatically assign the remaining amount to the first unpaid invoice for this company.</property>
> +
>  			  <child>
>  			    <placeholder/>
>  			  </child>
>
> _______________________________________________
> gnucash-changes mailing list
> gnucash-changes at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-changes
>
>

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list