Skip to content

Commit df92200

Browse files
committed
Restrict gnucash.pot comment collection to ones beginning with Translators.
On recommendation of the Translation Project's Benno Schulenberg. Required re-annotating some comments. Also removed several comments about leaving a line break to prevent inserting it into gnucash.pot. That didn't actually work: they were inserted anyway.
1 parent c9998a8 commit df92200

File tree

8 files changed

+27
-32
lines changed

8 files changed

+27
-32
lines changed

gnucash/gnome-search/dialog-search.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,6 @@ gnc_search_dialog_test (void)
14701470
display = get_display_list (GNC_ID_SPLIT);
14711471

14721472
/* FIXME: All this does is leak. */
1473-
/* (keep the line break below to avoid a translator comment) */
14741473
gnc_search_dialog_create (NULL, GNC_ID_SPLIT,
14751474
_("Find Transaction"),
14761475
params, display,

gnucash/gnome/gnc-plugin-page-register.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3840,7 +3840,7 @@ gnc_plugin_page_register_cmd_view_sort_by (GtkAction *action,
38403840
priv->sd.dialog = dialog;
38413841
gtk_window_set_transient_for(GTK_WINDOW(dialog),
38423842
gnc_window_get_gtk_window(GNC_WINDOW(GNC_PLUGIN_PAGE(page)->window)));
3843-
/* Translations: The %s is the name of the plugin page */
3843+
/* Translators: The %s is the name of the plugin page */
38443844
title = g_strdup_printf(_("Sort %s by..."),
38453845
gnc_plugin_page_get_page_name(GNC_PLUGIN_PAGE(page)));
38463846
gtk_window_set_title(GTK_WINDOW(dialog), title);

gnucash/gnome/gnucash.desktop.in.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name=GnuCash
66
GenericName=Finance Management
77
Comment=Manage your finances, accounts, and investments
88
Exec=gnucash %f
9-
# Icon file name, do not translate unless you also provide a localized icon file. Alternatively use the English "gnucash-icon" as msgstr
9+
# Translators: Icon file name, do not translate unless you also provide a localized icon file. Alternatively use the English "gnucash-icon" as msgstr
1010
Icon=gnucash-icon
1111
StartupNotify=true
1212
Terminal=false

gnucash/import-export/import-main-matcher.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,8 +746,7 @@ gnc_gen_trans_init_view (GNCImportMainMatcher *info,
746746
/* prevent the rows being dragged to a different order */
747747
gtk_tree_view_set_reorderable (view, FALSE);
748748

749-
/* Add the columns *
750-
* (keep the line break below to avoid a translator comment) */
749+
/* Add the columns */
751750
add_text_column (view, _("Date"), DOWNLOADED_COL_DATE_TXT);
752751
info->account_column = add_text_column (view, _("Account"), DOWNLOADED_COL_ACCOUNT);
753752
gtk_tree_view_column_set_visible (info->account_column, show_account);

gnucash/import-export/log-replay/gnc-log-replay.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -608,11 +608,10 @@ void gnc_file_log_replay (GtkWindow *parent)
608608
{
609609
int err = errno;
610610
perror("File open failed");
611+
/* Translatiors: First argument is the filename,
612+
* second argument is the error.
613+
*/
611614
gnc_error_dialog(NULL,
612-
/* Translation note:
613-
* First argument is the filename,
614-
* second argument is the error.
615-
*/
616615
_("Failed to open log file: %s: %s"),
617616
selected_filename,
618617
strerror(err));

gnucash/import-export/ofx/gnc-ofx-import.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -624,10 +624,10 @@ int ofx_proc_transaction_cb(struct OfxTransactionData data, void *user_data)
624624
{
625625
// As we now have the commodity, select the account with that commodity.
626626

627-
investment_account_text = g_strdup_printf( /* This string is a default account
628-
name. It MUST NOT contain the
629-
character ':' anywhere in it or
630-
in any translations. */
627+
/* Translators: This string is a default account name. It MUST
628+
* NOT contain the character ':' anywhere in it or in any
629+
* translations. */
630+
investment_account_text = g_strdup_printf(
631631
_("Stock account for security \"%s\""),
632632
sanitize_string (data.security_data_ptr->secname));
633633

@@ -793,10 +793,10 @@ int ofx_proc_transaction_cb(struct OfxTransactionData data, void *user_data)
793793
if (income_account == NULL)
794794
{
795795
DEBUG("Couldn't find an associated income account");
796-
investment_account_text = g_strdup_printf( /* This string is a default account
797-
name. It MUST NOT contain the
798-
character ':' anywhere in it or
799-
in any translations. */
796+
/* Translators: This string is a default account
797+
* name. It MUST NOT contain the character ':' anywhere
798+
* in it or in any translations. */
799+
investment_account_text = g_strdup_printf(
800800
_("Income account for security \"%s\""),
801801
sanitize_string (data.security_data_ptr->secname));
802802
income_account = gnc_import_select_account(

libgnucash/engine/Recurrence.c

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ recurrenceListToString(const GList *r)
500500
{
501501
if (iter != r)
502502
{
503-
/* translators: " + " is an separator in a list of string-representations of recurrence frequencies */
503+
/* Translators: " + " is an separator in a list of string-representations of recurrence frequencies */
504504
g_string_append(str, _(" + "));
505505
}
506506
s = recurrenceToString((Recurrence *)iter->data);
@@ -615,7 +615,7 @@ _weekly_list_to_compact_string(GList *rs, GString *buf)
615615
g_string_printf(buf, "%s", _("Weekly"));
616616
if (multiplier > 1)
617617
{
618-
/* translators: %u is the recurrence multiplier, i.e. this
618+
/* Translators: %u is the recurrence multiplier, i.e. this
619619
event should occur every %u'th week. */
620620
g_string_append_printf(buf, _(" (x%u)"), multiplier);
621621
}
@@ -649,7 +649,7 @@ _monthly_append_when(Recurrence *r, GString *buf)
649649

650650
gnc_dow_abbrev(day_name_buf, abbrev_day_name_bufsize, g_date_get_weekday(&date) % 7);
651651

652-
/* translators: %s is an already-localized form of the day of the week. */
652+
/* Translators: %s is an already-localized form of the day of the week. */
653653
g_string_append_printf(buf, _("last %s"), day_name_buf);
654654
}
655655
else if (recurrenceGetPeriodType(r) == PERIOD_NTH_WEEKDAY)
@@ -662,13 +662,13 @@ _monthly_append_when(Recurrence *r, GString *buf)
662662
gnc_dow_abbrev(day_name_buf, abbrev_day_name_bufsize, g_date_get_weekday(&date) % 7);
663663
day_of_month_index = g_date_get_day(&date) - 1;
664664
week = day_of_month_index / 7 > 3 ? 3 : day_of_month_index / 7;
665-
/* translators: %s is the string 1st, 2nd, 3rd and so on, and
665+
/* Translators: %s is the string 1st, 2nd, 3rd and so on, and
666666
* %s is an already-localized form of the day of the week. */
667667
g_string_append_printf(buf, _("%s %s"), _(numerals[week]), day_name_buf);
668668
}
669669
else
670670
{
671-
/* translators: %u is the day of month */
671+
/* Translators: %u is the day of month */
672672
g_string_append_printf(buf, "%u", g_date_get_day(&date));
673673
}
674674
}
@@ -705,7 +705,7 @@ recurrenceListToCompactString(GList *rs)
705705
g_string_append_printf(buf, " ");
706706
if (recurrenceGetMultiplier(first) > 1)
707707
{
708-
/* translators: %u is the recurrence multiplier number */
708+
/* Translators: %u is the recurrence multiplier number */
709709
g_string_append_printf(buf, _(" (x%u)"), recurrenceGetMultiplier(first));
710710
}
711711
g_string_append_printf(buf, ": ");
@@ -715,7 +715,7 @@ recurrenceListToCompactString(GList *rs)
715715
}
716716
else
717717
{
718-
/* translators: %d is the number of Recurrences in the list. */
718+
/* Translators: %d is the number of Recurrences in the list. */
719719
g_string_printf(buf, _("Unknown, %d-size list."), g_list_length(rs));
720720
}
721721
}
@@ -736,7 +736,7 @@ recurrenceListToCompactString(GList *rs)
736736
g_string_printf(buf, "%s", _("Daily"));
737737
if (multiplier > 1)
738738
{
739-
/* translators: %u is the recurrence multiplier. */
739+
/* Translators: %u is the recurrence multiplier. */
740740
g_string_append_printf(buf, _(" (x%u)"), multiplier);
741741
}
742742
}
@@ -753,7 +753,7 @@ recurrenceListToCompactString(GList *rs)
753753
g_string_printf(buf, "%s", _("Monthly"));
754754
if (multiplier > 1)
755755
{
756-
/* translators: %u is the recurrence multiplier. */
756+
/* Translators: %u is the recurrence multiplier. */
757757
g_string_append_printf(buf, _(" (x%u)"), multiplier);
758758
}
759759
g_string_append_printf(buf, ": ");
@@ -764,12 +764,10 @@ recurrenceListToCompactString(GList *rs)
764764
{
765765
//g_warning("nth weekday not handled");
766766
//g_string_printf(buf, "@fixme: nth weekday not handled");
767-
/* (keep the line break below to avoid a translator comment) */
768-
g_string_printf(buf,
769-
"%s", _("Monthly"));
767+
g_string_printf(buf, "%s", _("Monthly"));
770768
if (multiplier > 1)
771769
{
772-
/* translators: %u is the recurrence multiplier. */
770+
/* Translators: %u is the recurrence multiplier. */
773771
g_string_append_printf(buf, _(" (x%u)"), multiplier);
774772
}
775773
g_string_append_printf(buf, ": ");
@@ -781,7 +779,7 @@ recurrenceListToCompactString(GList *rs)
781779
g_string_printf(buf, "%s", _("Yearly"));
782780
if (multiplier > 1)
783781
{
784-
/* translators: %u is the recurrence multiplier. */
782+
/* Translators: %u is the recurrence multiplier. */
785783
g_string_append_printf(buf, _(" (x%u)"), multiplier);
786784
}
787785
}

po/gnucash-pot.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
execute_process(
2-
COMMAND ${XGETTEXT} --add-comments
2+
COMMAND ${XGETTEXT} --add-comments=Translators
33
--directory=${TOP_SRC_DIR}
44
--default-domain=${PACKAGE}
55
--output=${PACKAGE}.pot

0 commit comments

Comments
 (0)