Skip to content

Commit 1db7d2a

Browse files
rbujraveit65
authored andcommitted
Ensure proper translation of the about dialog title
Note that GTK+ sets a default title of _("About %s") on the dialog window (where %s is replaced by the name of the application, but in order to ensure proper translation of the title, applications should set the title property explicitly when constructing a GtkAboutDialog https://developer.gnome.org/gtk3/stable/GtkAboutDialog.html
1 parent 84c0435 commit 1db7d2a

File tree

8 files changed

+78
-43
lines changed

8 files changed

+78
-43
lines changed

‎applets/clock/clock.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3293,6 +3293,7 @@ static void display_about_dialog(GtkAction* action, ClockData* cd)
32933293

32943294
gtk_show_about_dialog(NULL,
32953295
"program-name", _("Clock"),
3296+
"title", _("About Clock"),
32963297
"authors", authors,
32973298
"comments", _("The Clock displays the current time and date"),
32983299
"copyright", _("Copyright \xc2\xa9 1998-2004 Free Software Foundation, Inc.\n"

‎applets/fish/fish.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,7 @@ static void display_about_dialog(GtkAction* action, FishApplet* fish)
556556

557557
gtk_show_about_dialog(NULL,
558558
"program-name", _("Fish"),
559+
"title", _("About Fish"),
559560
"authors", authors,
560561
"comments", descr,
561562
"copyright", _("Copyright \xc2\xa9 1998-2002 Free Software Foundation, Inc.\n"

‎applets/notification_area/main.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ static void about_cb(GtkAction* action, NaTrayApplet* applet)
274274

275275
gtk_show_about_dialog(NULL,
276276
"program-name", _("Notification Area"),
277+
"title", _("About Notification Area"),
277278
"authors", authors,
278279
//"comments", _(comments),
279280
"copyright", _("Copyright \xc2\xa9 2002 Red Hat, Inc.\n"

‎applets/wncklet/showdesktop.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ static void display_about_dialog(GtkAction* action, ShowDesktopData* sdd)
496496

497497
gtk_show_about_dialog(GTK_WINDOW(sdd->applet),
498498
"program-name", _("Show Desktop Button"),
499+
"title", _("About Show Desktop Button"),
499500
"authors", authors,
500501
"comments", _("This button lets you hide all windows and show the desktop."),
501502
"copyright", _("Copyright \xc2\xa9 2002 Red Hat, Inc.\n"

‎applets/wncklet/window-list.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,7 @@ static void display_about_dialog(GtkAction* action, TasklistData* tasklist)
559559

560560
gtk_show_about_dialog(GTK_WINDOW(tasklist->applet),
561561
"program-name", _("Window List"),
562+
"title", _("About Window List"),
562563
"authors", authors,
563564
"comments", _("The Window List shows a list of all windows in a set of buttons and lets you browse them."),
564565
"copyright", _("Copyright \xc2\xa9 2002 Red Hat, Inc.\n"

‎applets/wncklet/window-menu.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ static void window_menu_about(GtkAction* action, WindowMenu* window_menu)
7474

7575
gtk_show_about_dialog(GTK_WINDOW(window_menu->applet),
7676
"program-name", _("Window Selector"),
77+
"title", _("About Window Selector"),
7778
"authors", authors,
7879
"comments", _("The Window Selector shows a list of all windows in a menu and lets you browse them."),
7980
"copyright", _("Copyright \xc2\xa9 2000 Helix Code, Inc.\n"

‎applets/wncklet/workspace-switcher.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,7 @@ static void display_about_dialog(GtkAction* action, PagerData* pager)
632632

633633
gtk_show_about_dialog(GTK_WINDOW(pager->applet),
634634
"program-name", _("Workspace Switcher"),
635+
"title", _("About Workspace Switcher"),
635636
"authors", authors,
636637
"comments", _("The Workspace Switcher shows you a small version of your workspaces that lets you manage your windows."),
637638
"copyright", _("Copyright \xc2\xa9 2002 Red Hat, Inc.\n"

‎mate-panel.pot‎

Lines changed: 71 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: MATE Desktop Environment\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2019-02-15 19:25+0100\n"
11+
"POT-Creation-Date: 2019-02-17 10:28+0100\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -160,17 +160,17 @@ msgstr ""
160160
msgid "Failed to set the system time"
161161
msgstr ""
162162

163-
#: ../applets/clock/clock.c:1863 ../applets/fish/fish.c:1693
164-
#: ../applets/notification_area/main.c:291 ../applets/wncklet/window-list.c:171
163+
#: ../applets/clock/clock.c:1863 ../applets/fish/fish.c:1694
164+
#: ../applets/notification_area/main.c:292 ../applets/wncklet/window-list.c:171
165165
#: ../applets/wncklet/workspace-switcher.c:389
166166
msgid "_Preferences"
167167
msgstr ""
168168

169169
#: ../applets/clock/clock.c:1866 ../applets/clock/clock.ui.h:7
170-
#: ../applets/fish/fish.c:1696 ../applets/fish/fish.ui.h:2
171-
#: ../applets/notification_area/main.c:294 ../applets/wncklet/showdesktop.c:241
170+
#: ../applets/fish/fish.c:1697 ../applets/fish/fish.ui.h:2
171+
#: ../applets/notification_area/main.c:295 ../applets/wncklet/showdesktop.c:241
172172
#: ../applets/wncklet/window-list.c:179 ../applets/wncklet/window-list.ui.h:2
173-
#: ../applets/wncklet/window-menu.c:97
173+
#: ../applets/wncklet/window-menu.c:98
174174
#: ../applets/wncklet/workspace-switcher.c:397
175175
#: ../applets/wncklet/workspace-switcher.ui.h:2 ../mate-panel/drawer.c:563
176176
#: ../mate-panel/panel-action-button.c:737 ../mate-panel/panel-addto.c:1241
@@ -182,9 +182,9 @@ msgstr ""
182182
msgid "_Help"
183183
msgstr ""
184184

185-
#: ../applets/clock/clock.c:1869 ../applets/fish/fish.c:1699
186-
#: ../applets/notification_area/main.c:297 ../applets/wncklet/showdesktop.c:249
187-
#: ../applets/wncklet/window-list.c:187 ../applets/wncklet/window-menu.c:105
185+
#: ../applets/clock/clock.c:1869 ../applets/fish/fish.c:1700
186+
#: ../applets/notification_area/main.c:298 ../applets/wncklet/showdesktop.c:249
187+
#: ../applets/wncklet/window-list.c:187 ../applets/wncklet/window-menu.c:106
188188
#: ../applets/wncklet/workspace-switcher.c:405
189189
msgid "_About"
190190
msgstr ""
@@ -222,20 +222,24 @@ msgstr ""
222222
msgid "Clock"
223223
msgstr ""
224224

225-
#: ../applets/clock/clock.c:3297
226-
msgid "The Clock displays the current time and date"
225+
#: ../applets/clock/clock.c:3296
226+
msgid "About Clock"
227227
msgstr ""
228228

229229
#: ../applets/clock/clock.c:3298
230+
msgid "The Clock displays the current time and date"
231+
msgstr ""
232+
233+
#: ../applets/clock/clock.c:3299
230234
msgid ""
231235
"Copyright © 1998-2004 Free Software Foundation, Inc.\n"
232236
"Copyright © 2012-2019 MATE developers"
233237
msgstr ""
234238

235-
#: ../applets/clock/clock.c:3302 ../applets/fish/fish.c:566
236-
#: ../applets/notification_area/main.c:285 ../applets/wncklet/showdesktop.c:507
237-
#: ../applets/wncklet/window-list.c:570 ../applets/wncklet/window-menu.c:87
238-
#: ../applets/wncklet/workspace-switcher.c:643
239+
#: ../applets/clock/clock.c:3303 ../applets/fish/fish.c:567
240+
#: ../applets/notification_area/main.c:286 ../applets/wncklet/showdesktop.c:508
241+
#: ../applets/wncklet/window-list.c:571 ../applets/wncklet/window-menu.c:88
242+
#: ../applets/wncklet/workspace-switcher.c:644
239243
#: ../mate-panel/panel-context-menu.c:124
240244
msgid "translator-credits"
241245
msgstr ""
@@ -272,7 +276,7 @@ msgstr ""
272276
msgid "Time _Settings"
273277
msgstr ""
274278

275-
#: ../applets/clock/clock.ui.h:9 ../applets/fish/fish.c:852
279+
#: ../applets/clock/clock.ui.h:9 ../applets/fish/fish.c:853
276280
#: ../applets/fish/fish.ui.h:3
277281
#: ../applets/notification_area/notification-area-preferences-dialog.ui.h:2
278282
#: ../applets/wncklet/window-list.ui.h:3
@@ -619,8 +623,8 @@ msgstr ""
619623
msgid "Images"
620624
msgstr ""
621625

622-
#: ../applets/fish/fish.c:534 ../applets/fish/fish.c:577
623-
#: ../applets/fish/fish.c:683
626+
#: ../applets/fish/fish.c:534 ../applets/fish/fish.c:578
627+
#: ../applets/fish/fish.c:684
624628
#, no-c-format
625629
msgid "%s the Fish"
626630
msgstr ""
@@ -642,69 +646,73 @@ msgstr ""
642646
msgid "Fish"
643647
msgstr ""
644648

645-
#: ../applets/fish/fish.c:561
649+
#: ../applets/fish/fish.c:559
650+
msgid "About Fish"
651+
msgstr ""
652+
653+
#: ../applets/fish/fish.c:562
646654
msgid ""
647655
"Copyright © 1998-2002 Free Software Foundation, Inc.\n"
648656
"Copyright © 2002-2005 Vincent Untz\n"
649657
"Copyright © 2012-2019 MATE developers"
650658
msgstr ""
651659

652-
#: ../applets/fish/fish.c:578
660+
#: ../applets/fish/fish.c:579
653661
#, c-format
654662
msgid "%s the Fish, a contemporary oracle"
655663
msgstr ""
656664

657-
#: ../applets/fish/fish.c:644
665+
#: ../applets/fish/fish.c:645
658666
msgid "Unable to locate the command to execute"
659667
msgstr ""
660668

661-
#: ../applets/fish/fish.c:688
669+
#: ../applets/fish/fish.c:689
662670
#, no-c-format
663671
msgid "%s the Fish Says:"
664672
msgstr ""
665673

666-
#: ../applets/fish/fish.c:751
674+
#: ../applets/fish/fish.c:752
667675
#, c-format
668676
msgid ""
669677
"Unable to read output from command\n"
670678
"\n"
671679
"Details: %s"
672680
msgstr ""
673681

674-
#: ../applets/fish/fish.c:848
682+
#: ../applets/fish/fish.c:849
675683
msgid "_Speak again"
676684
msgstr ""
677685

678-
#: ../applets/fish/fish.c:929
686+
#: ../applets/fish/fish.c:930
679687
#, c-format
680688
msgid "The configured command is not working and has been replaced by: %s"
681689
msgstr ""
682690

683-
#: ../applets/fish/fish.c:962
691+
#: ../applets/fish/fish.c:963
684692
#, c-format
685693
msgid ""
686694
"Unable to execute '%s'\n"
687695
"\n"
688696
"Details: %s"
689697
msgstr ""
690698

691-
#: ../applets/fish/fish.c:978
699+
#: ../applets/fish/fish.c:979
692700
#, c-format
693701
msgid ""
694702
"Unable to read from '%s'\n"
695703
"\n"
696704
"Details: %s"
697705
msgstr ""
698706

699-
#: ../applets/fish/fish.c:1550
707+
#: ../applets/fish/fish.c:1551
700708
msgid "The water needs changing"
701709
msgstr ""
702710

703-
#: ../applets/fish/fish.c:1552
711+
#: ../applets/fish/fish.c:1553
704712
msgid "Look at today's date!"
705713
msgstr ""
706714

707-
#: ../applets/fish/fish.c:1634
715+
#: ../applets/fish/fish.c:1635
708716
#, c-format
709717
msgid "%s the Fish, the fortune teller"
710718
msgstr ""
@@ -831,16 +839,20 @@ msgstr ""
831839
msgid "Notification Area"
832840
msgstr ""
833841

842+
#: ../applets/notification_area/main.c:277
843+
msgid "About Notification Area"
844+
msgstr ""
845+
834846
#. "comments", _(comments),
835-
#: ../applets/notification_area/main.c:279
847+
#: ../applets/notification_area/main.c:280
836848
msgid ""
837849
"Copyright © 2002 Red Hat, Inc.\n"
838850
"Copyright © 2003-2006 Vincent Untz\n"
839851
"Copyright © 2011 Perberos\n"
840852
"Copyright © 2012-2019 MATE developers"
841853
msgstr ""
842854

843-
#: ../applets/notification_area/main.c:487
855+
#: ../applets/notification_area/main.c:488
844856
msgid "Panel Notification Area"
845857
msgstr ""
846858

@@ -962,7 +974,7 @@ msgid "Factory for the window navigation related applets"
962974
msgstr ""
963975

964976
#: ../applets/wncklet/org.mate.panel.Wncklet.mate-panel-applet.in.in.h:3
965-
#: ../applets/wncklet/window-menu.c:76 ../applets/wncklet/window-menu.c:226
977+
#: ../applets/wncklet/window-menu.c:76 ../applets/wncklet/window-menu.c:227
966978
msgid "Window Selector"
967979
msgstr ""
968980

@@ -1017,19 +1029,23 @@ msgstr ""
10171029
msgid "Show Desktop Button"
10181030
msgstr ""
10191031

1020-
#: ../applets/wncklet/showdesktop.c:500
1032+
#: ../applets/wncklet/showdesktop.c:499
1033+
msgid "About Show Desktop Button"
1034+
msgstr ""
1035+
1036+
#: ../applets/wncklet/showdesktop.c:501
10211037
msgid "This button lets you hide all windows and show the desktop."
10221038
msgstr ""
10231039

1024-
#: ../applets/wncklet/showdesktop.c:501 ../applets/wncklet/window-list.c:564
1025-
#: ../applets/wncklet/workspace-switcher.c:637
1040+
#: ../applets/wncklet/showdesktop.c:502 ../applets/wncklet/window-list.c:565
1041+
#: ../applets/wncklet/workspace-switcher.c:638
10261042
msgid ""
10271043
"Copyright © 2002 Red Hat, Inc.\n"
10281044
"Copyright © 2011 Perberos\n"
10291045
"Copyright © 2012-2019 MATE developers"
10301046
msgstr ""
10311047

1032-
#: ../applets/wncklet/showdesktop.c:528
1048+
#: ../applets/wncklet/showdesktop.c:529
10331049
msgid ""
10341050
"Your window manager does not support the show desktop button, or you are not "
10351051
"running a window manager."
@@ -1039,7 +1055,11 @@ msgstr ""
10391055
msgid "_System Monitor"
10401056
msgstr ""
10411057

1042-
#: ../applets/wncklet/window-list.c:563
1058+
#: ../applets/wncklet/window-list.c:562
1059+
msgid "About Window List"
1060+
msgstr ""
1061+
1062+
#: ../applets/wncklet/window-list.c:564
10431063
msgid ""
10441064
"The Window List shows a list of all windows in a set of buttons and lets you "
10451065
"browse them."
@@ -1089,13 +1109,17 @@ msgstr ""
10891109
msgid "Restore to na_tive workspace"
10901110
msgstr ""
10911111

1092-
#: ../applets/wncklet/window-menu.c:78
1112+
#: ../applets/wncklet/window-menu.c:77
1113+
msgid "About Window Selector"
1114+
msgstr ""
1115+
1116+
#: ../applets/wncklet/window-menu.c:79
10931117
msgid ""
10941118
"The Window Selector shows a list of all windows in a menu and lets you "
10951119
"browse them."
10961120
msgstr ""
10971121

1098-
#: ../applets/wncklet/window-menu.c:79
1122+
#: ../applets/wncklet/window-menu.c:80
10991123
msgid ""
11001124
"Copyright © 2000 Helix Code, Inc.\n"
11011125
"Copyright © 2001 Free Software Foundation, Inc.\n"
@@ -1105,17 +1129,21 @@ msgid ""
11051129
msgstr ""
11061130

11071131
#: ../applets/wncklet/workspace-switcher.c:240
1108-
#: ../applets/wncklet/workspace-switcher.c:938
1132+
#: ../applets/wncklet/workspace-switcher.c:939
11091133
#: ../applets/wncklet/workspace-switcher.ui.h:6
11101134
msgid "rows"
11111135
msgstr ""
11121136

11131137
#: ../applets/wncklet/workspace-switcher.c:240
1114-
#: ../applets/wncklet/workspace-switcher.c:938
1138+
#: ../applets/wncklet/workspace-switcher.c:939
11151139
msgid "columns"
11161140
msgstr ""
11171141

1118-
#: ../applets/wncklet/workspace-switcher.c:636
1142+
#: ../applets/wncklet/workspace-switcher.c:635
1143+
msgid "About Workspace Switcher"
1144+
msgstr ""
1145+
1146+
#: ../applets/wncklet/workspace-switcher.c:637
11191147
msgid ""
11201148
"The Workspace Switcher shows you a small version of your workspaces that "
11211149
"lets you manage your windows."

0 commit comments

Comments
 (0)