After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 350026 - [translation] Cannot translate Pan: Group preferences dialog box
[translation] Cannot translate Pan: Group preferences dialog box
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
pre-1.0 betas
Other Linux
: Normal normal
: 1.0
Assigned To: Charles Kerr
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2006-08-05 06:50 UTC by Frederic Bezies
Modified: 2006-08-08 05:55 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
screenshot showing the problem with pan 0.106 (88.83 KB, image/png)
2006-08-05 06:51 UTC, Frederic Bezies
  Details
0.106 patch to fix. (287 bytes, patch)
2006-08-07 16:19 UTC, Charles Kerr
none Details | Review

Description Frederic Bezies 2006-08-05 06:50:28 UTC
I  am working - for my own use in the first time - on a fresh and up-to-date french translation.

I translated the whole file, but a box doesn't seem to be translated. Right click on a group, select "Edit group preferences".

And the dialog box remains in english, while the rest of the software is translated.

I will add a screenshot to show the problem. It is not a big one, but it could be a translation blocker bug for 1.0, couldn't it ?
Comment 1 Frederic Bezies 2006-08-05 06:51:58 UTC
Created attachment 70244 [details]
screenshot showing the problem with pan 0.106

In pan 0.106... Kinda annoying :p
Comment 2 Frederic Bezies 2006-08-05 07:11:34 UTC
Seems to be related to this part of groups-prefs-dialog.cc file starting on line 127 :

{
  GtkWidget * dialog = gtk_dialog_new_with_buttons (_("Pan: Group Preferences"),
                                                    parent_window,
                                                    GTK_DIALOG_DESTROY_WITH_PARENT,
	                                            GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
                                                    NULL);

And then following part starting on line 139 :

  int row (0);
  GtkWidget *t, *w, *l;
  t = HIG :: workarea_create ();
  char buf[512];
  g_snprintf (buf, sizeof(buf), _("Properties for %s"), group.c_str());
  HIG::workarea_add_section_title (t, &row, buf);
    HIG :: workarea_add_section_spacer (t, row, 3);
    w = _charset = charset_picker_new (_group_prefs.get_string (group, "character-encoding", "UTF-8").c_str());
    HIG :: workarea_add_row (t, &row, _("Character _encoding:"), w);
    w = _save_path = file_entry_new (_("Directory for Saving Attachments"));
    char * pch = g_build_filename (g_get_home_dir(), "News", NULL);
    const std::string dir (_group_prefs.get_string (_group, "default-group-save-path", pch));
    g_free (pch);
    file_entry_set (w, dir.c_str());
    HIG :: workarea_add_row (t, &row, _("Directory for _saving attachments:"), w);
    w = _profile = create_profiles_combo_box (data, group, group_prefs);
    l = HIG :: workarea_add_row (t, &row, _("Posting _profile:"), w);
    gtk_widget_set_sensitive (l, GTK_WIDGET_SENSITIVE(w));

Too bad I don't know how to make it translatable :(



Comment 3 Charles Kerr 2006-08-07 16:19:02 UTC
Created attachment 70403 [details] [review]
0.106 patch to fix.

Looks like group-prefs-dialog.cc wasn't in POTFILES.in.
Comment 4 Frederic Bezies 2006-08-07 17:20:32 UTC
Ok. I will apply it and try to see if I can add the missing translation easily :)
Comment 5 Frederic Bezies 2006-08-07 17:29:55 UTC
I have to disagree here. There is no "group-prefs-dialog.cc" lines in pan.po created with xgettext :(

Here is the group-something part in pan.po after I added the patch :


[...]
#: pan/gui/group-pane.cc:608
msgid "Group Name"
msgstr ""

#: pan/gui/group-pane.cc:700
#, c-format
msgid " (%lu)"
msgstr ""

#: pan/gui/group-pane.cc:829 pan/gui/header-pane.cc:1616
msgid "Clear the Filter"
msgstr ""

#: pan/gui/group-pane.cc:863
msgid "Subscribed Groups"
msgstr ""

#: pan/gui/group-pane.cc:864
msgid "Other Groups"
msgstr ""

#: pan/gui/group-pane.cc:906
msgid "Name"
msgstr ""

#: pan/gui/gui.cc:237
msgid "Open the Task Manager"
msgstr ""


So, I think - sorry to be so affirmative - that translation are hardcoded :(
Comment 6 Frederic Bezies 2006-08-07 17:43:22 UTC
I am not a c++ coder (what a pity), but when I look another .cc file with translatable dialog box like post-ui.cc, I have something like :

GtkActionEntry entries[] =
  {
    { "file-menu", NULL, N_("_File") },
    { "edit-menu", NULL, N_("_Edit") },
    { "profile-menu", NULL, N_("_Profile") },
    { "charsets-menu", NULL, N_("Character Encoding") },
    { "editors-menu", NULL, N_("Set Editor") },
    { "post-toolbar", NULL, "post" },
etc...

So, it looks like group-prefs.cc need a little cleaning, too ?! :/
Comment 7 Frederic Bezies 2006-08-07 19:08:56 UTC
I am sorry, but it looks the pan.pot I used wasn't updated :(

So the patch is right, I am an idiot. The only question : why pan.pot is not updated ?!

Argh :(
Comment 8 Charles Kerr 2006-08-07 19:37:15 UTC
I /think/ it's updated from potfiles.in when you run configure.

I'm pretty sure you can also update POTFILES by typing "make POTFILES"
in the po directory.
Comment 9 Frederic Bezies 2006-08-07 19:46:26 UTC
I am ashamed for this spamming. I finally use xgettext on groups-prefs-dialog.cc, copied and pasted the missing lines in my translation/

I am very very - 2 minutes later - very sorry for this bugspam :(

I will update the translation on the other bug.

And pan.pot seems to remain intact :(

Strange :(
Comment 10 Charles Kerr 2006-08-08 04:05:27 UTC
I don't think you're spamming.  I'm happy that you're
helping out by updating Pan's translations!

If nothing else works, you could try deleting pan.pot,
adding group-prefs-dialog.cc by hand to POTFILES,
and running "make pan.pot" in pan-0.106/po/.
Comment 11 Frederic Bezies 2006-08-08 05:44:50 UTC
Thanks it works. 

I may also replace the french translation to correct some little display errors ;)
Comment 12 Charles Kerr 2006-08-08 05:55:37 UTC
Okay.