@@ -602,7 +602,9 @@ static void
602602add_error (StringVec& errors, const char * format_str, const char * arg)
603603{
604604 gchar *buf = g_strdup_printf (_ (format_str),
605- g_dpgettext2 (nullptr , " Stock Assistant: Page name" , arg));
605+ g_strcmp0 (" Cash" , arg) ?
606+ _ (arg) :
607+ g_dpgettext2 (nullptr , " Stock Assistant" , arg));
606608 errors.emplace_back (buf);
607609 g_free (buf);
608610}
@@ -757,7 +759,9 @@ to ensure proper recording."), new_date_str, last_split_date_str);
757759 else
758760 check_page (line, debit, credit, info->txn_type ->stock_value , info->acct ,
759761 info->stock_memo_edit , info->stock_value_edit , info->currency ,
760- NC_ (" Stock Assistant: Page name" , " stock value" ), errors);
762+ // Translators: Designates the page in the Stock Assistant for entering
763+ // the currency value of a non-currency asset.
764+ N_ (" Stock Value" ), errors);
761765
762766
763767 if (info->txn_type ->stock_amount == FieldMask::DISABLED)
@@ -827,7 +831,9 @@ to ensure proper recording."), new_date_str, last_split_date_str);
827831 check_page (line, debit, credit, info->txn_type ->cash_value ,
828832 gas_account (info->cash_account ), info->cash_memo_edit ,
829833 info->cash_value , info->currency ,
830- NC_ (" Stock Assistant: Page name" , " cash" ), errors);
834+ // Translators: Designates a page in the stock assistant or inserts the value
835+ // into the non-currency asset split of an investment transaction.
836+ NC_ (" Stock Assistant" , " Cash" ), errors);
831837 add_to_summary_table (list, line);
832838 }
833839
@@ -838,7 +844,9 @@ to ensure proper recording."), new_date_str, last_split_date_str);
838844 check_page (line, debit, credit, info->txn_type ->fees_value ,
839845 capitalize_fees ? info->acct : gas_account (info->fees_account ),
840846 info->fees_memo_edit , info->fees_value , info->currency ,
841- NC_ (" Stock Assistant: Page name" , " fees" ), errors);
847+ // Translators: Designates a page in the stock assistant or inserts the value
848+ // into the fees split of an investment transaction.
849+ N_ (" Fees" ), errors);
842850 if (!line.value_is_zero )
843851 add_to_summary_table (list, line);
844852 }
@@ -848,7 +856,9 @@ to ensure proper recording."), new_date_str, last_split_date_str);
848856 check_page (line, debit, credit, info->txn_type ->dividend_value ,
849857 gas_account (info->dividend_account ),
850858 info->dividend_memo_edit , info->dividend_value , info->currency ,
851- NC_ (" Stock Assistant: Page name" , " dividend" ), errors);
859+ // Translators: Designates a page in the stock assistant or inserts the value
860+ // into the income split of an investment dividend transaction.
861+ N_ (" Dividend" ), errors);
852862 add_to_summary_table (list, line);
853863 }
854864
@@ -861,14 +871,16 @@ to ensure proper recording."), new_date_str, last_split_date_str);
861871 check_page (line, debit, credit, info->txn_type ->capgains_value ,
862872 gas_account (info->capgains_account ),
863873 info->capgains_memo_edit , info->capgains_value , info->currency ,
864- NC_ (" Stock Assistant: Page name" , " capital gains" ), errors);
874+ // Translators: Designates a page in the stock assistant or inserts the value
875+ // into the capital gain/loss income split of an investment transaction.
876+ N_ (" Capital Gain" ), errors);
865877 add_to_summary_table (list, line);
866878
867879 check_page (line, debit, credit,
868880 info->txn_type ->capgains_value ^ (FieldMask::ENABLED_CREDIT | FieldMask::ENABLED_DEBIT),
869881 info->acct , info->capgains_memo_edit , info->capgains_value ,
870882 info->currency ,
871- NC_ (" Stock Assistant: Page name " , " capital gains " ), errors);
883+ N_ (" Capital Gain " ), errors);
872884 add_to_summary_table (list, line);
873885 }
874886
@@ -1024,8 +1036,10 @@ create_split (Transaction *trans, const gchar *action, Account *account,
10241036 gnc_num_dbg_to_string (amount_numeric),
10251037 gnc_num_dbg_to_string (xaccSplitGetValue (split)),
10261038 gnc_num_dbg_to_string (xaccSplitGetAmount (split)));
1027- gnc_set_num_action (nullptr , split,
1028- nullptr , g_dpgettext2 (nullptr , " Stock Assistant: Action field" , action));
1039+ auto action_str{ g_strcmp0 (action, " Cash" ) ?
1040+ _ (action) :
1041+ g_dpgettext2 (nullptr , " Stock Assistant: Action field" , action)};
1042+ gnc_set_num_action (nullptr , split, nullptr , action_str);
10291043}
10301044
10311045static void
@@ -1094,7 +1108,9 @@ stock_assistant_finish (GtkAssistant *assistant, gpointer user_data)
10941108 stock_value = gnc_numeric_neg (stock_value);
10951109 }
10961110
1097- create_split (trans, NC_ (" Stock Assistant: Action field" , " Stock" ),
1111+ // Translators: Inserts the value into action field of the non-currency asset split of
1112+ // an investment transaction.
1113+ create_split (trans, N_ (" Stock" ),
10981114 info->acct , account_commits, info->stock_memo_edit ,
10991115 stock_amount, stock_value);
11001116
@@ -1104,7 +1120,7 @@ stock_assistant_finish (GtkAssistant *assistant, gpointer user_data)
11041120 if (info->txn_type ->cash_value & FieldMask::ENABLED_CREDIT)
11051121 cash = gnc_numeric_neg (cash);
11061122
1107- create_split (trans, NC_ (" Stock Assistant: Action field " , " Cash" ),
1123+ create_split (trans, NC_ (" Stock Assistant:" , " Cash" ),
11081124 gas_account (info->cash_account ), account_commits,
11091125 info->cash_memo_edit , cash, cash);
11101126 }
@@ -1117,7 +1133,7 @@ stock_assistant_finish (GtkAssistant *assistant, gpointer user_data)
11171133 auto capitalize = gtk_toggle_button_get_active
11181134 (GTK_TOGGLE_BUTTON (info->capitalize_fees_checkbox ));
11191135
1120- create_split (trans, NC_ ( " Stock Assistant: Action field " , " Fees" ),
1136+ create_split (trans, N_ ( " Fees" ),
11211137 capitalize ? info->acct : gas_account (info->fees_account ),
11221138 account_commits, info->fees_memo_edit ,
11231139 capitalize ? gnc_numeric_zero () : fees, fees);
@@ -1130,20 +1146,20 @@ stock_assistant_finish (GtkAssistant *assistant, gpointer user_data)
11301146 if (info->txn_type ->dividend_value & FieldMask::ENABLED_CREDIT)
11311147 dividend = gnc_numeric_neg (dividend);
11321148
1133- create_split (trans, NC_ ( " Stock Assistant: Action field " , " Dividend" ),
1149+ create_split (trans, N_ ( " Dividend" ),
11341150 gas_account (info->dividend_account ), account_commits,
11351151 info->dividend_memo_edit , dividend, dividend);
11361152 }
11371153
11381154 if (info->txn_type ->capgains_value != FieldMask::DISABLED)
11391155 {
11401156 auto capgains = gae_amount (info->capgains_value );
1141- create_split (trans, NC_ ( " Stock Assistant: Action field " , " Capital Gain" ),
1157+ create_split (trans, N_ ( " Capital Gain" ),
11421158 info->acct , account_commits, info->capgains_memo_edit ,
11431159 gnc_numeric_zero (), capgains);
11441160
11451161 capgains = gnc_numeric_neg (capgains);
1146- create_split (trans, NC_ ( " Stock Assistant: Action field " , " Capital Gain" ),
1162+ create_split (trans, N_ ( " Capital Gain" ),
11471163 gas_account (info->capgains_account ), account_commits,
11481164 info->capgains_memo_edit , capgains, capgains);
11491165 }
0 commit comments